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 run fails to start firefox on macOS #2975

Closed
tomquas opened this issue Dec 4, 2023 · 12 comments · Fixed by #3012
Closed

web-ext run fails to start firefox on macOS #2975

tomquas opened this issue Dec 4, 2023 · 12 comments · Fixed by #3012
Assignees

Comments

@tomquas
Copy link

tomquas commented Dec 4, 2023

Is this a feature request or a bug?

bug

What is the current behavior?

web-ext run --verbose --firefox "deved" --firefox-profile=mc02 --profile-create-if-missing --source-dir=$PWD --devtools --no-config-discovery errors out with connection refused message before firefox opens a window.

i tried with several new profiles, to no avail.

one problem seems to be that 'Firefox closed' – see logs below – before remote.js tries to connect?

web-ext run --verbose --firefox "deved" --firefox-profile=mc02 --profile-create-if-missing --source-dir=$PWD --devtools --no-config-discovery
[.../node_modules/web-ext/lib/program.js][info] Version: 7.8.0
[.../node_modules/web-ext/lib/program.js][debug] Not discovering config files
[.../node_modules/web-ext/lib/cmd/run.js][info] Running web extension from /tmp/extension
[.../node_modules/web-ext/lib/util/manifest.js][debug] Validating manifest at /tmp/extension/manifest.json
[.../node_modules/web-ext/lib/cmd/run.js][info] Profile directory mc02 already exists
[.../node_modules/web-ext/lib/extension-runners/firefox-desktop.js][debug] Copying Firefox profile from mc02
[.../node_modules/web-ext/lib/firefox/index.js][debug] Copying profile directory from "mc02"
[.../node_modules/web-ext/lib/firefox/index.js][debug] Running Firefox with profile at /var/folders/jh/vlccfrws7bn0gmdj2b34mt040000gn/T/firefox-profileFN6h9Q/
[.../node_modules/web-ext/lib/firefox/index.js][debug] Executing Firefox binary: /Applications/Firefox Developer Edition.app/Contents/MacOS/firefox-bin
[.../node_modules/web-ext/lib/firefox/index.js][debug] Firefox args: -start-debugger-server 50539 -foreground -no-remote -profile /var/folders/jh/vlccfrws7bn0gmdj2b34mt040000gn/T/firefox-profileFN6h9Q/
[.../node_modules/web-ext/lib/firefox/index.js][info] More info about WebExtensions debugging:
[.../node_modules/web-ext/lib/firefox/index.js][info] https://extensionworkshop.com/documentation/develop/debugging/
[.../node_modules/web-ext/lib/firefox/remote.js][debug] Connecting to the remote Firefox debugger
[.../node_modules/web-ext/lib/firefox/remote.js][debug] Connecting to Firefox on port 50539
[.../node_modules/web-ext/lib/firefox/index.js][debug] Firefox closed
[.../node_modules/web-ext/lib/firefox/remote.js][debug] Retrying Firefox (0); connection error: Error: connect ECONNREFUSED 127.0.0.1:50539
[.../node_modules/web-ext/lib/firefox/remote.js][debug] Connecting to Firefox on port 50539
[.../node_modules/web-ext/lib/firefox/remote.js][debug] Retrying Firefox (1); connection error: Error: connect ECONNREFUSED 127.0.0.1:50539

What is the expected or desired behavior?

run extension debug session

Version information (for bug reports)

  • Firefox version: 121.0b6 (64-bit) Dev Ed
  • Your OS and version: macos sonoma 14.1.1
  • Paste the output of these commands:
node --version && npm --version && web-ext --version
v18.18.2
9.8.1
7.8.0
@jpanther
Copy link

jpanther commented Dec 7, 2023

I'm having the same issue. It seems to only occur when targeting Firefox Developer Edition.

  • Firefox version: 121.0b8 (64-bit) Developer Edition
  • Your OS and version: macOS Sonoma 14.1.2
  • Paste the output of these commands:
node --version && npm --version && web-ext --version 
v21.3.0
10.2.5
7.9.0

@theowenyoung
Copy link

This problem still exists, and currently both firefox and firefox developer versions do not work.

@neurodynamic
Copy link

neurodynamic commented Dec 20, 2023

Same issue here. Firefox no longer launches, and instead produces Error: connect ECONNREFUSED 127.0.0.1:59544. The issue may have started after running the update to macOS Sonoma 14.2.1, but I'm not 100% sure.

@volosovich
Copy link

the same problem

node --version && npm --version && web-ext --version
v18.18.0
10.2.0
7.9.0
MacOs 12.6.5 (21G531)

problems start after updating to FF121 both firefox and firefox developer versions do not work.

@fregante
Copy link
Contributor

It doesn't appear in the logs, but if I run the the commands that appear in the log, I get this immediately after:

fish: Job 1, '/Applications/Firefox.app/Conte…' terminated by signal SIGKILL (Forced quit)

@suhaibmujahid
Copy link
Member

It stopped working for me after updating Firefox. Downgraded to Firefox 120.0.1, and things are working again.

@volosovich
Copy link

on windows it's working ok. I can reproduce problem on macOS

@lesleyjanenorton
Copy link

Just hit this and specifying a different binary (web-ext run -f=/Applications/Firefox.app/Contents/MacOS/firefox instead of ../firefox-bin which I also see in your logs and appears to be the default) resolved this for me.

@tieje
Copy link

tieje commented Jan 4, 2024

Just hit this and specifying a different binary (web-ext run -f=/Applications/Firefox.app/Contents/MacOS/firefox instead of ../firefox-bin which I also see in your logs and appears to be the default) resolved this for me.

Fixed it for me.

@Rob--W Rob--W changed the title web-ext run fails to start firefox web-ext run fails to start firefox on macOS Jan 6, 2024
@Rob--W
Copy link
Member

Rob--W commented Jan 6, 2024

This appears to be a macOS-specific issue, tracked at https://bugzilla.mozilla.org/show_bug.cgi?id=1871447

The work-around is to use firefox instead of firefox-bin, as mentioned in comments above.
To identify the path, run web-ext run --verbose. Its log output will contain this at some point:

[.../web-ext/lib/firefox/index.js][debug] Executing Firefox binary: /Applications/Firefox Nightly.app/Contents/MacOS/firefox-bin

Run web-ext again, with -f, followed by pasting the path (quoted!) and without the -bin suffix:

`web-ext run -f "/Applications/Firefox Nightly.app/Contents/MacOS/firefox"

@willdurand
Copy link
Member

This should be fixed in https://github.com/mozilla/web-ext/releases/tag/7.10.0, please test and let me know if the issue hasn't been fixed. Thanks!

@neurodynamic
Copy link

@willdurand Seems fixed for me!

klappradla added a commit to bitcrowd/tickety-tick that referenced this issue Feb 28, 2024
An issue in the web-ext package was preventing Firefox from opening in
development. Upgrading the package fixed the problem.

For reference, see mozilla/web-ext#2975
klappradla added a commit to bitcrowd/tickety-tick that referenced this issue Mar 1, 2024
An issue in the web-ext package was preventing Firefox from opening in
development. Upgrading the package fixed the problem.

For reference, see mozilla/web-ext#2975
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

Successfully merging a pull request may close this issue.