{"record":{"id":"1c8838a08d72f186","repo":"BigPizzaV3/CodexPlusPlus","slug":"error-1c8838","errorCode":null,"errorMessage":"无法启动 {}：{error}","messagePattern":"无法启动 (.+?)：(.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/install/mod.rs","lineNumber":292,"sourceCode":"                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\npub fn macos_companion_bundle_identifier_from_exe(\n    exe: &Path,\n    binary: &str,\n) -> Option<&'static str> {\n    let (_, app_name) = macos_applications_dir_and_app_name_from_exe(exe)?;\n    let known_bundle =\n        app_name == format!(\"{SILENT_NAME}.app\") || app_name == format!(\"{MANAGER_NAME}.app\");\n    if !known_bundle {\n        return None;\n    }\n    match binary {\n        SILENT_BINARY => Some(SILENT_BUNDLE_ID),\n        MANAGER_BINARY => Some(MANAGER_BUNDLE_ID),\n        _ => None,\n    }","sourceCodeStart":274,"sourceCodeEnd":310,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/install/mod.rs#L274-L310","documentation":"spawn_companion wraps the std::process::Command::spawn error for the companion binary into this message. It fires when the OS cannot start the companion process at all — typically the binary path does not exist, lacks execute permission, or is blocked — not when the process starts and later exits.","triggerScenarios":"Thrown at crates/codex-plus-core/src/install/mod.rs:292 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Confirm the companion binary exists and is executable at the resolved path","Check the OS error text in the message for Permission denied vs NotFound","Reinstall the application to restore the bundled companion binary"],"exampleFix":null,"handlingStrategy":"try-catch","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-14T00:17:10.932Z"}