-
Notifications
You must be signed in to change notification settings - Fork 338
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
Firefox fails to launch when using webExt.cmd.run
in NodeJS
#2993
Comments
Add support for Firefox. Update `build.js` to build both a Chromium and a Firefox version of the extension. Convert manifest to MV2 for the Firefox build. Unfortunately, `npm run start-firefox-desktop` doesn't currently work due to mozilla/web-ext#2993.
Add support for Firefox. Update `build.js` to build both a Chromium and a Firefox version of the extension. Convert manifest to MV2 for the Firefox build. Unfortunately, `npm run start-firefox-desktop` doesn't currently work due to mozilla/web-ext#2993.
@fregante, this is not a duplicate of #2975. I can run the command causing issues in #2975 ( It is also unlikely that this is an issue with Firefox 121, as I do not have an installation of Firefox 121 on my computer (I tested with Firefox 120 as per the bug report above, and just tested with Firefox Developer Edition 122 as well, and the issue occurs in both versions). As you can read in the report above, the issue only occurs when using |
Firefox doesn't accept relative paths. When Line 433 in 3063a77
We would be willing to accept a patch that turns the input ( Line 64 in 3063a77
|
Firefox only accepts absolute paths. As a temporary workaround, supply only absolute paths to Firefox. Now that this issue is fixed, use Firefox by default for extension development (when running `npm start`), as it works much better than Chromium. Use Firefox Developer Edition instead of standard Firefox for extension development. Also fix bug introduced in 52e4098, which broke the `npm run lint-web-ext` command.
Hello, I've opened a PR #3024 to add a patch for this, would really appreciate any feedback and suggestions. Thanks! |
Is this a feature request or a bug?
Bug.
What is the current behavior?
When running
webExt.cmd.run
in a NodeJS script, Firefox fails to open, andweb-ext
fails with the following error:Everything works as expected when passing
target: chromium
as an option, and Chromium launches with the extension loaded. The issue only occurs in Firefox. There are also no issues whenweb-ext
is run via the command line, and Firefox launches as expected:npx web-ext run --source-dir=.
The issue only occurs when using
web-ext
in a NodeJS script.Steps to reproduce
git clone git clone https://github.com/mdn/webextensions-examples.git && cd webextensions-examples/beastify
package.json
with the following contents:npm install
.run.js
with the following contents:node run.js
and observe the above error.npx web-ext run --source-dir=.
and observe that Firefox launches without issue.run.js
to have the following contents:node run.js
again and observe that Chromium launches without issue.What is the expected or desired behavior?
Firefox should launch as it does when running
npx web-ext
from the command line.Version information (for bug reports)
node --version && npm --version && npx web-ext --version
:The text was updated successfully, but these errors were encountered: