Closed Bug 1819279 Opened 1 year ago Closed 1 year ago

[netmonitor] Navigator.sendBeacon() HTTP requests show as Blocked/NS_ERROR_ABORT

Categories

(DevTools :: Netmonitor, defect, P2)

Firefox 112
x86_64
macOS
defect

Tracking

(firefox-esr102 unaffected, firefox110 unaffected, firefox111 wontfix, firefox112 verified)

VERIFIED FIXED
112 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox110 --- unaffected
firefox111 --- wontfix
firefox112 --- verified

People

(Reporter: claas, Assigned: bomsy)

References

(Regression)

Details

(Keywords: regression)

Attachments

(3 files)

Attached file send-beacon.html

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.

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.

Component: Netmonitor → Networking
Product: DevTools → Core

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:

  1. You need to use an IP address whose associated region is one where we show placements (e.g. EU, US).
  2. You need to disable your ad-blocker on the site, if you use one.
  3. 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.

Set release status flags based on info from the regressing bug 1803546

Severity: -- → S3
Priority: -- → P2

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.

Assignee: nobody → hmanilla
Attachment #9320548 - Attachment description: WIP: Bug 1819279 - [devtools] Switch to a block list of known errors to block → Bug 1819279 - [devtools] Switch to a block list of known errors instead of an ignore list r=jdescottes
Status: NEW → ASSIGNED
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

: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?

Flags: needinfo?(hmanilla)
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch

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
Flags: needinfo?(hmanilla)
Attachment #9320548 - Flags: approval-mozilla-beta?

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

Flags: needinfo?(hmanilla)
Attachment #9320548 - Flags: approval-mozilla-beta? → approval-mozilla-beta-

Thanks Donal,
Thats fine with me. The issue mentioned in the comment in Bug 1820200 is valid and will get fixed.

Flags: needinfo?(hmanilla)
Flags: qe-verify+

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.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: