{"record":{"id":"1a89913fee597fb9","repo":"CloakHQ/CloakBrowser","slug":"cloakbrowser-pre-built-binaries-are-currently-on","errorCode":null,"errorMessage":"CloakBrowser — Pre-built binaries are currently only available for: ${available}.\n\nTo use CloakBrowser now, set CLOAKBROWSER_BINARY_PATH to a local Chromium binary.","messagePattern":"CloakBrowser — Pre-built binaries are currently only available for: (.+?)\\.\n\nTo use CloakBrowser now, set CLOAKBROWSER_BINARY_PATH to a local Chromium binary\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"js/src/config.ts","lineNumber":146,"sourceCode":"\nexport function getBinaryPath(version?: string, pro = false): string {\n  const binaryDir = getBinaryDir(version, pro);\n  if (process.platform === \"darwin\") {\n    return path.join(binaryDir, \"Chromium.app\", \"Contents\", \"MacOS\", \"Chromium\");\n  }\n  if (process.platform === \"win32\") {\n    return path.join(binaryDir, \"chrome.exe\");\n  }\n  return path.join(binaryDir, \"chrome\");\n}\n\nexport function checkPlatformAvailable(): void {\n  if (getLocalBinaryOverride()) return;\n\n  const tag = getPlatformTag(); // throws if unsupported entirely\n  if (!AVAILABLE_PLATFORMS.has(tag)) {\n    const available = [...AVAILABLE_PLATFORMS].sort().join(\", \");\n    throw new Error(\n      `CloakBrowser — Pre-built binaries are currently only available for: ${available}.\\n\\n` +\n        `To use CloakBrowser now, set CLOAKBROWSER_BINARY_PATH to a local Chromium binary.`\n    );\n  }\n}\n\n// ---------------------------------------------------------------------------\n// Download URL\n// ---------------------------------------------------------------------------\nexport const DOWNLOAD_BASE_URL =\n  process.env.CLOAKBROWSER_DOWNLOAD_URL ||\n  \"https://cloakbrowser.dev\";\n\nexport const GITHUB_API_URL =\n  \"https://api.github.com/repos/CloakHQ/cloakbrowser/releases\";\n\nexport const GITHUB_DOWNLOAD_BASE_URL =\n  \"https://github.com/CloakHQ/cloakbrowser/releases/download\";","sourceCodeStart":128,"sourceCodeEnd":164,"githubUrl":"https://github.com/CloakHQ/CloakBrowser/blob/d6bad5de261bedf025280ace1d14e800aee13923/js/src/config.ts#L128-L164","documentation":"StealthEvaluationError('<viewport>') is raised in human_scroll_into_view when reading the live window dimensions via world.evaluate(_VIEWPORT_JS) throws. On no_viewport (headed) launches this is the only way to get viewport geometry, and the library refuses any main-world fallback to stay undetected, so a failing isolated-world evaluate surfaces directly.","triggerScenarios":"Headed launch with no_viewport plus a page that is navigating, being closed, or has a crashed/torn-down isolated world at the moment world.evaluate(_VIEWPORT_JS) runs inside human_scroll_into_view.","commonSituations":"Scrolling during or immediately after navigation-triggering clicks in headed mode; race between page.close() and scroll; obfuscated pages that destroy execution contexts; CDP session interruption in remote/browserstack runs.","solutions":["Wait for a stable state (load_state / networkidle or a known selector) before scrolling in no_viewport headed sessions.","Guard with page.is_closed() and a not-None _stealth_world check immediately before the call.","Pass an explicit viewport at launch so the _VIEWPORT_JS path is skipped entirely.","Retry once after a short sleep — transient context teardown is common."],"exampleFix":"// before\n# headed, no_viewport launch\nhuman_scroll_into_view(page, sel, get_box, cfg)\n\n// after\npage.wait_for_load_state(\"domcontentloaded\")\nif getattr(page, \"_stealth_world\", None) is not None and not page.is_closed():\n    human_scroll_into_view(page, sel, get_box, cfg)","handlingStrategy":"retry","validationCode":"if not page.is_closed() and getattr(page, \"_stealth_world\", None) is not None:\n    vp = page._stealth_world.evaluate(_VIEWPORT_JS)\n    assert isinstance(vp, dict) and vp.get('height')","typeGuard":"def viewport_readable(page) -> bool:\n    return (not page.is_closed()) and getattr(page, \"_stealth_world\", None) is not None","tryCatchPattern":"try:\n    human_scroll_into_view(page, sel, get_box, cfg)\nexcept StealthEvaluationError as e:\n    if '<viewport>' not in str(e): raise\n    page.wait_for_load_state('domcontentloaded')\n    human_scroll_into_view(page, sel, get_box, cfg)","preventionTips":["Launch with explicit viewport when possible","Avoid scrolling during navigation in no_viewport headed sessions","Verify the stealth world is attached before geometry-dependent calls"],"tags":["stealth","viewport","evaluation","headed-mode"],"backgroundTag":"page-evaluation-failed","analyzedSha":"d6bad5de261bedf025280ace1d14e800aee13923","analyzedAt":"2026-08-28T14:13:12.918Z","schemaVersion":2},"datasetVersion":"2026-08-28T16:17:29.566Z"}