CloakHQ/CloakBrowser · error · RuntimeError

Download completed but binary not found at expected path: {b

Error message

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

What it means

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.

Source

Thrown at cloakbrowser/download.py:312

    platform_version = get_chromium_version()
    if effective != platform_version:
        fallback_path = get_binary_path()
        if fallback_path.exists() and _is_executable(fallback_path):
            logger.debug("Binary found in cache: %s", fallback_path)
            _maybe_trigger_update_check()
            return str(fallback_path)

    # Download platform's hardcoded version
    logger.info(
        "Stealth Chromium %s not found. Downloading for %s...",
        platform_version,
        get_platform_tag(),
    )
    _download_and_extract()

    binary_path = get_binary_path()
    if not binary_path.exists():
        raise RuntimeError(
            f"Download completed but binary not found at expected path: {binary_path}. "
            f"This may indicate a packaging issue. Please report at "
            f"https://github.com/CloakHQ/cloakbrowser/issues"
        )

    _maybe_trigger_update_check()
    return str(binary_path)


def _download_and_extract(version: str | None = None) -> None:
    """Download the binary archive and extract to cache directory.

    Tries the primary server (cloakbrowser.dev) first, falls back to
    GitHub Releases if the primary is unreachable or returns an error.
    Verifies SHA-256 checksum before extraction when available.
    """
    primary_url = get_download_url(version)
    fallback_url = get_fallback_download_url(version)

View on GitHub (pinned to d6bad5de26)

Solutions

  1. Delete the cache directory and retry the download
  2. Verify disk space and write permissions
  3. Report the issue with your platform and version at the GitHub link
Defensive patterns

Strategy: retry

Try / catch

try:
    ensure_binary()
except RuntimeError as e:
    if "Download completed but binary not found" in str(e):
        shutil.rmtree(get_cache_dir(), ignore_errors=True)
        ensure_binary()
    else:
        raise

Prevention

When it happens

Trigger: Default ensure_binary flow: _download_and_extract() succeeds but binary_path.exists() is False afterwards.

Common situations: Changed archive layout in the latest release; extraction silently truncated; cache dir on a mount that lost data.

Related errors


AI-assisted analysis of CloakHQ/CloakBrowser@d6bad5de26 (2026-08-28). Data as JSON: /api/errors/db974b1b21a36b02. Report an issue: GitHub.