Firefox console: "Error: WebExtension context not found!" [closed]
Asked Answered
F

0

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.

Fustigate answered 1/3, 2018 at 13:48 Comment(6)
Same problem, and my script stops working. I'm using Firefox.Isley
Is it this? bugzilla.mozilla.org/show_bug.cgi?id=1447806Freytag
I found the same problem in a different file. 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 and 1447806 (as koλzar mentioned earlier).Margarita
I'm experiencing this with github.com/Kocal/vue-web-extension , seems like the webextension-pollyfill problem. it makes my script would not work on mobileInduplicate
Please edit the question to be on-topic: include a minimal reproducible example 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?, and How to Ask.Computerize
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.Computerize

© 2022 - 2024 — McMap. All rights reserved.