{"record":{"id":"ea8154f62366809c","repo":"janhq/jan","slug":"platform-platform-system-not-supported","errorCode":null,"errorMessage":"Platform {platform.system()} not supported","messagePattern":"Platform (.+?) not supported","errorType":"exception","errorClass":"NotImplementedError","httpStatus":null,"severity":"error","filePath":"autoqa/utils.py","lineNumber":234,"sourceCode":"            return True\n        except Exception as e2:\n            logger.warning(f\"All maximize methods failed: {e2}\")\n            return False\n\ndef start_jan_app(jan_app_path=None):\n    \"\"\"\n    Start Jan application in maximized window (cross-platform)\n    \"\"\"\n    # Set default path based on platform\n    if jan_app_path is None:\n        if IS_WINDOWS:\n            jan_app_path = os.path.expanduser(r\"~\\AppData\\Local\\Programs\\jan\\Jan.exe\")\n        elif IS_LINUX:\n            jan_app_path = \"/usr/bin/Jan\"  # or \"/usr/bin/Jan\" for regular\n        elif IS_MACOS:\n            jan_app_path = \"/Applications/Jan.app/Contents/MacOS/Jan\"  # Default macOS path\n        else:\n            raise NotImplementedError(f\"Platform {platform.system()} not supported\")\n    \n    logger.info(f\"Starting Jan application from: {jan_app_path}\")\n    \n    if not os.path.exists(jan_app_path):\n        logger.error(f\"Jan executable not found at: {jan_app_path}\")\n        raise FileNotFoundError(f\"Jan app not found at {jan_app_path}\")\n    \n    try:\n        # Start the Jan application\n        if IS_WINDOWS:\n            subprocess.Popen([jan_app_path], shell=True)\n        elif IS_LINUX:\n            # On Linux, start with DISPLAY environment variable\n            env = os.environ.copy()\n            subprocess.Popen([jan_app_path], env=env)\n        elif IS_MACOS:\n            # On macOS, use 'open' command to launch .app bundle properly\n            if jan_app_path.endswith('.app/Contents/MacOS/Jan'):","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/janhq/jan/blob/fad3f12a147d138388a66f0d92a02b2675f65294/autoqa/utils.py#L216-L252","documentation":"Raised by start_jan_app when the host OS is neither Windows, Linux, nor macOS and no explicit jan_app_path was supplied. The function falls through every IS_WINDOWS/IS_LINUX/IS_MACOS branch and hits the final else clause. This is a NotImplementedError because the autoqa harness has no known default install location for any other platform.","triggerScenarios":"Calling start_jan_app() (or a wrapper that calls it) on FreeBSD, Solaris, AIX, or any platform where platform.system() returns something other than 'Windows', 'Linux', or 'Darwin' — while leaving jan_app_path=None.","commonSituations":"Running autoqa in a CI runner with an uncommon OS image; running inside a container whose platform.system() reports an unexpected value; importing and calling the function from a test harness on an unsupported platform.","solutions":["Pass an explicit jan_app_path argument pointing to the Jan executable on your system, which bypasses the platform-default logic entirely.","Run the autoqa suite on a supported platform (Windows, Linux, or macOS).","Extend the IS_WINDOWS/IS_LINUX/IS_MACOS branch set with the additional platform and a default path if this is a permanent need."],"exampleFix":"// before\nstart_jan_app()\n// after\nstart_jan_app(jan_app_path=\"/path/to/Jan\")","handlingStrategy":"validation","validationCode":"import platform, sys\n\ndef can_start_jan_default() -> bool:\n    return platform.system() in ('Windows', 'Linux', 'Darwin')\n\n# Before calling start_jan_app():\nif not can_start_jan_default() and jan_app_path is None:\n    raise SystemExit(f\"Unsupported platform {platform.system()}; pass jan_app_path explicitly\")","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always pass jan_app_path explicitly in cross-platform test harnesses rather than relying on defaults.","Add a platform-support check at test-suite startup rather than letting it fail deep in start_jan_app."],"tags":["platform","autoqa","cross-platform","not-implemented"],"backgroundTag":null,"analyzedSha":"fad3f12a147d138388a66f0d92a02b2675f65294","analyzedAt":"2026-08-12T20:33:47.516Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}