Content Scripts do not load

Hey there,
I’m adding firefox support to my chrome extension.

After doing some necessary tweaks in the manifest, notably background/scripts & browser_specific_settings/gecko. My extension loads correctly when using “Load Temporary Add-on”.

My background script works but my content scripts do not.
My manifest looks like this.

I’ve tried replacing my entire content scripts with simple console.logs but nothing shows up in console.
I guess it’s important to note that my extension works as intended on Chrome. So I suppose I’m missing something to make it work on firefox.

Any help is appreciated.

Unlike Chrome, when using Manifest V3 in Firefox, the host permissions are not granted automatically during the install time, so your content strips won’t be injected.

You can test this by manually enabling the permissions - in the “about:addons” page - click your addon and then click “Permissions” tab and enable missing permissions.

BUT! There is a good news, Firefox 127 (currently Nightly release) will fix this so that they are granted on install, same as Chrome:

Firefox 127 is scheduled to be released for public 11th June:

Alternative solution is to use Manifest V2 for Firefox.
1 Like