{"record":{"id":"5e2021d51a626b83","repo":"CloakHQ/CloakBrowser","slug":"cloakbrowser-pro-license-key-is-invalid-or-expire-5e2021","errorCode":null,"errorMessage":"CloakBrowser Pro: license key is invalid or expired (plan={info.plan}). Check CLOAKBROWSER_LICENSE_KEY, or unset it to use the free binary.","messagePattern":"CloakBrowser Pro: license key is invalid or expired \\(plan=(.+?)\\)\\. Check CLOAKBROWSER_LICENSE_KEY, or unset it to use the free binary\\.","errorType":"exception","errorClass":"CloakBrowserLicenseError","httpStatus":null,"severity":"error","filePath":"cloakbrowser/download.py","lineNumber":240,"sourceCode":"                    requested_version=requested_version,\n                    plan=info.plan,\n                    release_channel=release_channel,\n                )\n            except BinaryVerificationError:\n                # Authenticity could not be confirmed — surface verbatim.\n                raise\n            except Exception as e:\n                # Transient failure with no cached Pro binary to use — surface a\n                # clear error rather than silently downloading the free binary.\n                raise RuntimeError(\n                    f\"Pro binary unavailable: {e}. Your license is valid but the \"\n                    f\"Pro binary could not be downloaded right now. Retry in a \"\n                    f\"moment. To use the free binary instead, unset \"\n                    f\"CLOAKBROWSER_LICENSE_KEY.\"\n                ) from e\n        elif info:\n            # Key supplied but rejected — abort, never downgrade to free.\n            raise CloakBrowserLicenseError(\n                f\"CloakBrowser Pro: license key is invalid or expired \"\n                f\"(plan={info.plan}). Check CLOAKBROWSER_LICENSE_KEY, or unset it \"\n                f\"to use the free binary.\"\n            )\n        else:\n            # Key supplied but unvalidatable (server down, no cache) — abort.\n            raise CloakBrowserLicenseError(\n                \"CloakBrowser Pro: license could not be validated (server \"\n                \"unreachable and no cached validation). Retry in a moment, or \"\n                \"unset CLOAKBROWSER_LICENSE_KEY to use the free binary.\"\n            )\n\n    # Fail fast if no binary available for this platform\n    check_platform_available()\n\n    if requested_version:\n        binary_path = get_binary_path(requested_version)\n        if binary_path.exists() and _is_executable(binary_path):","sourceCodeStart":222,"sourceCodeEnd":258,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/cloakbrowser/download.py#L222-L258","documentation":"A CLOAKBROWSER_LICENSE_KEY was supplied and the license server explicitly rejected it (invalid or expired, with a returned plan). The library aborts and never silently downgrades to the free binary.","triggerScenarios":"Expired subscription, revoked key, typo'd key in CLOAKBROWSER_LICENSE_KEY; raised during ensure_binary on any launch or install.","commonSituations":"Trial expired; key rotated; copy-paste whitespace in the env var; using an old key after plan cancellation.","solutions":["Renew or correct CLOAKBROWSER_LICENSE_KEY","Remove surrounding whitespace/quotes from the env var","Unset CLOAKBROWSER_LICENSE_KEY if the free binary is acceptable"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"from cloakbrowser.download import CloakBrowserLicenseError\ntry:\n    ensure_binary()\nexcept CloakBrowserLicenseError as e:\n    if \"invalid or expired\" in str(e):\n        alert_ops_license_expired()\n    raise","preventionTips":["Validate the license key at deploy time in a health check","Keep license renewals automated to avoid expired-key surprises"],"tags":["license","authentication","pro-license"],"backgroundTag":"license-key-invalid","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}