Generic "Extension is invalid" error without details when an invalid extension is launched by "web-ext run"
Categories
(WebExtensions :: Developer Tools, enhancement, P3)
Tracking
(firefox139 fixed)
Tracking | Status | |
---|---|---|
firefox139 | --- | fixed |
People
(Reporter: robwu, Assigned: robwu)
References
Details
(Whiteboard: [addons-jira])
Attachments
(1 file)
STR:
- Create an invalid extension. E.g. delete the first
{
of a manifest.json file, or put an empty directory in_locales/
(directory withoutmessages.json
are considered invalid). - Use
web-ext run
on it.
Expected:
- Useful error message.
Actual:
- Generic non-actionable "Extension is invalid" message.
Example:
$ git clone https://github.com/mozilla/multi-account-containers
$ cd multi-account-containers
$ cd src/
$ git submodule init update --init
$ web-ext run
Running web extension from /tmp/multi-account-containers/src
Use --verbose or --devtools to see logging
WebExtError: installTemporaryAddon: Error: Error: Could not install add-on at '/tmp/multi-account-containers/src': Error: Extension is invalid
There is no more useful detail when running with --verbose
either:
$ web-ext run --verbose
...
[/path/to/node_modules/web-ext/lib/firefox/index.js][debug] Firefox stdout: console.error: "Error while calling actor 'addons's method 'installTemporaryAddon'" "Could not install add-on at /tmp/multi-account-containers/src: Extension is invalid"
[/path/to/node_modules/web-ext/lib/firefox/index.js][debug] Firefox stdout: console.error: (new Error("Could not install add-on at /tmp/multi-account-containers/src: Extension is invalid", "resource://devtools/server/actors/addon/addons.js", 36))
[/path/to/node_modules/web-ext/lib/program.js][error]
WebExtError: installTemporaryAddon: Error: Error: Could not install add-on at /tmp/multi-account-containers/src: Extension is invalid
Assignee | ||
Comment 1•8 days ago
|
||
Examples of user reports from web-ext
:
https://github.com/mozilla/web-ext/issues/1077
https://github.com/mozilla/web-ext/issues/1237
https://github.com/mozilla/web-ext/issues/1371
Considering the displayed serialization when run with web-ext run --verbose
, I tried replacing the Error
with an AggregateError
at https://searchfox.org/mozilla-central/rev/4d00b50c42a788c51ac4c5fe92b684569ba6c3a5/devtools/server/actors/addon/addons.js#35 (to include additionalErrors
from https://searchfox.org/mozilla-central/rev/4d00b50c42a788c51ac4c5fe92b684569ba6c3a5/toolkit/mozapps/extensions/internal/XPIInstall.sys.mjs#482-485)
... but that did not work because the toSource() serialization of AggregateError
does not include the aggregated errors (bug 1960031).
Updated•8 days ago
|
Assignee | ||
Comment 2•8 days ago
|
||
Updated•8 days ago
|
Updated•8 days ago
|
Comment 4•5 days ago
|
||
bugherder |
Description
•