BigPizzaV3/CodexPlusPlus · error
macOS bundle is missing its binary source
Error message
macOS bundle is missing its binary source
What it means
Thrown by write_bundle while assembling a macOS .app bundle when the bundle declares a binary_source (and binary_target_name) pair but the required binary source slot is inconsistent — i.e. the write_bundle fast path cannot proceed because the bundle is missing its binary source. The offending input is the MacosAppBundle's binary_source/binary_target_name pair; without a valid source binary the .app would be a shell without an executable.
Source
Thrown at crates/codex-plus-core/src/install/macos.rs:127
fn write_bundle(bundle: &MacosAppBundle) -> anyhow::Result<()> {
let contents = bundle.app_path.join("Contents");
let macos = contents.join("MacOS");
let resources = contents.join("Resources");
fs::create_dir_all(&macos)?;
fs::create_dir_all(&resources)?;
fs::write(contents.join("Info.plist"), &bundle.info_plist)?;
if let (Some(source), Some(target_name)) = (&bundle.binary_source, &bundle.binary_target_name) {
validate_binary_source(source)?;
let target = macos.join(target_name);
if source != &target {
fs::copy(source, &target)?;
}
validate_binary_source(&target)?;
let mut permissions = fs::metadata(&target)?.permissions();
permissions.set_mode(0o755);
fs::set_permissions(target, permissions)?;
} else {
anyhow::bail!("macOS bundle is missing its binary source");
}
let executable = macos.join(executable_name_from_plist(&bundle.info_plist));
fs::write(&executable, &bundle.launch_script)?;
let mut permissions = fs::metadata(&executable)?.permissions();
permissions.set_mode(0o755);
fs::set_permissions(executable, permissions)?;
copy_icon(&resources)?;
Ok(())
}
#[cfg(target_os = "macos")]
fn validate_binary_source(path: &Path) -> anyhow::Result<()> {
let metadata = fs::metadata(path).map_err(|error| {
anyhow::anyhow!(
"macOS bundle binary is unavailable at {}: {error}",
path.display()
)
})?;View on GitHub (pinned to f2074595a2)
Solutions
- 检查 bundle 配置确保 binary_source 与 binary_target_name 成对提供
- 确认源二进制路径存在且可读
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/install/macos.rs:127 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/b7ff9752a641e21f.
Report an issue: GitHub.