# MV3 Extension not working

**URL:** <https://discourse.mozilla.org/t/mv3-extension-not-working/107982>\
**Category:** Development\
**Created:** [November 21, 2022, 12:25pm UTC](https://discourse.mozilla.org/t/mv3-extension-not-working/107982 "2022-11-21T12:25:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![muwave](https://avatars.discourse-cdn.com/v4/letter/m/b782af/32.png) [@muwave](https://discourse.mozilla.org/u/muwave)\
**Post date:** [November 21, 2022, 12:25pm UTC](https://discourse.mozilla.org/t/mv3-extension-not-working/107982/1 "2022-11-21T12:25:24Z")

</div>

I’ve created a very simple test extension using manifest V3 that works in chrome

`manifest.json`:

```json
{
  "manifest_version": 3,
  "name": "test",
  "version": "0.0.1",
  "content_scripts": [
    {
      "matches": ["*://*/*"],
      "js": ["content.js"]
    }
  ]
}

```

`content.js`:

```javascript
alert('test')

```

I tried running

```bash
web-ext run --firefox-preview

```

A browser window opens, but the extension is not working…  
Using the `--verbose` option I find these errors

```auto
 Firefox stderr: [Parent 14212, IPC I/O Parent] WARNING: file /builds/worker/checkouts/gecko/ipc/chromium/src/base/process_util_win.cc:167
 Firefox stderr: JavaScript error: resource://gre/modules/XULStore.jsm, line 58: Error: Can't find profile directory.
 Firefox stdout: console.error: services.settings:
 Firefox stdout: main/whats-new-panel Signature failed InvalidSignatureError: Invalid content signature (main/whats-new-panel)
 Firefox stdout: console.error: services.settings:
 Firefox stdout: main/whats-new-panel local data was corrupted
console.warn: services.settings: main/whats-new-panel Signature verified failed. Retry from scratch

```

```auto
 Firefox stdout: console.error: services.settings:
 Firefox stdout: main/addons-manager-settings Signature failed again InvalidSignatureError: Invalid content signature (main/addons-manager-settings)
 Firefox stdout: console.error: services.settings:
 Firefox stdout: Message: InvalidSignatureError: Invalid content signature (main/addons-manager-settings)
  Stack:
    InvalidSignatureError@resource://services-settings/RemoteSettingsClient.jsm:169:5
_validateCollectionSignature@resource://services-settings/RemoteSettingsClient.jsm:977:13

```

Also if I change the manifest version to 2 the extension works even in Firefox… what am I doing wrong?

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [November 21, 2022, 1:38pm UTC](https://discourse.mozilla.org/t/mv3-extension-not-working/107982/2 "2022-11-21T13:38:38Z")

</div>

Host permissions now needs to be granted by the user manually for each page… or something like that:

> [@\[Blog post\] Manifest v3 in Firefox: Recap & Next Steps](https://discourse.mozilla.org/t/blog-post-manifest-v3-in-firefox-recap-next-steps/97372/7):
>
> I think we chatted about this over matrix, but the issue is about host permissions, in MV3, they’re not granted automatically on install, but instead user needs to grant them at some point. Depending on what’s appropriate for your extension, you could ask the user using promise.request() , or they can grant it by going to about:addons, selecting your addon, and flipping the toggle in the permissions tab. We’re also working on an easier UI to do this, tied to your extension browser action, but…

See also:

> <https://github.com/w3c/webextensions/issues/227>
>
> Making host permissions optional by default will introduce another prompt, and a… new state where the extension is installed but isn't actually able to do its job. However, users do not read prompts and are already confused by extension icons being hidden by default in Chrome/Edge and easily lost in Firefox.
> 
> When a user installs a privacy content blocker or a password manager, the user does not want to wade through multiple prompts just to get the thing to work. Yes, it's good to offer control to users who want it. However, the general user does not want this ability, the general user often does not know how to find the extension's icon. The general user just wants the extension to work.
> 
> It's not at all clear how this will curb malicious extensions, but the potential to further confuse users is very clear. Consider that malicious extensions will and do come up with wonderful on-boarding experiences.
> 
> Additionally, how will this interact with Selenium/Geckodriver/Chromedriver? Will browsers add command line flags to auto opt into all permissions?

---

<div class="post-metadata">

**Author:** ![Robert\_Uomini](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@Robert\_Uomini](https://discourse.mozilla.org/u/Robert_Uomini)\
**Post date:** [November 24, 2022, 3:39pm UTC](https://discourse.mozilla.org/t/mv3-extension-not-working/107982/3 "2022-11-24T15:39:09Z")

</div>

I’m not seeing any permissions tab; at least, tapping “Permissions” doesn’t prompt me for anything. It just takes me to a link “Learn about permissions”.

 ![Screenshot_2022-11-24-16-35-59-76_984e1414ae90666a90f12ff17ec14a7f](https://us1.discourse-cdn.com/flex001/uploads/mozilla/original/3X/c/d/cdfb8d7b0771d8f13f323fee321eba05d28e77e3.jpeg)

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [November 25, 2022, 9:10am UTC](https://discourse.mozilla.org/t/mv3-extension-not-working/107982/4 "2022-11-25T09:10:04Z")

</div>

That applies only to desktop Firefox.

Firefox for Android is a bit “behind” regarding addons support 🙂.

---

<div class="post-metadata">

**Author:** ![Robert\_Uomini](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@Robert\_Uomini](https://discourse.mozilla.org/u/Robert_Uomini)\
**Post date:** [November 25, 2022, 10:19am UTC](https://discourse.mozilla.org/t/mv3-extension-not-working/107982/5 "2022-11-25T10:19:16Z")

</div>

Any idea when we can expect add-ons for Android Firefox to be ready for testing? As you can imagine, my users are clamoring for a mobile solution.

---

<div class="post-metadata">

**Author:** ![juraj.masiar](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/juraj.masiar/32/30587_2.png) [@juraj.masiar](https://discourse.mozilla.org/u/juraj.masiar)\
**Post date:** [November 25, 2022, 11:14am UTC](https://discourse.mozilla.org/t/mv3-extension-not-working/107982/6 "2022-11-25T11:14:05Z")

</div>

Can’t say, but the MV2 addons are allowed in Beta version, although it’s more like a “workaround”, so not suitable for normal users.

See for example this article:  
[https://www.ghacks.net/2022/10/20/firefox-beta-for-android-now-supports-custom-add-on-collections/](https://www.ghacks.net/2022/10/20/firefox-beta-for-android-now-supports-custom-add-on-collections/)

---

<div class="post-metadata">

**Author:** ![Robert\_Uomini](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@Robert\_Uomini](https://discourse.mozilla.org/u/Robert_Uomini)\
**Post date:** [November 25, 2022, 12:22pm UTC](https://discourse.mozilla.org/t/mv3-extension-not-working/107982/7 "2022-11-25T12:22:05Z")

</div>

Thanks for the link. Unfortunately, it didn’t help much because my extension is brand new and therefore isn’t in the add-ons store, hence it doesn’t have a collection ID (if you can all a single extension a “collection”).
