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?