You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: response.allHeaders() hangs for Worker script loaded inside an iframe (Chromium only) #39948
Clone the repo: git clone https://github.com/adi-benz/playwright-ww-iframe-hang-bug.git
npm install
npx playwright install chromium
node repro.js
Observe that response.allHeaders() hangs indefinitely on the /worker.js request
The bug requires the combination of an iframe + Web Worker
Expected behavior
I expect the call to response.allHeaders() on line 38 to return the headers, but it's stuck indefinitely.
I expect to be able to read the headers after I get a callback from page.on('requestfinished').
I noticed that to reproduce this bug there needs to be a combination of an iframe + Web Worker, two additional scripts are provided in the Git repo to show that:
working-firefox.js - same setup but using Firefox instead of Chromium → no hang
Actual behavior
The call to response.allHeaders() hangs on Chromium, output shows:
HUNG after 5s on: http://localhost:39145/worker.js
ERROR: response.allHeaders: Target page, context or browser has been closed
Thanks for the report and for the pointer to the PlzDedicatedWorker regression path. I reproduced this locally on macOS arm64 against current main and have a small patch that keeps the existing extra-info behavior for normal requests, but falls back to provisional raw headers when a worker-main-script request finishes in a worker-frame session without matching extra-info events.
Local validation:
focused regression fails without the source fix and passes with it
npm run ctest -- tests/page/workers.spec.ts --workers=1 --reporter=line
npm run ctest -- tests/page/page-network-response.spec.ts --workers=1 --reporter=line
npm run lint
I noticed the contribution policy asks contributors to wait for assignment or explicit community approval before opening a PR, so I’ll wait rather than open one unsolicited. Happy to send the patch if maintainers want it.
Activity
Skn0tt commentedon Mar 31, 2026
This regressed in #34400, so it seems similar to #35678. Dmitry Gozman (@dgozman) could you take a look?
scarab-systems commentedon Jun 10, 2026
Thanks for the report and for the pointer to the PlzDedicatedWorker regression path. I reproduced this locally on macOS arm64 against current
mainand have a small patch that keeps the existing extra-info behavior for normal requests, but falls back to provisional raw headers when a worker-main-script request finishes in a worker-frame session without matching extra-info events.Local validation:
npm run ctest -- tests/page/workers.spec.ts --workers=1 --reporter=linenpm run ctest -- tests/page/page-network-response.spec.ts --workers=1 --reporter=linenpm run lintI noticed the contribution policy asks contributors to wait for assignment or explicit community approval before opening a PR, so I’ll wait rather than open one unsolicited. Happy to send the patch if maintainers want it.
dgozman commentedon Jun 25, 2026
Upstream fix: https://chromium-review.googlesource.com/c/chromium/src/+/8003476
scarab-systems commentedon Jun 25, 2026
Thanks, that makes sense. I’ll stand down on the Playwright-side patch and watch for the Chromium fix to flow through.