[nsIStreamListener.onStartRequest] WebRequest.jsm:340 error

RESOLVED WONTFIX

Status

RESOLVED WONTFIX
a year ago
4 months ago

People

(Reporter: jkt, Unassigned)

Tracking

54 Branch
x86_64
Linux

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

a year ago
I am seeing the following in my browser console for our test pilot.

NS_BINDING_ABORTED: Component returned failure code: 0x804b0002 (NS_BINDING_ABORTED) [nsIStreamListener.onStartRequest]  WebRequest.jsm:340

We also have an onCompleted webRequest handler too but I suspect it is the above.

I only start to see this error when {cancel: true} is active for the website.

STR:
1. (using test pilot extension)
2. Open browser console and filter by "WebRequest"
3. Leave a about:newtab page open
4. Open google tab in work
5. Switch between a new tab and work

At step 4. I get the error randomly appearing, it doesn't seem related to any of the code we have... I think.


If it is, it will likely be this method:

    browser.webRequest.onBeforeRequest.addListener((options) => {
      if (options.frameId !== 0 || options.tabId === -1) {
        return {};
      }
      return Promise.all([
        browser.tabs.get(options.tabId),
        this.storageArea.get(options.url)
      ]).then(([tab, siteSettings]) => {
        const userContextId = this.getUserContextIdFromCookieStore(tab);
        if (!siteSettings
            || userContextId === siteSettings.userContextId
            || tab.incognito) {
          return {};
        }
        // More code here...
      }).catch((e) => {
        throw e;
      });
    },{urls: ["<all_urls>"], types: ["main_frame"]}, ["blocking"]);


This may be a dupe of Bug 1333141
This is an unfortunate side-effect of the way XPConnect error reporting happens, but we can't do anything about it. This error is from the original stream listener that we're wrapping, but when we propagate it up the chain, it gets reported as it crosses an XPConnect boundary.
Status: NEW → RESOLVED
Last Resolved: a year ago
Resolution: --- → WONTFIX
(Reporter)

Comment 2

a year ago
Ah, thanks for the explanation all the same!

Updated

4 months ago
Product: Toolkit → WebExtensions
You need to log in before you can comment on or make changes to this bug.