{"record":{"id":"7cbfe632903140d9","repo":"CloakHQ/CloakBrowser","slug":"unsupported-platform-system-machine-supporte","errorCode":null,"errorMessage":"Unsupported platform: {system} {machine}. Supported: {supported list}","messagePattern":"Unsupported platform: (.+?) (.+?)\\. Supported: (.+?)","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"cloakbrowser/config.py","lineNumber":150,"sourceCode":"            \"Invalid browser version pin. Use a full numeric Chromium version, \"\n            \"e.g. '148.0.7778.215.2'.\"\n        )\n    return normalized\n\n\ndef get_chromium_version() -> str:\n    \"\"\"Return the Chromium version for the current platform.\"\"\"\n    tag = get_platform_tag()\n    return PLATFORM_CHROMIUM_VERSIONS.get(tag, CHROMIUM_VERSION)\n\n\ndef get_platform_tag() -> str:\n    \"\"\"Return the platform tag for binary download (e.g. 'linux-x64', 'darwin-arm64').\"\"\"\n    system = platform.system()\n    machine = platform.machine()\n    tag = SUPPORTED_PLATFORMS.get((system, machine))\n    if tag is None:\n        raise RuntimeError(\n            f\"Unsupported platform: {system} {machine}. \"\n            f\"Supported: {', '.join(f'{s}-{m}' for (s, m) in SUPPORTED_PLATFORMS)}\"\n        )\n    return tag\n\n\n# ---------------------------------------------------------------------------\n# Binary cache paths\n# ---------------------------------------------------------------------------\ndef get_cache_dir() -> Path:\n    \"\"\"Return the cache directory for downloaded binaries.\n\n    Override with CLOAKBROWSER_CACHE_DIR env var.\n    Default: ~/.cloakbrowser/\n    \"\"\"\n    custom = os.environ.get(\"CLOAKBROWSER_CACHE_DIR\")\n    if custom:\n        return Path(custom)","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/cloakbrowser/config.py#L132-L168","documentation":"get_platform_tag maps (platform.system(), platform.machine()) to a supported download tag. On an OS/arch combo absent from SUPPORTED_PLATFORMS (e.g. Windows, Linux arm64, FreeBSD), binary download paths raise RuntimeError listing supported platforms.","triggerScenarios":"Running ensure_binary/binary_info/launch on an unsupported platform such as Windows x64 or Linux aarch64; also triggered by diagnostic collection.","commonSituations":"Trying to run the library on Windows (which is unsupported for the custom Chromium builds); unusual architectures (riscv, s390x); FreeBSD containers.","solutions":["Run inside a supported Linux x64/arm64 or macOS Intel/ARM environment (Docker helps)","Use CLOAKBROWSER_BINARY_PATH to point at a manually provisioned compatible binary if one exists for your platform","Check SUPPORTED_PLATFORMS in config.py for the current list"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"import platform\nfrom cloakbrowser.config import SUPPORTED_PLATFORMS\n\ndef platform_ok() -> bool:\n    return (platform.system(), platform.machine()) in SUPPORTED_PLATFORMS","typeGuard":"def supports_cloakbrowser() -> bool:\n    import platform\n    from cloakbrowser.config import SUPPORTED_PLATFORMS\n    return (platform.system(), platform.machine()) in SUPPORTED_PLATFORMS","tryCatchPattern":"try:\n    ensure_binary()\nexcept RuntimeError as e:\n    if \"Unsupported platform\" in str(e):\n        run_in_docker_linux_x64()  # container fallback\n    else:\n        raise","preventionTips":["Gate installs on platform checks in CI","Use a linux/x64 Docker image on Windows/macOS CI hosts"],"tags":["platform","unsupported-os","binary-download"],"backgroundTag":"unsupported-platform","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}