{"record":{"id":"d978133a4f2263e5","repo":"CloakHQ/CloakBrowser","slug":"pro-binary-unavailable-e-your-license-is-vali","errorCode":null,"errorMessage":"Pro binary unavailable: ${e}. Your license is valid but the Pro binary could not be downloaded right now. Retry in a moment. To use the free binary instead, unset CLOAKBROWSER_LICENSE_KEY.","messagePattern":"Pro binary unavailable: (.+?)\\. Your license is valid but the Pro binary could not be downloaded right now\\. Retry in a moment\\. To use the free binary instead, unset CLOAKBROWSER_LICENSE_KEY\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"js/src/download.ts","lineNumber":122,"sourceCode":"      // Paid keys keep pinning/rollback.\n      const proVersion = info.plan === \"free\" ? undefined : requestedVersion;\n      // A valid license is entitled to Pro, so Pro failures surface loudly\n      // rather than silently substituting the older free binary. (A blip during\n      // a routine update never reaches here: ensureProBinary returns the cached\n      // Pro binary and updates in the background.)\n      try {\n        return await ensureProBinary(\n          effectiveKey,\n          proVersion,\n          info.plan,\n          releaseChannel,\n        );\n      } catch (e) {\n        // Authenticity could not be confirmed — surface verbatim.\n        if (e instanceof BinaryVerificationError) throw e;\n        // Transient failure with no cached Pro binary to use — surface a clear\n        // error rather than silently downloading the free binary.\n        throw new Error(\n          `Pro binary unavailable: ${e}. Your license is valid but the Pro ` +\n            `binary could not be downloaded right now. Retry in a moment. To use ` +\n            `the free binary instead, unset CLOAKBROWSER_LICENSE_KEY.`,\n          { cause: e }\n        );\n      }\n    } else if (info) {\n      // Key supplied but rejected — abort, never downgrade to free.\n      throw new Error(\n        `CloakBrowser Pro: license key is invalid or expired (plan=${info.plan}). ` +\n          `Check CLOAKBROWSER_LICENSE_KEY, or unset it to use the free binary.`,\n      );\n    } else {\n      // Key supplied but unvalidatable (server down, no cache) — abort.\n      throw new Error(\n        \"CloakBrowser Pro: license could not be validated (server unreachable \" +\n          \"and no cached validation). Retry in a moment, or unset \" +\n          \"CLOAKBROWSER_LICENSE_KEY to use the free binary.\",","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/js/src/download.ts#L104-L140","documentation":"RuntimeError('Element not found while scrolling into view') is raised when the element's bounding box (obtained via the caller-supplied get_box callback) is None at the start of human_scroll_into_view — the element is detached, hidden (display:none), or never matched, so there is nothing to scroll to.","triggerScenarios":"Passing a selector/locator for an element that does not currently exist (get_box() returns None): element removed by React re-render, display:none container, wrong selector, or SPA route change that destroyed the node before the scroll call.","commonSituations":"Dynamic SPAs where the node is replaced between query and scroll; selectors that match only after async data loads; shadow-DOM or iframe elements the box reader cannot see; typo'd selectors.","solutions":["Wait for the element to be attached/visible first (page.wait_for_selector(sel, state='visible')) before calling human_scroll_into_view.","Verify the selector actually matches: page.query_selector(sel) should not be None; fix shadow-dom/iframe-aware selectors.","If the element may legitimately be display:none, scroll an ancestor container instead or make it visible first.","Re-query the element after mutations instead of holding a stale handle."],"exampleFix":"// before\nhuman_scroll_into_view(page, sel, get_box, cfg)  # element not yet rendered\n\n// after\npage.wait_for_selector(sel, state='visible', timeout=5000)\nhuman_scroll_into_view(page, sel, get_box, cfg)","handlingStrategy":"validation","validationCode":"if page.query_selector(sel) is None:\n    page.wait_for_selector(sel, state='visible', timeout=5000)","typeGuard":"def element_present(page, sel) -> bool:\n    return page.query_selector(sel) is not None","tryCatchPattern":"try:\n    human_scroll_into_view(page, sel, get_box, cfg)\nexcept RuntimeError as e:\n    if 'not found while scrolling' not in str(e): raise\n    page.wait_for_selector(sel, state='visible', timeout=5000)\n    human_scroll_into_view(page, sel, get_box, cfg)","preventionTips":["Always wait_for_selector(state='visible') before scrolling","Re-query elements after DOM mutations instead of holding stale handles","Prefer stable data-testid CSS selectors"],"tags":["dom","element-not-found","scroll","selector"],"backgroundTag":"element-not-found","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}