zed-industries/zed · error

cannot start app bundle

Error message

cannot start app bundle {}

What it means

On macOS, the CLI locates the containing Zed.app bundle and asks the system to launch it (via LSOpenFromURLSpec/open) to hand off the open request; this error fires when that launch call fails for the resolved bundle path, meaning macOS could not start the app (bundle corrupt, moved, or quarantined).

Solutions

  1. Verify the Zed.app bundle exists at the resolved path and launches manually via Finder
  2. Reinstall Zed if the bundle is damaged or was moved after the CLI resolved its path
  3. Remove quarantine attributes (xattr -dr com.apple.quarantine) if Gatekeeper blocks the launch
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/cli/src/main.rs:1381 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@f4178619ac (2026-08-20). Data as JSON: /api/errors/b49fd54ed3788439. Report an issue: GitHub.

Appendix: source

Thrown at crates/cli/src/main.rs:1381

                            kCFStringEncodingUTF8,
                            ptr::null(),
                        ));
                        // equivalent to: open zed-cli:... -a /Applications/Zed\ Preview.app
                        let urls_to_open =
                            CFArray::from_copyable(&[url_to_open.as_concrete_TypeRef()]);
                        LSOpenFromURLSpec(
                            &LSLaunchURLSpec {
                                appURL: app_url.as_concrete_TypeRef(),
                                itemURLs: urls_to_open.as_concrete_TypeRef(),
                                passThruParams: ptr::null(),
                                launchFlags: kLSLaunchDefaults | kLSLaunchDontSwitch,
                                asyncRefCon: ptr::null_mut(),
                            },
                            ptr::null_mut(),
                        )
                    };

                    anyhow::ensure!(
                        status == 0,
                        "cannot start app bundle {}",
                        self.zed_version_string()
                    );
                }

                Self::LocalPath { executable, .. } => {
                    let executable_parent = executable
                        .parent()
                        .with_context(|| format!("Executable {executable:?} path has no parent"))?;
                    let subprocess_stdout_file = fs::File::create(
                        executable_parent.join("zed_dev.log"),
                    )
                    .with_context(|| format!("Log file creation in {executable_parent:?}"))?;
                    let subprocess_stdin_file =
                        subprocess_stdout_file.try_clone().with_context(|| {
                            format!("Cloning descriptor for file {subprocess_stdout_file:?}")
                        })?;

View on GitHub (pinned to f4178619ac)