Repository navigation
Fix debugger attach with extensions that require networkPolicy - #56
Open
colthreepv wants to merge 1 commit into
Open
colthreepv wants to merge 1 commit into
colthreepv wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Debugger attach fails with Chrome extension version
1.26.1102.11740:The bridge sends
attachwith onlytabId. The extension now passesnetworkPolicyto its policy manager, which readstimeoutMsandconstraintswithout checking whether the object exists.Tab discovery and creation still work, so a healthy transport does not reveal this failure.
Fix
Send an explicit policy with no constraints:
{ "tabId": 123, "networkPolicy": { "constraints": [] } }Empty constraints preserve the bridge's existing unrestricted networking behavior. In the tested extension, this policy installs no network rules.
Route user-tab claim attachment through the same client helper so both attach paths send the required object. Add regression coverage for the claim path and payload assertions in existing attach tests.
Verification
Reproduced the failure on an isolated tab in Chrome on Windows, using the same session for both requests:
networkPolicyfailed with the error above.Runtime.evaluatecall returned2for1 + 1.Tested the debug build, release build, and installed CLI against the same Chrome instance. Each completed tab creation, navigation to
https://example.com/, a DOM snapshot containingExample Domain, and turn finalization.The extension was not modified. Chrome was not restarted.
All checks passed: