Skip to content

fix(browser): use 'open -a Firefox' for XPI install on macOS#335

Open
udiedrichsen wants to merge 1 commit into
1jehuang:masterfrom
udiedrichsen:master
Open

fix(browser): use 'open -a Firefox' for XPI install on macOS#335
udiedrichsen wants to merge 1 commit into
1jehuang:masterfrom
udiedrichsen:master

Conversation

@udiedrichsen

Copy link
Copy Markdown

Summary

Fixes jcode browser setup failing on macOS with kLSApplicationNotFoundErr when trying to open the Firefox extension (.xpi) installer.

Problem

The previous code called open <file-url> on the .xpi file, but macOS has no default handler for .xpi files. This produces:

No application knows how to open URL file:///.../browser-agent-bridge.xpi
Error Domain=NSOSStatusErrorDomain Code=-10814 "kLSApplicationNotFoundErr"

Fix

Use open -a Firefox <file-url> to explicitly open the XPI with Firefox, which knows how to handle Firefox extension installation. Falls back to open -b org.mozilla.firefox as a secondary option.

Changes

File Change
crates/jcode-base/src/browser.rs Replace plain open with open -a Firefox in the macOS #[cfg] block of install_extension()

Validation

  • Builds cleanly on macOS aarch64 (selfdev profile)
  • The same open -a Firefox pattern is the standard recommended approach for opening files with a specific application on macOS

Closes #334

The previous code used plain 'open' on the .xpi file URL, but macOS
has no default handler for .xpi files, causing kLSApplicationNotFoundErr.
Now we explicitly open with Firefox via , with a
fallback to .
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 this pull request may close these issues.

fix(browser): XPI extension install fails on macOS with kLSApplicationNotFoundErr

1 participant