Repository navigation
Conversation
Official Chrome and Chromium-for-Testing builds, at least 150 and 154, report masked values where CDP consumers expect URLs: Page.getFrameTree returns ':' or '' as the main-frame URL with securityOrigin '://', Page.getNavigationHistory returns empty strings, DOMSnapshot documents carry no documentURL, and the storage agents reject or stall on every otherwise-valid request. Every origin gate rejected these targets as out of scope, so inspect_web_page failed on the first call. Scope resolution now falls back to the target URL that authorizeCdpTarget already gated the attach on whenever a frame-tree URL carries no URL evidence at all, while a parsed but out-of-scope origin still rejects. The recovery covers the discovery and capture gates, the root frame, the attached and completed main-frame URLs, and the leading DOM document; storage probes disclose browser-side rejections as limitations and skip the deeper fingerprint probes whose discovery already failed.
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
The masked-frame fallback returned on the first placeholder read, but ':' is also the pre-commit transitional value, so committed navigations landed on the target URL and failed as target_changed. Fall back only once the commit wait is exhausted, which a masked build never satisfies. Narrow storageOptionalCommand to the frame-not-found rejection family so protocol failures stay fatal, and restore the dropped await on captureJsonResponseBodies whose pending body fetch surfaced as disconnected during session close.
'Frame not found for the given storage id' does not contain the substring 'frame found', so the first probe still threw protocol_error. Match on frame and found separately to cover all three wordings the masked storage agents use.
|
The earlier red CI was on me, three separate causes, all fixed in 6ff26b2 and 08a6aab:
Reran the real lane against the masked CfT 154 build locally: capture now completes through frames, DOM, storage and network, stopping exactly at the script metadata assertion noted above, which is the part left open for your call. |
|
TL;DR: The latest head,
Both browsers are at 154.0.8037.57. The Chromium license is BSD-3-Clause. The only change from Browser unit tests,
Your 03:48Z commit also covers the storage message I saw from Chromium 154. It was Neither browser here masks URLs. So the masked path never ran. More on that is in #1384. Not run:
Thanks, BaaRai, for the quick fixes. The first head and what changedOn
Storage messagesI checked all three messages against the new rule. The rule is code -32000 or -32602, and the text holds both "frame" and "found".
I saw the first two live from Chromium 154. The third is the one you quoted. My probe did not get that error here. CommandsTest setup
🤖 Generated with Claude Code (Opus 5.5) 🦊 |
|
Closing in favor of #1432. The premise of this PR was wrong: the frame tree was not carrying masked URLs, the page had never loaded at all, because headless Chrome stalled on a reachable-but-locked desktop keyring over the session bus (full chain on #1384). The fallbacks here would authorize capturing an uncommitted about:blank against the attach-authorized target URL, which is fail-open against that failure mode. Keeping REA strict when the frame never commits is the right call; the launchers now pass --password-store=basic so verification browsers cannot hit the stall. Thanks for the CI feedback, the three follow-up fixes (commit-wait exhaustion, frame-not-found wording, dropped await) were correct but landed in the wrong premise. |
Implements the recovery described in #1384 at the gating surfaces. Linking the issue for the full protocol matrix; summary below.
Summary
Official Chrome and Chromium-for-Testing builds, at least 150 and 154, report masked values where CDP consumers expect URLs:
Page.getFrameTreereturns":"(150) or""(154) as the main-frame URL withsecurityOrigin: "://",Page.getNavigationHistoryreturns empty strings,DOMSnapshotdocuments carry no documentURL, and the storage agents reject or stall on every otherwise-valid request. Fedora's distro build of 154 reports real URLs, which is why this only reproduces on official builds. Every origin gate rejected these targets as out of scope, soinspect_web_pagefailed on the first call withtarget_not_allowed.Scope resolution now falls back to the target URL that
authorizeCdpTargetalready gated the attach on, but only when a frame-tree URL carries no URL evidence at all; a parsed but out-of-scope origin still rejects, and parseable non-HTTP pages such asabout:blankkeep their existing wait semantics.Problem and expected behavior
Smallest trigger:
inspect_web_page(ornpm run verify:browser) against any official Chrome-family build with an allowed origin. Reproduced on Kali Chromium 150.0.7871.181, Chrome-for-Testing 150.0.7871.124, and Chrome-for-Testing 154.0.8037.57; each rejected atauthorizedMainFrameor the discovery gate before any capture.Violated invariant: absence of URL evidence was treated as out-of-scope evidence. A frame tree that reports no parseable URL cannot prove the target left the authorized scope, and the attach was already authorized against the target URL, so rejecting discards an authorized observation without a contradicting fact.
Change and scope
CdpCaptureValues.ts:isUnparseableFrameUrlrecognizes the masked placeholders (":", the empty string) while treating an absent field and parseable non-HTTP URLs as before.CdpWebMcpDiscovery.ts: both gates resolve throughauthorizedMainFrameUrl, which falls back to the attach-authorized target URL only for URL-less evidence.CdpAuthorizedMainFrame.ts: the same fallback ends the 80-poll wait that could never succeed; parseable non-HTTP URLs keep waiting.CdpCaptureDocuments.ts:captureFramesrecovers the root frame from the authorized target URL (child frames are unaffected);resolvedMainFrameUrlprovides the attached/completed main-frame URLs, which previously crashednew URL(":")incaptureStorage;captureDomrecovers the leading DOM document's URL the same way.CdpPageCapture.ts: threads the authorized target URL to the call sites above.CdpCaptureStorage.ts: storage probes disclose browser-side command rejections as limitations (matching the sibling optional-command semantics) and skip the deeper fingerprint probes once their own discovery was unavailable, which also removes the stall where a fingerprint probe never responds.Intentionally not included: the script and resource capture surfaces filter by masked URLs the same way and remain excluded with disclosed reasons on masked builds; finishing them is mechanical per surface or a unified authorized-origin pass, whichever you prefer. No contract or schema changes; the allowlist enforcement is unchanged, only its URL source when the frame tree reports none.
Contract and boundary impact
Evidence and regression coverage
--headless=new:inspect_web_pagefailstarget_not_allowedat the first gate on all three official builds; unmodified main also failsverify:browseron Chrome-for-Testing 154.Target.getTargetInfoand the/jsonendpoint still report real URLs, which is what the fallback uses.npm run check:fastpasses.inspect_web_pagereturns complete observations on official Chrome builds instead oftarget_not_allowed; masked storage dimensions appear as disclosed limitations.