fix: block service worker registrations for blocked URLs (upstream #15135)#3490
Open
kblok wants to merge 2 commits into
Open
fix: block service worker registrations for blocked URLs (upstream #15135)#3490kblok wants to merge 2 commits into
kblok wants to merge 2 commits into
Conversation
…RLs (upstream #15135) Configures network conditions on the service worker session before releasing it from the debugger pause, so the main script fetch respects the block/allow list. Without this, service workers registered from a blocked URL would succeed because the network conditions were never applied to the SW session. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l.json These tests have no entry in upstream Puppeteer's TestExpectations.json or CanaryTestExpectations.json, so they don't belong in upstream.json. Moved to local.json with a note that the feature requires Chrome >= 149. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Service workers registered from a blocked URL weren't actually failing — the network conditions were never applied to the SW's CDP session. Now when a service worker target is attached and its URL is blocked, we set up the network block/allow list on the SW session before releasing it from the debugger pause. This causes the browser to reject the service worker registration.
Two new tests cover the blocklist and allowlist cases. Both are marked as expected failures until PuppeteerSharp upgrades to Chrome 149, which is when this behavior became reliable.
Upstream: puppeteer/puppeteer#15135