CloakHQ/CloakBrowser · error · StealthEvaluationError
Isolated-world DOM evaluation failed for ${selector}
Error message
Isolated-world DOM evaluation failed for ${selector} What it means
Thrown by stealthActionable when the isolated-world evaluation of the actionability probe returns EVALUATION_FAILED (or an unexpected status/missing data). It means the injected script ran but the DOM read itself errored, so the library cannot vouch for the element's state.
Source
Thrown at js/src/human/actionability.ts:116
const idx = Math.min(attempt, BACKOFF_MS.length - 1);
return new Promise(resolve => setTimeout(resolve, BACKOFF_MS[idx]));
}
// ---------------------------------------------------------------------------
// Pre-scroll actionability
// ---------------------------------------------------------------------------
async function stealthActionable(
pageOrFrame: Page | Frame,
selector: string,
checks: ReadonlySet<CheckName>,
): Promise<void> {
const world = getWorld(pageOrFrame);
if (!world) throw new StealthWorldUnavailableError();
const { status, data } = await evalParsed(world, buildActionableJs(selector));
if (status === UNSUPPORTED) throw new UnsupportedHumanizeSelectorError(selector);
if (status === EVALUATION_FAILED) throw new StealthEvaluationError(selector);
if (status === NOT_FOUND) throw new ElementNotAttachedError(selector);
if (status !== OK || !data) throw new StealthEvaluationError(selector);
if (checks.has('visible') && !data.visible) throw new ElementNotVisibleError(selector);
if (checks.has('enabled') && !data.enabled) throw new ElementNotEnabledError(selector);
if (checks.has('editable') && !data.editable) throw new ElementNotEditableError(selector);
}
async function readBox(
pageOrFrame: Page | Frame,
selector: string,
): Promise<{ x: number; y: number; width: number; height: number } | null> {
const world = getWorld(pageOrFrame);
if (!world) throw new StealthWorldUnavailableError();
const { status, data } = await evalParsed(world, buildBoxJs(selector));
if (status === OK && data?.box) return data.box;
if (status === NOT_FOUND) return null;
if (status === UNSUPPORTED) throw new UnsupportedHumanizeSelectorError(selector);View on GitHub (pinned to d6bad5de26)
Solutions
- Retry the action — transient navigation/DOM races often clear on the next attempt
- Verify the page is not navigating while the action runs (await waitForLoadState or a stable selector)
- If it reproduces deterministically, test the same selector in the page console; if Playwright's native locator works, pass humanize:false to bypass the isolated-world probe
- Check for iframe/frame confusion — ensure you pass the correct Page or Frame to the humanized API
Example fix
// before
await humanClick(page, '#submit');
// after
await page.waitForLoadState('networkidle');
await humanClick(page, '#submit', { humanize: false }); // fallback if world is flaky Defensive patterns
Strategy: retry
Validate before calling
await page.waitForLoadState('domcontentloaded'); // avoid evaluating mid-navigation Type guard
function isStealthEvaluationError(e: unknown): e is StealthEvaluationError {
return e instanceof Error && /Isolated-world DOM evaluation failed/.test(e.message);
} Try / catch
try { await humanClick(page, sel); } catch (e) { if (isStealthEvaluationError(e)) { await page.waitForTimeout(250); await humanClick(page, sel); } else throw e; } Prevention
- Stabilize the page (waitForLoadState) before humanized actions
- Avoid triggering actions mid-navigation
- Keep a humanize:false fallback path for flaky pages
When it happens
Trigger: Calling ensureActionable (directly or via humanClick/humanType/humanFill etc.) when evalParsed(world, buildActionableJs(selector)) returns status === EVALUATION_FAILED, or status !== OK, or data is falsy after the OK check.
Common situations: Page navigating or context destroyed mid-evaluation, SPA tearing down DOM while the probe runs, JS exceptions inside the isolated world (e.g. CSP or extension interference), or a corrupted/stale isolated world after a frame detach.
Related errors
- Invalid browser version pin. Use a full numeric Chromium ver
- Unsupported platform: ${platform} ${arch}. Supported: ${supp
- 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/8f4e6a0383591787.
Report an issue: GitHub.