Closed Bug 1944472 Opened 1 year ago Closed 1 year ago

fetch keep-alive is not attributed to the parent browsing context

Categories

(Core :: DOM: Networking, defect)

Firefox 134
defect

Tracking

()

RESOLVED DUPLICATE of bug 1926294

People

(Reporter: aslushnikov, Unassigned)

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Steps to reproduce:

Hi folks! We're coming here from the downstream bug in Playwright: https://github.com/microsoft/playwright/issues/34497

Repro:

  1. In Firefox 134, navigate to https://example.com
  2. Open DevTools Console
  3. evaluate await fetch('/?fetch-keep-alive', { keepalive: true })
  4. check DevTools network panel.

ACTUAL: request does not show up in devtools
EXPECTED: request shows up in devtools.

notes

Firefox M133 enabled keep-alive fetch by default. However, the nsHttpChannel instances for these requests do not carry attribution to their relevant browsing context. As a result, Playwright cannot report these requests in its API, because it requires frame information for them.

Probably for the same reason, these requests do not show up in the DevTools Network panel.

I'm not sure if this is anyhow helpful, but there's a speculative fix to add associated browsing context to these requests which looks like this: https://github.com/aslushnikov/juggler/commit/30b05ab1132a6023c4a281bf568496f05c4381c8

Note that this fix (ab)uses the workerAssociatedBrowsingContextId to store the association for the keep-alive fetch requests with their parent frames.

The Bugbug bot thinks this bug should belong to the 'Core::DOM: Networking' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: Networking
Product: Firefox → Core
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1926294
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.