muwave
November 21, 2022, 12:25pm
1
I’ve created a very simple test extension using manifest V3 that works in chrome
manifest.json
:
{
"manifest_version": 3,
"name": "test",
"version": "0.0.1",
"content_scripts": [
{
"matches": ["*://*/*"],
"js": ["content.js"]
}
]
}
content.js
:
alert('test')
I tried running
web-ext run --firefox-preview
A browser window opens, but the extension is not working…
Using the --verbose
option I find these errors
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
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?
Host permissions now needs to be granted by the user manually for each page… or something like that:
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:
opened 04:09PM - 09 Jun 22 UTC
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?
1 Like
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”.
That applies only to desktop Firefox.
Firefox for Android is a bit “behind” regarding addons support .
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.
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/
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”).