{"record":{"id":"4d41154f91dd4629","repo":"BoundaryML/baml","slug":"archive-missing-expected-binary-name","errorCode":null,"errorMessage":"archive missing expected binary {name}","messagePattern":"archive missing expected binary (.+?)","errorType":"exception","errorClass":"FetchError","httpStatus":null,"severity":"error","filePath":"baml_language/crates/baml_release/src/lib.rs","lineNumber":97,"sourceCode":"    Network { url: String, source: reqwest::Error },\n    #[error(\"HTTP {status} fetching {url}\")]\n    HttpStatus {\n        url: String,\n        status: reqwest::StatusCode,\n    },\n    #[error(\"manifest 404 for version {version} (not released yet?)\")]\n    ManifestNotFound { version: String },\n    #[error(\"manifest schema {got} not supported (max {max}); run `baml self-update`\")]\n    ManifestSchemaTooNew { got: u32, max: u32 },\n    #[error(\"target {target} not built for version {version}\")]\n    TargetNotInManifest { target: String, version: String },\n    #[error(\"sha256 mismatch for {url}: expected {expected}, got {got}\")]\n    ChecksumMismatch {\n        url: String,\n        expected: String,\n        got: String,\n    },\n    #[error(\"archive missing expected binary {name}\")]\n    BinaryNotInArchive { name: String },\n    #[error(\"archive contains unsafe path {path}\")]\n    UnsafeArchivePath { path: String },\n    #[error(\"disk error: {0}\")]\n    Io(#[from] std::io::Error),\n    #[error(\"zip archive error: {0}\")]\n    Zip(#[from] zip::result::ZipError),\n}\n\n#[derive(Debug, Clone)]\npub struct Fetcher {\n    pub spec: ReleaseSpec,\n    pub product: Product,\n    pub manifest_base_url: String,\n    pub release_repo: String,\n    artifact: Option<Artifact>,\n}\n","sourceCodeStart":79,"sourceCodeEnd":115,"githubUrl":"https://github.com/BoundaryML/baml/blob/bd85ce9dee1463ff04d27efd20531013a4ff46c1/baml_language/crates/baml_release/src/lib.rs#L79-L115","documentation":"FetchError::BinaryNotInArchive is thrown by baml_release when a downloaded release archive is extracted but does not contain the expected binary file name for the target. The archive opened fine (checksum passed) but its contents are missing the file the installer needs, indicating a bad or mis-packaged release artifact.","triggerScenarios":"Extracting a downloaded release archive and finding no entry named like `baml`/`baml.exe` — happens when the release pipeline published a wrongly packaged zip, or the manifest expects a name the archive doesn't use.","commonSituations":"A broken release build that uploaded a stub or wrong zip, an interrupted release publish that shipped partial packaging, or a target whose artifact naming changed between versions.","solutions":["Retry with a different (preferably latest) version — the artifact itself is likely mis-packaged","Verify the archive manually (unzip -l) to see what it actually contains","Report the broken artifact to the BAML maintainers","If pinning, switch to the previous known-good version"],"exampleFix":"# before\n$ baml install --version 0.199.0\narchive missing expected binary baml\n# after\n$ baml install --version 0.200.0","handlingStrategy":"fallback","validationCode":"// inspect archive contents before extraction\nlet names: Vec<String> = zip.file_names().map(String::from).collect();\nif !names.iter().any(|n| n.ends_with(expected_binary)) {\n    eprintln!(\"archive lacks {expected_binary}; artifact is mis-packaged\");\n}","typeGuard":"fn is_binary_missing(e: &FetchError) -> bool {\n    matches!(e, FetchError::BinaryNotInArchive { .. })\n}","tryCatchPattern":"match install(v) {\n    Err(FetchError::BinaryNotInArchive { name }) => {\n        eprintln!(\"{name} missing from artifact for {v}; falling back\");\n        install(prev_stable_version())\n    }\n    other => other,\n}","preventionTips":["Pin to known-good released versions","After a broken artifact is reported, skip that version","Spot-check new releases (unzip -l) before rolling them out org-wide","Report mis-packaged artifacts to maintainers promptly"],"tags":["archive","release","packaging"],"backgroundTag":"resource-not-found","analyzedSha":"bd85ce9dee1463ff04d27efd20531013a4ff46c1","analyzedAt":"2026-09-12T03:38:25.718Z","contentChangedAt":"2026-09-12T03:38:25.718Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}