15

During development of my browser extension I faced with that error. What it could be? I found this message in the source code of Firefox:

  getContextById(childId) {
    let context = this.proxyContexts.get(childId);
    if (!context) {
      let error = new Error("WebExtension context not found!");
      Cu.reportError(error);
      throw error;
    }
    return context;
  }

But still have no idea what bad with my extension - it works as usual, in Google Chrome too.

Bharathvaj Ganesan
  • 3,054
  • 1
  • 18
  • 32
Vitaly Zdanevich
  • 13,032
  • 8
  • 47
  • 81
  • Same problem, and my script stops working. I'm using Firefox. – Yan King Yin Nov 02 '18 at 16:00
  • Is it this? https://bugzilla.mozilla.org/show_bug.cgi?id=1447806 – Κωλζαρ Feb 02 '19 at 17:55
  • I found the [same problem in a different file](https://dxr.mozilla.org/mozilla-central/source/toolkit/components/extensions/ExtensionParent.jsm#1009). Not sure how to get a stack trace from my extension's code into Firefox's JSM code. The following bugs mention this error: [1390715](https://bugzilla.mozilla.org/show_bug.cgi?id=1390715) and [1447806](https://bugzilla.mozilla.org/show_bug.cgi?id=1447806) (as koλzar mentioned earlier). – matatk Apr 01 '19 at 09:14
  • I'm experiencing this with https://github.com/Kocal/vue-web-extension , seems like the webextension-pollyfill problem. it makes my script would not work on mobile – mandaputtra Oct 09 '19 at 13:54
  • Please [edit] the question to be on-topic: include a [mcve] that *duplicates the problem*. For Chrome extensions or Firefox WebExtensions you almost always need to include your *manifest.json* and some of the background, content, and/or popup scripts/HTML, and often webpage HTML/scripts. Questions seeking debugging help ("why isn't my code working the way I want?") must include: (1) the desired behavior, (2) a specific problem or error and (3) the shortest code necessary to reproduce it *in the question itself*. Please also see: [What topics can I ask about here?](/help/on-topic), and [ask]. – Makyen Dec 31 '19 at 06:38
  • 1
    The code provided here doesn't reproduce the error. The code provided in the question is the code within Firefox which can raise the error. However, the actual problem is in your extension's code or configuration, which causes the error to be raised. That code is not provided. We need enough code to duplicate the problem, which includes a *manifest.json* and enough of your scripts and HTML to actually demonstrate the problem. – Makyen Feb 05 '20 at 05:07

0 Answers0