CloakHQ/CloakBrowser · error · Error
Unsupported platform: ${platform} ${arch}. Supported: ${supp
Error message
Unsupported platform: ${platform} ${arch}. Supported: ${supported} What it means
StealthWorldUnavailableError is raised inside human_scroll_into_view (scroll.py:107) when page._stealth_world is None. This happens on headed launches with no_viewport=True: page.viewport_size is None, so the code must read live window geometry through the isolated world, and if that world was never attached (stealth mode disabled or the page predates it), the error propagates.
Source
Thrown at js/src/config.ts:107
export function getChromiumVersion(): string {
const tag = getPlatformTag();
return PLATFORM_CHROMIUM_VERSIONS[tag] ?? CHROMIUM_VERSION;
}
export function getPlatformTag(): string {
const platform = process.platform;
const arch = process.arch;
// Map Node.js platform/arch to our tag format
let key: string;
if (platform === "linux" && arch === "x64") key = "linux-x64";
else if (platform === "linux" && arch === "arm64") key = "linux-arm64";
else if (platform === "darwin" && arch === "arm64") key = "darwin-arm64";
else if (platform === "darwin" && arch === "x64") key = "darwin-x64";
else if (platform === "win32" && arch === "x64") key = "win32-x64";
else {
const supported = Object.values(SUPPORTED_PLATFORMS).join(", ");
throw new Error(
`Unsupported platform: ${platform} ${arch}. Supported: ${supported}`
);
}
return SUPPORTED_PLATFORMS[key]!;
}
// ---------------------------------------------------------------------------
// Binary cache paths
// ---------------------------------------------------------------------------
export function getCacheDir(): string {
const custom = process.env.CLOAKBROWSER_CACHE_DIR;
if (custom) return custom;
return path.join(os.homedir(), ".cloakbrowser");
}
export function getBinaryDir(version?: string, pro = false): string {
const suffix = pro ? "-pro" : "";View on GitHub (pinned to d6bad5de26)
Solutions
- Launch the page through the stealth launcher so _stealth_world is attached before any humanized scroll call.
- Pass an explicit viewport at launch (headless or headed with viewport=...) so the no_viewport code path is never taken.
- Verify getattr(page, '_stealth_world', None) is not None before calling human_scroll_into_view; if None, re-attach the stealth world or recreate the page.
Example fix
// before
page = browser.new_page() # plain page, no stealth world
human_scroll_into_view(page, sel, get_box, cfg)
// after
page = stealth_browser.new_page(viewport={'width': 1280, 'height': 800})
human_scroll_into_view(page, sel, get_box, cfg) Defensive patterns
Strategy: validation
Validate before calling
world = getattr(page, "_stealth_world", None)
if world is None:
raise RuntimeError("stealth world not attached; launch via stealth launcher") Type guard
def has_stealth_world(page) -> bool:
return getattr(page, "_stealth_world", None) is not None Try / catch
try:
human_scroll_into_view(page, sel, get_box, cfg)
except StealthWorldUnavailableError:
page = stealth_context.new_page(viewport={'width':1280,'height':800})
# redo work on stealth page Prevention
- Always create pages through the stealth launcher
- Pass an explicit viewport in headed mode to skip the no_viewport path
- Never mix plain Playwright pages with humanized scroll helpers
When it happens
Trigger: Calling human_scroll_into_view on a page launched with no_viewport (headed mode) where the stealth isolated world is missing — e.g. humanization used on a non-stealth context, a page created before stealth attach, or the world attribute cleared after teardown.
Common situations: Mixing stealth and plain Playwright contexts; disabling stealth mode but still calling humanized scroll helpers; headed default launch (no_viewport) combined with a stripped-down launcher; version change that stopped attaching _stealth_world eagerly.
Related errors
- CloakBrowser — Pre-built binaries are currently only availab
- Invalid browser version pin. Use a full numeric Chromium ver
- CloakBrowser Pro: license could not be validated (server unr
- Download completed but binary not found at expected path: ${
- Pro download completed but binary not found at: ${getBinaryP
AI-assisted analysis of CloakHQ/CloakBrowser@d6bad5de26 (2026-08-28).
Data as JSON: /api/errors/417a9950ac72e891.
Report an issue: GitHub.