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

web-ext lint doesn't catch empty directories in _locales #5484

Open
hachi opened this issue Oct 22, 2024 · 1 comment
Open

web-ext lint doesn't catch empty directories in _locales #5484

hachi opened this issue Oct 22, 2024 · 1 comment

Comments

@hachi
Copy link

hachi commented Oct 22, 2024

Is this a feature request or a bug?

Bug... ish?

What is the current behavior?

mkdir _locales/en_AQ

web-ext lint gives no warnings or errors, but web-ext run is unable to launch firefox

Running web extension from /home/hachi/src/stream-notifier-picarto
Profile directory /home/hachi/.web-ext-profile already exists
More info about WebExtensions debugging:
https://extensionworkshop.com/documentation/develop/debugging/

WebExtError: installTemporaryAddon: Error: Error: Could not install add-on at '/home/hachi/src/stream-notifier-picarto': Error: Extension is invalid
    at RemoteFirefox.installTemporaryAddon (file:///home/hachi/src/stream-notifier-picarto/node_modules/web-ext/lib/firefox/remote.js:94:13)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async FirefoxDesktopExtensionRunner.startFirefoxInstance (file:///home/hachi/src/stream-notifier-picarto/node_modules/web-ext/lib/extension-runners/firefox-desktop.js:215:27)
    at async FirefoxDesktopExtensionRunner.run (file:///home/hachi/src/stream-notifier-picarto/node_modules/web-ext/lib/extension-runners/firefox-desktop.js:48:5)
    at async Promise.all (index 0)
    at async MultiExtensionRunner.run (file:///home/hachi/src/stream-notifier-picarto/node_modules/web-ext/lib/extension-runners/index.js:67:5)
    at async run (file:///home/hachi/src/stream-notifier-picarto/node_modules/web-ext/lib/cmd/run.js:173:3)
    at async Program.execute (file:///home/hachi/src/stream-notifier-picarto/node_modules/web-ext/lib/program.js:270:7)
    at async file:///home/hachi/src/stream-notifier-picarto/node_modules/web-ext/bin/web-ext.js:13:1

No indication is given from firefox on why the extension is invalid... I cannot find where a person might even begin to report this bug in firefox too.

What is the expected or desired behavior?

Some sort of lint output to tell you that an empty locale directory is invalid and will not work at all.

It's also possible that runtime reload errors need to be exposed to the user somehow, there is no output from web-ext if you create an empty locales directory, but reloading stops.

Version information (for bug reports)

  • Firefox 131.0b9
  • Linux Mint something
  • Node v20.17.0
  • NPM 10.8.2
  • web-ext 8.3.0
@hachi hachi changed the title web-ext lint doesn't catch empty or malformed directories in _locales web-ext lint doesn't catch empty directories in _locales Oct 22, 2024
@hachi
Copy link
Author

hachi commented Oct 22, 2024

Another note, possibly should be in another ticket... there is no validation that the directory names are well formed names (the locales standards say dashes, but firefox specifically or browsers in general want underscore and disallow dashes)

This does not result in a startup error, but the locales just "don't work" in that case, which could be unexpected behavior when browser.i18n.*Language functions all return the locale strings with dashes.

@rpl rpl transferred this issue from mozilla/web-ext Oct 24, 2024
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