Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UsageError message could be more helpful: "Cannot use... auto-generated extension ID" #3309

Open
mcomella opened this issue Nov 22, 2024 · 1 comment

Comments

@mcomella
Copy link

Is this a feature request or a bug?

Bug?

What is the current behavior?

I'm not sure what the exact extension state is that triggers this. I haven't used this tool in a long time and when I updated it and ran web-ext sign, I received the following error message:

UsageError: Cannot use previously auto-generated extension ID {redacted} - This extension ID must be specified in the manifest.json file.

What is the expected or desired behavior?

The supplied error message could be more helpful and tell you specifically which key to add, e.g.:

UsageError: Cannot use previously auto-generated extension ID {redacted} - This extension ID must be specified in the manifest.json file:

// manifest.json
{
    "browser_specific_settings": {
        "gecko": {
            "id": "{redacted}"
        }
    },

    ...
}

As a user, I spent about twenty minutes looking for a solution. I started in the the manifest.json docs (which doesn't have the answer) and eventually found a hint to the answer by searching in the web-ext source code.

The code that triggers this error message is here:

web-ext/src/cmd/sign.js

Lines 67 to 70 in cde10a8

throw new UsageError(
'Cannot use previously auto-generated extension ID ' +
`${idFromSourceDir} - This extension ID must be specified in the manifest.json file.`,
);

Version information (for bug reports)

  • Firefox version: 131.0b5
  • Your OS and version: macOS 14.6.1
  • Paste the output of these commands:
$ node --version && npm --version && npx web-ext --version
v22.9.0
10.8.3
8.3.0
@mcomella
Copy link
Author

I submitted a pull request: #3310

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant