{"record":{"id":"4a3ae13565c5bb28","repo":"gitbutlerapp/gitbutler","slug":"no-app-bundle-found-in-extracted-archive","errorCode":null,"errorMessage":"No .app bundle found in extracted archive","messagePattern":"No \\.app bundle found in extracted archive","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but-installer/src/install_macos.rs","lineNumber":333,"sourceCode":"    let file = File::open(tarball)?;\n    let decoder = GzDecoder::new(file);\n    let mut archive = Archive::new(decoder);\n    archive\n        .unpack(dest_dir)\n        .context(\"Failed to extract archive\")?;\n\n    // Find the extracted .app bundle\n    let mut app_dir = None;\n    for entry in fs::read_dir(dest_dir)? {\n        let entry = entry?;\n        let path = entry.path();\n        if path.is_dir() && path.extension().and_then(|s| s.to_str()) == Some(\"app\") {\n            app_dir = Some(path);\n            break;\n        }\n    }\n\n    app_dir.ok_or_else(|| anyhow!(\"No .app bundle found in extracted archive\"))\n}\n\npub(crate) fn verify_app_structure(app_dir: &Path) -> Result<()> {\n    let binaries_dir = app_dir.join(\"Contents/MacOS\");\n    if !binaries_dir.is_dir() {\n        bail!(\n            \"Extracted app bundle does not contain expected directory structure (Contents/MacOS)\"\n        );\n    }\n\n    let required_binaries = [\"gitbutler-git-askpass\", \"gitbutler-tauri\"];\n\n    for binary in &required_binaries {\n        let binary_path = binaries_dir.join(binary);\n        if !binary_path.exists() {\n            bail!(\"Missing required binary: {binary}\");\n        }\n    }","sourceCodeStart":315,"sourceCodeEnd":351,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-installer/src/install_macos.rs#L315-L351","documentation":"extract_tarball scans the extracted archive for a directory whose extension is \".app\"; if none is found, it returns \"No .app bundle found in extracted archive\". The macOS installer requires every downloaded tarball to contain exactly one .app bundle to install.","triggerScenarios":"download_and_install_app downloads and extracts a tarball whose contents contain no directory with a .app extension.","commonSituations":"A wrong asset was published under the macOS platform URL (e.g. a Linux tarball or zip), a renamed/restructured bundle (GitButler.app -> gitbutler/ subfolder), or a corrupted/partial extraction.","solutions":["Inspect the archive contents (tar -tzf <file>) to confirm whether a .app bundle exists and where","Verify the release asset URL points to the macOS tarball, not another platform's artifact","Re-download to rule out a truncated download (validate_tarball should have caught checksum issues)","Use an installer version whose platform asset mapping matches the release"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// inspect archive before extraction\ntar -tzf gitbutler.tar.gz | grep -q '\\.app/' || echo \"no .app bundle: wrong or broken asset\"","typeGuard":null,"tryCatchPattern":"// rust\nif let Err(e) = download_and_install_app(&config, platform_info, &release, channel) {\n    if e.to_string().contains(\"No .app bundle found\") {\n        eprintln!(\"asset is not a macOS app bundle; check the release\");\n    }\n}","preventionTips":["Confirm the macOS platform asset is the GitButler.app tarball","List archive contents before installing custom/mirrored artifacts","Keep installer and release versions in sync"],"tags":["installer","archive-extraction","macos"],"backgroundTag":"unexpected-response-shape","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}