{"record":{"id":"c37f7f8d9b10e3fa","repo":"BigPizzaV3/CodexPlusPlus","slug":"macos-bundle-binary-is-unavailable-at-error","errorCode":null,"errorMessage":"macOS bundle binary is unavailable at {}: {error}","messagePattern":"macOS bundle binary is unavailable at (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/codex-plus-core/src/install/macos.rs","lineNumber":141,"sourceCode":"        let mut permissions = fs::metadata(&target)?.permissions();\n        permissions.set_mode(0o755);\n        fs::set_permissions(target, permissions)?;\n    } else {\n        anyhow::bail!(\"macOS bundle is missing its binary source\");\n    }\n    let executable = macos.join(executable_name_from_plist(&bundle.info_plist));\n    fs::write(&executable, &bundle.launch_script)?;\n    let mut permissions = fs::metadata(&executable)?.permissions();\n    permissions.set_mode(0o755);\n    fs::set_permissions(executable, permissions)?;\n    copy_icon(&resources)?;\n    Ok(())\n}\n\n#[cfg(target_os = \"macos\")]\nfn validate_binary_source(path: &Path) -> anyhow::Result<()> {\n    let metadata = fs::metadata(path).map_err(|error| {\n        anyhow::anyhow!(\n            \"macOS bundle binary is unavailable at {}: {error}\",\n            path.display()\n        )\n    })?;\n    if !metadata.is_file() {\n        anyhow::bail!(\n            \"macOS bundle binary is not a regular file: {}\",\n            path.display()\n        );\n    }\n    if metadata.len() < 1024 {\n        anyhow::bail!(\n            \"macOS bundle binary is unexpectedly small: {}\",\n            path.display()\n        );\n    }\n    let mut header = [0_u8; 2];\n    let mut file = fs::File::open(path)?;","sourceCodeStart":123,"sourceCodeEnd":159,"githubUrl":"https://github.com/BigPizzaV3/CodexPlusPlus/blob/f2074595a281bc057525c748175c8eb9805b0673/crates/codex-plus-core/src/install/macos.rs#L123-L159","documentation":"During macOS app-bundle installation, the installer validates that the source binary to copy into the bundle exists at the expected path before copying and chmod-ing it. The bail fires when that source binary is absent, so the bundle would otherwise be written without a usable executable.","triggerScenarios":"Thrown at crates/codex-plus-core/src/install/macos.rs:141 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the release archive extracted completely and contains the binary","Check the bundle source directory layout matches what write_bundle expects","Re-download or reinstall the package"],"exampleFix":null,"handlingStrategy":"validation","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"}