Closed Bug 1660108 Opened 5 years ago Closed 5 years ago

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)

RESOLVED FIXED

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

at https://searchfox.org/mozilla-central/rev/6cc48251bb97600fdf11a5b4c5f621bfc8606d55/browser/extensions/webcompat/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

  1. Set Tracking Protection to strict at about:preferences -> Privacy.
  2. Run the following code snippet from e.g. example.com:
new Worker(`data:,fetch("https://pbs.twimg.com/", {mode: "no-cors"})`);
  1. 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 ...

Tom, can you take a look please?

Blocks: 1649244
Severity: -- → S3
Flags: needinfo?(twisniewski)
Priority: -- → P3

Fixed with the in the parent bug (https://bugzilla.mozilla.org/attachment.cgi?id=9175540).

Status: NEW → RESOLVED
Closed: 5 years ago
Flags: needinfo?(twisniewski)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.