BigPizzaV3/CodexPlusPlus · error
macOS Launch Services 无法启动 bundle {bundle_id}:{detail}
Error message
macOS Launch Services 无法启动 bundle {bundle_id}:{detail} What it means
Thrown by spawn_companion (macOS branch) when /usr/bin/open -n -b {bundle_id} fails to launch the companion bundle and the subsequent fallback path also reports failure detail. The offending input is the Launch Services interaction for the identified companion bundle identifier; the message bundles the bundle id and the underlying detail so the user can see whether the bundle is missing, unregistered, or blocked.
Source
Thrown at crates/codex-plus-core/src/install/mod.rs:277
.collect::<Vec<OsString>>();
#[cfg(target_os = "macos")]
{
let exe = std::env::current_exe().unwrap_or_else(|_| PathBuf::from("."));
if let Some(bundle_id) = macos_companion_bundle_identifier_from_exe(&exe, binary) {
let launch_result = Command::new("/usr/bin/open")
.args(["-n", "-b", bundle_id, "--args"])
.args(&args)
.status();
if launch_result.as_ref().is_ok_and(|status| status.success()) {
return Ok(format!("bundle:{bundle_id}"));
}
let fallback = companion_binary_path_from_exe(&exe, binary);
if !fallback.exists() {
let detail = launch_result
.map(|status| status.to_string())
.unwrap_or_else(|error| error.to_string());
anyhow::bail!("macOS Launch Services 无法启动 bundle {bundle_id}:{detail}");
}
}
}
let path = companion_binary_path(binary);
let mut command = Command::new(&path);
command.args(&args);
#[cfg(windows)]
{
use std::os::windows::process::CommandExt;
command.creation_flags(crate::windows_create_no_window());
}
command
.spawn()
.map_err(|error| anyhow::anyhow!("无法启动 {}:{error}", path.to_string_lossy()))?;
Ok(path.to_string_lossy().to_string())
}
View on GitHub (pinned to f2074595a2)
Solutions
- 确认 bundle id 对应的 .app 已正确安装到 /Applications
- 手动用 open -n -b <bundle_id> 验证能否启动
- 重新运行入口安装修复 bundle 注册
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at crates/codex-plus-core/src/install/mod.rs:277 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/dfd93bb6e78f4f3c.
Report an issue: GitHub.