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

Error: spawn /Applications/Firefox.app/Contents/MacOS/firefox-bin ENOENT #125

Open
Krinkle opened this issue Jan 18, 2025 · 10 comments
Open

Comments

@Krinkle
Copy link
Contributor

Krinkle commented Jan 18, 2025

As of Firefox 121 (released Dec 2023), Mozilla no longer includes a firefox-bin inside the bundle for macOS.

The good news is that the replacement, firefox has been around for 10+ years. So it is safe to change this.

Prior art:

The problem originates in the browser-launcher dependency, but I'm reporting it here because that package no longer has a source or issue tracker since https://github.com/substack account was deleted.

pass.js:

console.log('TAP version 13');
console.log('ok 1 Foo bar');
console.log('ok 2 Baz > this thing');
console.log('ok 3 Baz > another thing');
console.log('ok 4 Quux');
console.log('1..4');

package.json:

{
  "private": true,
  "scripts": {},
  "devDependencies": {
    "testling": "^1.7.7"
  }
}
$ cat pass.js | npx testling
node:events:485
      throw er; // Unhandled 'error' event
      ^

Error: spawn /Applications/Firefox.app/Contents/MacOS/firefox-bin ENOENT
    at ChildProcess._handle.onexit (node:internal/child_process:286:19)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21)
Emitted 'error' event on ChildProcess instance at:
    at ChildProcess._handle.onexit (node:internal/child_process:292:12)
    at onErrorNT (node:internal/child_process:484:16)
    at process.processTicksAndRejections (node:internal/process/task_queues:90:21) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'spawn /Applications/Firefox.app/Contents/MacOS/firefox-bin',
  path: '/Applications/Firefox.app/Contents/MacOS/firefox-bin',
  spawnargs: [
    '--no-remote',
    '-CreateProfile',
    'browser-launcher-f7bc84eec54f4 /Users/krinkle/.config/browser-launcher/firefox-browser-launcher-f7bc84eec54f4'
  ]
}

Node.js v23.6.0
@ljharb
Copy link
Collaborator

ljharb commented Jan 18, 2025

Thanks; even though the repo's gone, I can reconstruct it and update the npm package if @bcomnes wouldn't mind adding me as an npm owner?

@bcomnes
Copy link

bcomnes commented Jan 19, 2025

Sure no problem. Which one? I’m out right now but will set a reminder for when I’m back to my keys.

@ljharb
Copy link
Collaborator

ljharb commented Jan 19, 2025

@bcomnes awesome! browser-launcher. I'll restore the repo this weekend and publish an update.

@Krinkle
Copy link
Contributor Author

Krinkle commented Jan 19, 2025

@ljharb In case you don't have an up-to-date clone, there's a partial Git history at https://github.com/bcomnes/browser-launcher that may be salvageable. It doesn't cover 2.0.0-4.0.0 but may be worth using as a start to preserve various commit messages and author attribution of merged PRs until that point. I imagine you'll get the rest from npm release tarballs?

@bcomnes
Copy link

bcomnes commented Jan 19, 2025

Incredible, I found the old full source tree on my laptop.

@bcomnes
Copy link

bcomnes commented Jan 19, 2025

I have no clue what GitHub did but they re-attached my fork to some random other repo. I'm going rename the forked version and create a new one and push up the tree.

@bcomnes
Copy link

bcomnes commented Jan 19, 2025

Ok I just performed the following:

  • Renamed my old fork to https://github.com/bcomnes/browser-launcher-original-fork because forks suck for anything other than sending PRs (automations randomly turn off, generally things just don't work as well)
  • Created a new repo https://github.com/bcomnes/browser-launcher which I pushed the source tree from my laptop into. I believe I had the whole tree.
  • Invited @ljharb to the repo and npm package. Let me know if you want me to transfer the repo, I don't intend to continue working on this package.
  • Let me know if you need anything else, and just make sure to do a major release and announce change of ownership.

@ljharb
Copy link
Collaborator

ljharb commented Jan 19, 2025

Thanks, if you'd mind bouncing it into tape-testing (this org) that'd be great.

I can certainly publish a v5 if you want, but a change of owner doesn't usually warrant a major release - is that necessary?

(note https://majors.nullvoxpopuli.com/q?minors=false&old=false&packages=browser-launcher - most users are on v1 and v3, so being able to publish bugfixes to them is pretty important)

@bcomnes
Copy link

bcomnes commented Jan 21, 2025

Image

Can't transfer directly, so I just sent it to you directly, and you can put it in.

I mean do what makes sense, but I think a major would be an appropriate way to communicate that the package is under new management.

@ljharb
Copy link
Collaborator

ljharb commented Jan 21, 2025

Thanks!

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

3 participants