[netmonitor] Navigator.sendBeacon() HTTP requests show as Blocked/NS_ERROR_ABORT
Categories
(DevTools :: Netmonitor, defect, P2)
Tracking
(firefox-esr102 unaffected, firefox110 unaffected, firefox111 wontfix, firefox112 verified)
Tracking | Status | |
---|---|---|
firefox-esr102 | --- | unaffected |
firefox110 | --- | unaffected |
firefox111 | --- | wontfix |
firefox112 | --- | verified |
People
(Reporter: claas, Assigned: bomsy)
References
(Regression)
Details
(Keywords: regression)
Attachments
(3 files)
640 bytes,
text/html
|
Details | |
73.51 KB,
image/png
|
Details | |
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta-
|
Details | Review |
What were you doing?
Opened https://developer.mozilla.org/en-US/docs/Web with the Netmonitor open.
What happened?
Noticed that HTTP POST requests triggered by Navigator.sendBeacon()
(here: /ping/viewed?code=...
) show up as "Blocked" with NS_ERROR_ABORT
as the explanation (Transferred column) in the Netmonitor, even though the request went through and response headers show up in the details tab.
What should have happened?
The HTTP POST requests should show up as successful with their real status code.
Anything else we should know?
The MDN client code is here: https://github.com/mdn/yari/blob/427117c0bd4011d36ad898a362405f71a82fc6b0/client/src/document/organisms/toc/placement.tsx#L36-L42
:julienw had a look and pointed me at https://searchfox.org/mozilla-central/rev/aa3ccd258b64abfd4c5ce56c1f512bc7f65b844c/dom/base/Navigator.cpp#1123-1128, which may be the explanation.
Reporter | ||
Comment 1•2 years ago
|
||
Assignee | ||
Comment 2•2 years ago
•
|
||
Thanks for reporting.
Opened https://developer.mozilla.org/en-US/docs/Web with the Netmonitor open.
I'm do not seem to be seeing the beacon requests, is there something i'm missing?
:julienw had a look and pointed me at https://searchfox.org/mozilla-central/rev/aa3ccd258b64abfd4c5ce56c1f512bc7f65b844c/dom/base/Navigator.cpp#1123-1128, which may be the explanation.
Based this, this might be more a necko issue.
Reporter | ||
Comment 3•2 years ago
|
||
You should be able to reproduce the issue with the attached HTML file.
Otherwise, on MDN, there are indeed some requirements to see the beacon request:
- You need to use an IP address whose associated region is one where we show placements (e.g. EU, US).
- You need to disable your ad-blocker on the site, if you use one.
- You need to either see the desktop version - with the table of contents on the right and the ad visible below - or see the mobile version and toggle the sidebar and scroll to where the ad is.
Hope that helps.
Comment 4•2 years ago
|
||
Mozregression points to this as a cause.
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=4fcb7c2dd6ff5e68b4a89210ad5285f3f2cc0ab7&tochange=b3781b8653a1c63ec11880cead9bae11c868c98f
Comment 5•2 years ago
|
||
Set release status flags based on info from the regressing bug 1803546
Assignee | ||
Comment 6•2 years ago
|
||
Ahh thanks Valentin. makes sense. We'll need to white list that error in https://searchfox.org/mozilla-central/rev/a2d875255c67e39b28d59a0996e8b54fa2d7564e/devtools/shared/network-observer/NetworkUtils.sys.mjs#486-494
Updated•2 years ago
|
Assignee | ||
Comment 7•2 years ago
|
||
This patch switches from an ignore list of errors to a block list of the errors
we clearly want to block. We are likely going to regress a lot by missing errors from the ignore list
which shouldn't be blocked as revealed by this BUG. Instead let just block the errors we know about and
let other erros through as most of them are shown with error codes and do not need to be blocked.
Updated•2 years ago
|
Pushed by hmanilla@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1440eb683cd1 [devtools] Switch to a block list of known errors instead of an ignore list r=jdescottes
Comment 9•2 years ago
|
||
:bomsy the final 111 beta builds on 2022-03-02.
Can you consider an uplift request on this when ready or should it ride the trains?
Comment 10•2 years ago
|
||
bugherder |
Assignee | ||
Comment 11•2 years ago
|
||
Comment on attachment 9320548 [details]
Bug 1819279 - [devtools] Switch to a block list of known errors instead of an ignore list r=jdescottes
Beta/Release Uplift Approval Request
- User impact if declined: Users will see wrongly blocked requests which are sent from
Navigator.sendBeacon
. - Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: None
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): Small fix, that also avoids regressing other issues.
- String changes made/needed:
- Is Android affected?: Unknown
Comment 12•2 years ago
|
||
Comment on attachment 9320548 [details]
Bug 1819279 - [devtools] Switch to a block list of known errors instead of an ignore list r=jdescottes
Rejecting uplift request - see https://bugzilla.mozilla.org/show_bug.cgi?id=1820200#c3
:bomsy we could consider this as a ride along in a dot release, if the understanding of the risk/impact is well understood.
For the moment, I see there's some uncertainty in Bug 1820200
Assignee | ||
Comment 13•2 years ago
|
||
Thanks Donal,
Thats fine with me. The issue mentioned in the comment in Bug 1820200 is valid and will get fixed.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 14•2 years ago
•
|
||
I have reproduced this issue with an affected Nightly build (2023-02-28) on macOS 11.
The issue is verified as fixed on Beta 112.0b2 with the following platforms: Win 11 x64, macOS 11 and Ubuntu 18.04 x64.
Description
•