NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUrlClassifierBlockedChannel.topLevelUrl] trackingProtection.js:41
Categories
(Web Compatibility :: Interventions, defect, P3)
Tracking
(Not tracked)
People
(Reporter: robwu, Unassigned)
References
Details
bug 1658673 shows that it is possible to get the following error
NS_ERROR_FAILURE: Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIUrlClassifierBlockedChannel.topLevelUrl] trackingProtection.js:41
observe jar:file:///opt/firefox-nightly/browser/features/webcompat@mozilla.org.xpi!/experiment-apis/trackingProtection.js:41
NS_ERROR_FAILURE is indeed a potential error from https://searchfox.org/mozilla-central/rev/23dd7c485a6525bb3a974abeaafaf34bfb43d76b/netwerk/url-classifier/ChannelClassifierService.cpp#97,105,113,118
From the code, it seems that a potential way to trigger the issue is to send a request from context that isn't a browsing context. Bug 1658673 is an example, here is another minimal example:
STR
- Set Tracking Protection to strict at
about:preferences-> Privacy. - Run the following code snippet from e.g. example.com:
new Worker(`data:,fetch("https://pbs.twimg.com/", {mode: "no-cors"})`);
- Look at the global JS console
Expected:
- No error (besides
TypeError: NetworkError when attempting to fetch resource.to indicate that the request was blocked by Tracking Protection)
Actual:
- The error from above,
... (NS_ERROR_FAILURE) [nsIUrlClassifierBlockedChannel.topLevelUrl] trackingProtection.js:41 ...
Comment 1•5 years ago
|
||
Tom, can you take a look please?
Comment 2•5 years ago
|
||
Fixed with the in the parent bug (https://bugzilla.mozilla.org/attachment.cgi?id=9175540).
Description
•