Skip to content

fix: block service worker registrations for blocked URLs (upstream #15135)#3490

Open
kblok wants to merge 2 commits into
masterfrom
implement-upstream-change-15135
Open

fix: block service worker registrations for blocked URLs (upstream #15135)#3490
kblok wants to merge 2 commits into
masterfrom
implement-upstream-change-15135

Conversation

@kblok

@kblok kblok commented Jun 23, 2026

Copy link
Copy Markdown
Member

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

kblok and others added 2 commits June 23, 2026 17:10
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant