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

Chromium is not opened despite binary path provided in web-ext-config.js #2328

Closed
MrChocolatine opened this issue Oct 14, 2021 · 3 comments
Closed

Comments

@MrChocolatine
Copy link

MrChocolatine commented Oct 14, 2021

Is this a feature request or a bug?

A bug.

What is the current behaviour?

When CLI parameters are used in Bash, web-ext works and open Chromium with the correct parameters.
When CLI parameters are provided from a web-ext-config.js file, web-ext always try to open Firefox.

Repo for the demonstration:
https://github.com/MrChocolatine/web-ext-issue-Chromium

  1. Clone the repo locally
git clone https://github.com/MrChocolatine/web-ext-issue-Chromium
cd web-ext-issue-Chromium
  1. Install dependencies
npm i
  1. Call web-ext, with some CLI parameters, from a local shell file
npm run run

This opens the browser Chromium, with https://github.com loaded in a tab.

  1. Call web-ext locally
./node_modules/.bin/web-ext run

Parameters are not processed and web-ext tries to open Firefox.

See the errors log
➜ ./node_modules/.bin/web-ext run
Applying config files: ./package.json, ./web-ext-config.js
[program.js][info] Version: 6.5.0
[cmd/run.js][info] Running web extension from /Users/MY_USER/Dev/web-extensions/test/src
[util/manifest.js][debug] Validating manifest at /Users/MY_USER/Dev/web-extensions/test/src/manifest.json
[extension-runners/firefox-desktop.js][debug] Creating new Firefox profile
[firefox/index.js][debug] Running Firefox with profile at /Applications/code-portable-data/tmp/firefox-profileqnKXbu/
Error: spawn /Applications/Firefox.app/Contents/MacOS/firefox-bin ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
  1. Call web-ext globally
web-ext run

Parameters are not processed and web-ext tries to open Firefox.

See the errors log
➜ web-ext run          
Applying config files: ./package.json, ./web-ext-config.js
[program.js][info] Version: 6.5.0
[cmd/run.js][info] Running web extension from /Users/MY_USER/Dev/web-extensions/test/src
[util/manifest.js][debug] Validating manifest at /Users/MY_USER/Dev/web-extensions/test/src/manifest.json
[extension-runners/firefox-desktop.js][debug] Creating new Firefox profile
[firefox/index.js][debug] Running Firefox with profile at /Applications/code-portable-data/tmp/firefox-profileemKSzz/
Error: spawn /Applications/Firefox.app/Contents/MacOS/firefox-bin ENOENT
    at Process.ChildProcess._handle.onexit (internal/child_process.js:269:19)
    at onErrorNT (internal/child_process.js:467:16)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

What is the expected or desired behaviour?

I expect the parameters run.target and run.chromiumBinary to work as expected in the file web-ext-config.js.

Version information (for bug reports)

  • Firefox version: none
  • Chromium version: Version 92.0.4515.131 (Official Build, ungoogled-chromium) (x86_64)
  • Your OS and version: macOS, 10.15.7
  • Paste the output of these commands:
➜ node --version && npm --version && web-ext --version
v14.17.6
6.14.15
6.5.0

➜ node --version && npm --version && ./node_modules/.bin/web-ext --version 
v14.17.6
6.14.15
6.5.0
@MrChocolatine MrChocolatine changed the title Chromium is not opened despite binary path provided Chromium is not opened despite binary path provided in web-ext-config.js Oct 14, 2021
@MrChocolatine
Copy link
Author

MrChocolatine commented Oct 14, 2021

I can confirm my file web-ext-config.js is actually processed by web-ext, when called globally and locally. If I add an unknown key the configuration object:

➜ ./node_modules/.bin/web-ext run
Applying config files: ./package.json, ./web-ext-config.js

s: The config file at /Users/MY_USER/Dev/web-extensions/test/web-ext-config.js specified an unknown option: "customOption"


23:45:17 on  master [!] via ⬢ v14.17.6 
➜ web-ext run                    
Applying config files: ./package.json, ./web-ext-config.js

s: The config file at /Users/MY_USER/Dev/web-extensions/test/web-ext-config.js specified an unknown option: "customOption"

@rpl
Copy link
Member

rpl commented Oct 15, 2021

@MrChocolatine I'm closing this issue as a duplicate of #1862, which already contains some more details about this issue, in particular:

@rpl rpl closed this as completed Oct 15, 2021
@MrChocolatine
Copy link
Author

MrChocolatine commented Oct 15, 2021

Since 17 March 2020 really? Woah, okay.

My bad I did not see this issue, thanks for the link.

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

No branches or pull requests

2 participants