{"record":{"id":"db974b1b21a36b02","repo":"CloakHQ/CloakBrowser","slug":"download-completed-but-binary-not-found-at-expecte-db974b","errorCode":null,"errorMessage":"Download completed but binary not found at expected path: {binary_path}. This may indicate a packaging issue. Please report at https://github.com/CloakHQ/cloakbrowser/issues","messagePattern":"Download completed but binary not found at expected path: (.+?)\\. This may indicate a packaging issue\\. Please report at https://github\\.com/CloakHQ/cloakbrowser/issues","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"cloakbrowser/download.py","lineNumber":312,"sourceCode":"    platform_version = get_chromium_version()\n    if effective != platform_version:\n        fallback_path = get_binary_path()\n        if fallback_path.exists() and _is_executable(fallback_path):\n            logger.debug(\"Binary found in cache: %s\", fallback_path)\n            _maybe_trigger_update_check()\n            return str(fallback_path)\n\n    # Download platform's hardcoded version\n    logger.info(\n        \"Stealth Chromium %s not found. Downloading for %s...\",\n        platform_version,\n        get_platform_tag(),\n    )\n    _download_and_extract()\n\n    binary_path = get_binary_path()\n    if not binary_path.exists():\n        raise RuntimeError(\n            f\"Download completed but binary not found at expected path: {binary_path}. \"\n            f\"This may indicate a packaging issue. Please report at \"\n            f\"https://github.com/CloakHQ/cloakbrowser/issues\"\n        )\n\n    _maybe_trigger_update_check()\n    return str(binary_path)\n\n\ndef _download_and_extract(version: str | None = None) -> None:\n    \"\"\"Download the binary archive and extract to cache directory.\n\n    Tries the primary server (cloakbrowser.dev) first, falls back to\n    GitHub Releases if the primary is unreachable or returns an error.\n    Verifies SHA-256 checksum before extraction when available.\n    \"\"\"\n    primary_url = get_download_url(version)\n    fallback_url = get_fallback_download_url(version)","sourceCodeStart":294,"sourceCodeEnd":330,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/cloakbrowser/download.py#L294-L330","documentation":"Unpinned (default-version) download completed, but no binary exists at get_binary_path(). Same class of packaging/consistency failure as the pinned variant, reported with a report link.","triggerScenarios":"Default ensure_binary flow: _download_and_extract() succeeds but binary_path.exists() is False afterwards.","commonSituations":"Changed archive layout in the latest release; extraction silently truncated; cache dir on a mount that lost data.","solutions":["Delete the cache directory and retry the download","Verify disk space and write permissions","Report the issue with your platform and version at the GitHub link"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ensure_binary()\nexcept RuntimeError as e:\n    if \"Download completed but binary not found\" in str(e):\n        shutil.rmtree(get_cache_dir(), ignore_errors=True)\n        ensure_binary()\n    else:\n        raise","preventionTips":["Provision binaries in a Docker build step, not at runtime","Monitor cache directory health in long-lived workers"],"tags":["download","packaging","corruption"],"backgroundTag":"binary-extraction-failed","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}