{"record":{"id":"dfd93bb6e78f4f3c","repo":"BigPizzaV3/CodexPlusPlus","slug":"macos-launch-services-bundle-bundle-id-det","errorCode":null,"errorMessage":"macOS Launch Services 无法启动 bundle {bundle_id}：{detail}","messagePattern":"macOS Launch Services 无法启动 bundle (.+?)：(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/install/mod.rs","lineNumber":277,"sourceCode":"        .collect::<Vec<OsString>>();\n\n    #[cfg(target_os = \"macos\")]\n    {\n        let exe = std::env::current_exe().unwrap_or_else(|_| PathBuf::from(\".\"));\n        if let Some(bundle_id) = macos_companion_bundle_identifier_from_exe(&exe, binary) {\n            let launch_result = Command::new(\"/usr/bin/open\")\n                .args([\"-n\", \"-b\", bundle_id, \"--args\"])\n                .args(&args)\n                .status();\n            if launch_result.as_ref().is_ok_and(|status| status.success()) {\n                return Ok(format!(\"bundle:{bundle_id}\"));\n            }\n            let fallback = companion_binary_path_from_exe(&exe, binary);\n            if !fallback.exists() {\n                let detail = launch_result\n                    .map(|status| status.to_string())\n                    .unwrap_or_else(|error| error.to_string());\n                anyhow::bail!(\"macOS Launch Services 无法启动 bundle {bundle_id}：{detail}\");\n            }\n        }\n    }\n\n    let path = companion_binary_path(binary);\n    let mut command = Command::new(&path);\n    command.args(&args);\n    #[cfg(windows)]\n    {\n        use std::os::windows::process::CommandExt;\n        command.creation_flags(crate::windows_create_no_window());\n    }\n    command\n        .spawn()\n        .map_err(|error| anyhow::anyhow!(\"无法启动 {}：{error}\", path.to_string_lossy()))?;\n    Ok(path.to_string_lossy().to_string())\n}\n","sourceCodeStart":259,"sourceCodeEnd":295,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/install/mod.rs#L259-L295","documentation":"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.","triggerScenarios":"Thrown at crates/codex-plus-core/src/install/mod.rs:277 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["确认 bundle id 对应的 .app 已正确安装到 /Applications","手动用 open -n -b <bundle_id> 验证能否启动","重新运行入口安装修复 bundle 注册"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f2074595a281bc057525c748175c8eb9805b0673","analyzedAt":"2026-08-23T12:52:24.489Z","contentChangedAt":"2026-08-23T12:52:24.489Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}