Closed Bug 1877438 Opened 5 months ago Closed 5 months ago

"network.fetchError" event is not sent when "fetch" request gets immediately aborted

Categories

(Remote Protocol :: WebDriver BiDi, defect, P2)

defect
Points:
2

Tracking

(firefox124 fixed)

RESOLVED FIXED
124 Branch
Tracking Status
firefox124 --- fixed

People

(Reporter: whimboo, Assigned: jdescottes)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [webdriver:m10], [wptsync upstream])

Attachments

(2 files)

There is the following Puppeteer test which loads a page and triggers a fetch request by clicking a button:
https://github.com/puppeteer/puppeteer/blob/b99d478cd48adc261878836e04eac55ecc2890f2/test/src/page.spec.ts#L921-L935
https://github.com/puppeteer/puppeteer/blob/main/test/assets/abort-request.html

Hereby the fetch request gets immediately aborted via an AbortController. When using Chrome the network.fetchError event is correctly sent out but in Firefox we only raise a log.entryAdded error for the abort() call. I recorded a Gecko Profile for this test and as it looks like this specific network request still awaits a response.

https://share.firefox.dev/3Shy0bd

Not sure if that is related to some of our code or at the network layer.

Flags: needinfo?(jdescottes)
Priority: -- → P2
Whiteboard: [webdriver:m10]

Requests which are blocked really do not receive further updates after the creation of the network event. DevTools handles this use case specifically at https://searchfox.org/mozilla-central/rev/896042a1a71066254ceb5291f016ca3dbca21cb7/devtools/server/actors/resources/network-events.js#318-325

We can probably do the same in NetworkEventRecord.

Flags: needinfo?(jdescottes)
Assignee: nobody → jdescottes
Status: NEW → ASSIGNED
Severity: -- → S3
Points: --- → 2
Pushed by jdescottes@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/709e6b31df0f
[bidi] Emit fetchError event for requests blocked early r=webdriver-reviewers,whimboo
https://hg.mozilla.org/integration/autoland/rev/bd25bd316fa4
[wdspec] Add test for early fetchError events r=webdriver-reviewers,whimboo
Created web-platform-tests PR https://github.com/web-platform-tests/wpt/pull/44485 for changes under testing/web-platform/tests
Whiteboard: [webdriver:m10] → [webdriver:m10], [wptsync upstream]
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 124 Branch

Reminder to move https://github.com/puppeteer/puppeteer/pull/11867 out of draft status when the patch is in Nightly.

Flags: needinfo?(jdescottes)
Upstream PR merged by moz-wptsync-bot
Upstream PR merged by moz-wptsync-bot
Flags: needinfo?(jdescottes)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: