Content scripts work in Chrome but not Firefox?

Tested with the latest Chrome Canary, latest Firefox Nightly, latest Firefox Developer Edition, and normal Firefox release.

Only Canary works with the extension. I’m making this using someone else’s GitHub API wrapper. I had originally written my own code to handle the GitHub API, but thought that maybe I messed something up. I deleted that code and switched to using Octokat for the API wrapper.

Upon further testing, not even Octokat works. I added print calls to every function, currently only functions in the global scope and first-level functions will print anything out. Promises and other similar things do not get called, foe example this line.

In Chrome this works fine.

image

But Firefox does not.

image

According to the documentation, my manifest is well formed, although incomplete.

Any help is appreciated.

The only thing I can think of is that that library is probably nor meant to be run as a content script.
This generally shouldn’t matter, but you could try to run your code in the page context (e.g. via the debugger console).
If that works, replace network related APIs (fetch, XHR, …) in the content scripts “wndow” with the ones from “unsafeWindow” (at least I hope that drops the wrappers/fixes Mozilla applies to these APIs).

I got it working. Content scripts apparently need permission to use a site for XHR, but background scripts do not.

"permissions": [
  "https://github.com/*",
  "https://api.github.com/*"
]