Closed Bug 1823877 Opened 2 years ago Closed 2 years ago

Network error on fetch() with partially implemented ORB

Categories

(Core :: DOM: Networking, defect, P2)

defect

Tracking

()

VERIFIED FIXED
115 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox111 --- disabled
firefox112 --- disabled
firefox113 --- disabled
firefox114 --- disabled
firefox115 --- verified
firefox116 --- verified

People

(Reporter: bj, Assigned: farre)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: nightly-community, regression, Whiteboard: [necko-triaged])

Attachments

(2 files)

On Nightly before bug 1800658 landed fetch("https://google.com/some", {mode: "no-cors"}) doesn't generate a network error. After the land a network error is generated.

https://developer.mozilla.org/en-US/docs/Web/API/fetch
"A fetch() promise does not reject on HTTP errors (404, etc.)."

Steps to reproduce:

Expected:

  • No network error.

Actual:

  • Network error.

Based on a comment in https://chat.mozilla.org/#/room/#firefox:mozilla.org :
https://matrix.to/#/!OjiTSQTpPWGpfDenKT:mozilla.org/$hyjOR9HFAEhAsaeJeB_VE5Ymwi6_enF_vTLqXDrMybs?via=mozilla.org&via=matrix.org&via=privacytools.io

Duplicate of this bug: 1823864

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

:sefeng, since you are the author of the regressor, bug 1800658, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(sefeng)

Yeah, It raised error because you made an no-cors request that was blocked by https://github.com/annevk/orb.

So this behaviour is expected. One can open the browser console to see which requests were blocked and reason of blockage.

This is currently enabled in Early Beta, so it was not mentioned in the release note. I'll make it sure to mention it when it goes further.

We are still evaluating the web compatibility of ORB, so if there is something that used to work but not working anymore, please let me know.

Flags: needinfo?(sefeng)

I figured this should be marked as WONTFIX. Please feel free to reopen it.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX

I'd like to reopen this. We don't know if the current behavior is web compatible.
Chrome doesn't have this behavior.
Right farre?

Status: RESOLVED → REOPENED
Flags: needinfo?(afarre)
Resolution: WONTFIX → ---

I now think we need to prepare for this at least. Thanks for filing the spec issue.

I think the wisest approach is to add a check in HttpBaseChannel::PerformOpaqueResponseSafelistCheckBeforeSniff to see if we're doing a Window.fetch (and I guess Cache.add), and behind a pref add the behavior to allow the response, but filter it. This way we get a slightly less restrictive ORB, but no data that would become filtered will ever reach the content child process. This also turns out to actually be better for all the cases that ORB allows, but that would become filtered anyway for Window.fetch

Flags: needinfo?(afarre)

We make sure to not send any data to the content process in case of
fetching an opaque resource.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged]
Assignee: nobody → afarre
Attachment #9324726 - Attachment description: WIP: Bug 1823877 - Don't block `Window.fetch` for ORB. → Bug 1823877 - Don't block `Window.fetch` for ORB. r=sefeng!,smaug!
Depends on: 1825373
Attachment #9324726 - Attachment description: Bug 1823877 - Don't block `Window.fetch` for ORB. r=sefeng!,smaug! → Bug 1823877 - Part 1: Don't block `Window.fetch` for ORB. r=sefeng!,smaug!

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

Turns out this didn't really depend on 1825373, it got through ServiceWorkerGlobalScope.fetch just fine. It was that the AudioContext assumes that it would always get a MIME type.

No longer depends on: 1825373

For posterity, ORB is now enabled through early beta by way of bug 1821682.

Blocks: orb
Attachment #9324726 - Attachment description: Bug 1823877 - Part 1: Don't block `Window.fetch` for ORB. r=sefeng!,smaug! → Bug 1823877 - Part 1: Filter opaque results from fetch() in the parent for ORB. r=sefeng!,smaug!
Status: REOPENED → ASSIGNED
Pushed by afarre@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/680c502179c6 Part 1: Filter opaque results from fetch() in the parent for ORB. r=sefeng,smaug,necko-reviewers,edenchuang,valentin https://hg.mozilla.org/integration/autoland/rev/c1a4692a05e3 Part 2: Adjust tests to account for parent filtered responses. r=sefeng,smaug
Status: ASSIGNED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 115 Branch

The patch landed in nightly and beta is affected.
:farre, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox114 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(afarre)

This is behind the early beta flag, so uplifting it to beta isn't necessary to prevent it from reaching release. We want to let this patch ride the trains in the normal tempo.

Flags: needinfo?(afarre)

(In reply to Kagami [:saschanaz] from comment #17)

wontfix then!

Ha, actually it's disabled as atm we don't plan to let ORB ride to release 114. Sorry for the confusing status!
I make it disabled for firefox114 status so it's aligned with how we set status for previous versions, too. :)

Oops, of course 👍

Regressions: 1832821

Reproducible on a 2023-05-07 Nightly build on macOS 12.
Verified as fixed on Firefox 115.0b4(build ID: 20230611180300) and Nightly 116.0a1(build ID: 20230611214645) on macOS 12, Windows 10, Ubuntu 22.

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

Attachment

General

Created:
Updated:
Size: