CloakHQ/CloakBrowser · error · RuntimeError

Pinned download completed but binary not found at expected p

Error message

Pinned 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

A pinned-version download reported success, but the extracted executable is missing or non-executable at the expected binary_path. Treated as a packaging bug, with a report link.

Source

Thrown at cloakbrowser/download.py:275

        binary_path = get_binary_path(requested_version)
        if binary_path.exists() and _is_executable(binary_path):
            logger.debug(
                "Pinned binary found in cache: %s (version %s)",
                binary_path,
                requested_version,
            )
            _show_welcome()
            return str(binary_path)

        logger.info(
            "Stealth Chromium %s not found. Downloading for %s...",
            requested_version,
            get_platform_tag(),
        )
        _download_and_extract(requested_version)

        if not (binary_path.exists() and _is_executable(binary_path)):
            raise RuntimeError(
                f"Pinned 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"
            )
        _show_welcome()
        return str(binary_path)

    # Check for auto-updated version first, then fall back to hardcoded
    effective = get_effective_version()
    binary_path = get_binary_path(effective)

    if binary_path.exists() and _is_executable(binary_path):
        logger.debug("Binary found in cache: %s (version %s)", binary_path, effective)
        _show_welcome()
        _maybe_trigger_update_check()
        return str(binary_path)

    # Fall back to platform's hardcoded version if effective version binary doesn't exist

View on GitHub (pinned to d6bad5de26)

Solutions

  1. Clear the cloakbrowser cache/download dir and re-download
  2. Free disk space / fix permissions on the cache directory
  3. Report at https://github.com/CloakHQ/cloakbrowser/issues with the version
Defensive patterns

Strategy: retry

Try / catch

try:
    ensure_binary(browser_version=PIN)
except RuntimeError as e:
    if "not found at expected path" in str(e):
        shutil.rmtree(get_cache_dir(), ignore_errors=True)
        ensure_binary(browser_version=PIN)  # one clean retry
    else:
        raise

Prevention

When it happens

Trigger: ensure_binary with a pinned browser_version where _download_and_extract completes but the archive layout changed so the expected binary path isn't executable.

Common situations: Upstream archive restructure between releases; broken/deferred extraction (disk full, permissions); partial extraction on crash.

Related errors


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