Network error on fetch() with partially implemented ORB
Categories
(Core :: DOM: Networking, defect, P2)
Tracking
()
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:
- Open the console and run this command: fetch("https://google.com/some", {mode: "no-cors"})
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
Comment 2•2 years ago
|
||
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.
Updated•2 years ago
|
Comment 3•2 years ago
|
||
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.
Comment 4•2 years ago
|
||
I figured this should be marked as WONTFIX. Please feel free to reopen it.
Comment 5•2 years ago
|
||
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?
Assignee | ||
Comment 6•2 years ago
|
||
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
Assignee | ||
Comment 7•2 years ago
|
||
We make sure to not send any data to the content process in case of
fetching an opaque resource.
Updated•2 years ago
|
Updated•2 years ago
|
Comment hidden (Intermittent Failures Robot) |
Updated•2 years ago
|
Updated•2 years ago
|
Assignee | ||
Comment 9•2 years ago
|
||
Depends on D173454
Comment 10•2 years ago
|
||
Set release status flags based on info from the regressing bug 1800658
Assignee | ||
Comment 11•2 years ago
|
||
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.
Comment 12•2 years ago
|
||
For posterity, ORB is now enabled through early beta by way of bug 1821682.
Updated•2 years ago
|
Updated•2 years ago
|
Comment 13•2 years ago
|
||
Comment 14•2 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/680c502179c6
https://hg.mozilla.org/mozilla-central/rev/c1a4692a05e3
Comment 15•2 years ago
|
||
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
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 16•2 years ago
|
||
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.
Comment 17•2 years ago
|
||
wontfix
then!
Comment 18•2 years ago
•
|
||
(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. :)
Comment 19•2 years ago
|
||
Oops, of course 👍
Updated•2 years ago
|
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.
Description
•