Skip to content

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

@udiedrichsen

Description

@udiedrichsen

Summary

jcode browser setup fails on macOS when trying to install the Firefox extension. The open command is called on the .xpi file URL, but macOS has no registered handler for .xpi files, producing:

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

Root Cause

In crates/jcode-base/src/browser.rs:804, install_extension() uses:

let _ = tokio::process::Command::new("open").arg(&xpi_url).spawn();

macOS open without a specific application asks Launch Services for the default handler for .xpi — which does not exist.

Fix

Use open -a Firefox <file-url> (with bundle-ID fallback open -b org.mozilla.firefox) so macOS opens the XPI file directly with Firefox, which knows how to handle Firefox extension installs.

Environment

  • macOS aarch64 (Apple Silicon)
  • jcode v0.23.0+
  • Firefox (any version)

Reproduction

  1. Run jcode browser setup
  2. Observe the error when setup tries to open the XPI installer

Expected

The XPI file opens in Firefox, prompting the user to install the extension.

Actual

macOS Launch Services error because no application claims .xpi files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions