{"record":{"id":"5fef8acf46107b20","repo":"CloakHQ/CloakBrowser","slug":"could-not-determine-latest-pro-version-from-server-5fef8a","errorCode":null,"errorMessage":"Could not determine latest Pro version from server","messagePattern":"Could not determine latest Pro version from server","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"cloakbrowser/download.py","lineNumber":458,"sourceCode":"        release = get_pro_latest_release(release_channel)\n        if release is not None and release.fallback:\n            _warn_preview_fallback()\n\n    # Prefer the server's latest when it is newer than — or replaces a missing —\n    # the cached build. Otherwise stay on the cached Pro binary (fast, offline-ok).\n    if latest and (\n        effective is None\n        or not _pro_binary_ready(effective)\n        or _version_newer(latest, effective)\n    ):\n        version: str | None = latest\n    else:\n        version = effective\n\n    if version is None:\n        # Valid Pro license but nothing resolvable (server unreachable AND no\n        # cached Pro build). Never downgrade to the free binary — fail loudly.\n        raise RuntimeError(\"Could not determine latest Pro version from server\")\n\n    if _pro_binary_ready(version):\n        binary_path = get_binary_path(version, pro=True)\n        # Advance the marker if this cached build is newer than what the marker names,\n        # so `info` (and a later server-outage launch) reflect the build we actually\n        # launch — never a stale marker.\n        if version != effective:\n            try:\n                _write_pro_version_marker(version, release_channel)\n            except OSError:\n                pass\n        logger.debug(\"Pro binary found in cache: %s (version %s)\", binary_path, version)\n        _show_welcome(welcome_tier)\n        return str(binary_path)\n\n    # `version` (the server latest) needs downloading. On failure, fall back to a\n    # cached Pro build if we have one — never the free binary.\n    try:","sourceCodeStart":440,"sourceCodeEnd":476,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/cloakbrowser/download.py#L440-L476","documentation":"With a valid Pro license and no pinned version, cloakbrowser needs the server's latest Pro version (or a cached value) to select a build. If the server is unreachable AND no cached Pro build/marker exists, it raises RuntimeError rather than downgrading to the free binary.","triggerScenarios":"Unpinned launch with a valid license during a server outage on a machine that has never downloaded a Pro build.","commonSituations":"First Pro run offline; CI with blocked egress to the version API; DNS failure in containers.","solutions":["Retry once the version server is reachable","Pre-install the Pro binary (run install once while online) so a cache exists","Unset CLOAKBROWSER_LICENSE_KEY if the free binary is acceptable"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    ensure_binary()  # unpinned, Pro\nexcept RuntimeError as e:\n    if \"Could not determine latest Pro version\" in str(e):\n        os.environ.pop(\"CLOAKBROWSER_LICENSE_KEY\", None)\n        ensure_binary()\n    else:\n        raise","preventionTips":["Run `cloakbrowser install` once while online to cache the latest Pro build","Pin a known Pro version so server resolution isn't required at launch"],"tags":["pro-license","network","offline","version-resolution"],"backgroundTag":"version-metadata-unavailable","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}