{"record":{"id":"6c15f9131906f91e","repo":"CloakHQ/CloakBrowser","slug":"cloakbrowser-pro-license-key-is-invalid-or-expire","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":"Error","httpStatus":null,"severity":"error","filePath":"js/src/download.ts","lineNumber":131,"sourceCode":"          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.\",\n      );\n    }\n  }\n\n  // Fail fast if no binary available for this platform\n  checkPlatformAvailable();\n\n  if (requestedVersion) {\n    const binaryPath = getBinaryPath(requestedVersion);","sourceCodeStart":113,"sourceCodeEnd":149,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/js/src/download.ts#L113-L149","documentation":"RuntimeError('Element lost after scrolling into view') is raised at the end of human_scroll_into_view when get_box() returns None after the wheel-scroll burst and settle delay. The element existed when scrolling started but was detached or hidden by the time scrolling finished — typically the page re-rendered, lazy-loaded content shifted layout, or navigation occurred.","triggerScenarios":"Scrolling an element inside a virtualized list or React/Vue tree that re-renders nodes on scroll; an anchor click triggered by the scroll; lazy-load placeholders replacing the target node; navigation during the settle delay (cfg.scroll_settle_delay).","commonSituations":"Infinite-scroll feeds and virtualized tables that recycle DOM nodes; SPAs with skeleton-to-content swaps; ads/interstitials mounting on scroll; slow networks where the element unmounts mid-scroll.","solutions":["Re-query the element by selector after catching this error and retry the scroll once — node identity often changes but the selector still matches.","Wait for layout to stabilize before scrolling (networkidle or a data-loaded marker) so lazy content does not shift mid-scroll.","Increase cfg.scroll_settle_delay if re-render consistently lands after the settle window.","For virtualized lists, scroll by fixed offsets instead of targeting recycled nodes."],"exampleFix":"// before\nbox, cx, cy, scrolled = human_scroll_into_view(page, sel, get_box, cfg)\n\n// after\ntry:\n    box, cx, cy, scrolled = human_scroll_into_view(page, sel, get_box, cfg)\nexcept RuntimeError as e:\n    if 'lost after scrolling' in str(e):\n        page.wait_for_selector(sel, state='visible', timeout=3000)\n        box, cx, cy, scrolled = human_scroll_into_view(page, sel, get_box, cfg)\n    else:\n        raise","handlingStrategy":"retry","validationCode":"# no reliable pre-check; ensure layout is stable\npage.wait_for_selector(sel, state='visible')","typeGuard":null,"tryCatchPattern":"try:\n    human_scroll_into_view(page, sel, get_box, cfg)\nexcept RuntimeError as e:\n    if 'lost after scrolling' not in str(e): raise\n    page.wait_for_selector(sel, state='visible', timeout=3000)\n    human_scroll_into_view(page, sel, get_box, cfg)","preventionTips":["Wait for lazy content and network idle before scrolling virtualized lists","Increase scroll_settle_delay when pages re-render on scroll","Target stable ancestor containers for recycled nodes"],"tags":["dom","scroll","virtualized-list","race-condition"],"backgroundTag":"stale-element-reference","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}