{"record":{"id":"5240a445344d4140","repo":"gitbutlerapp/gitbutler","slug":"platform-not-found-in-release","errorCode":null,"errorMessage":"Platform {} not found in release","messagePattern":"Platform (.+?) not found in release","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but-installer/src/lib.rs","lineNumber":150,"sourceCode":"            Some(Channel::Nightly)\n        }\n        VersionRequest::Specific(version) => {\n            info(&format!(\"Installing version: {version}\"));\n            None\n        }\n        VersionRequest::Release => {\n            info(&format!(\n                \"Installing latest release version: {}\",\n                release.version\n            ));\n            Some(Channel::Release)\n        }\n    };\n\n    let platform_info = release\n        .platforms\n        .get(&config.platform)\n        .ok_or_else(|| anyhow::anyhow!(\"Platform {} not found in release\", config.platform))?;\n\n    download_and_install_app(&config, platform_info, &release, channel)?;\n\n    if interactive {\n        info(\"Checking shell configuration\");\n        configure_shell(&config.home_dir)?;\n    }\n\n    ui::println_empty();\n    success(&format!(\n        \"✓ GitButler CLI installation completed! ({}{})\",\n        channel\n            .map(|c| format!(\"{} \", c.display_name()))\n            .unwrap_or_default(),\n        release.version\n    ));\n    ui::println_empty();\n","sourceCodeStart":132,"sourceCodeEnd":168,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/caf1f223d3cfb94488c9198ad34487c6006c648f/crates/but-installer/src/lib.rs#L132-L168","documentation":"Thrown in crates/but-installer/src/lib.rs when release.platforms (a map keyed by platform string) has no entry for config.platform. This fails earlier than the per-OS URL errors: the release metadata does not describe this platform at all, so no PlatformInfo exists to pass to download_and_install_app.","triggerScenarios":"config.platform (auto-detected or user-set platform string) not matching any key in the fetched release's platforms map; installing a release that predates support for the platform (e.g. an ARM/variant key added later); nightly metadata temporarily omitting a platform.","commonSituations":"Running on uncommon hardware/OS variants whose platform key the release does not list; forcing a platform override the API does not know; very old pinned releases that only shipped macos/windows keys.","solutions":["Log the keys of release.platforms to see which platforms the release actually ships, then align config.platform with one of them.","Install the latest release, which publishes the widest set of platform keys.","Remove any platform override so auto-detection picks the canonical key.","If your platform is genuinely absent from every recent release, file a support request — it is a publishing gap, not a client bug."],"exampleFix":"// before\nlet platform_info = release\n    .platforms\n    .get(&config.platform)\n    .ok_or_else(|| anyhow::anyhow!(\"Platform {} not found in release\", config.platform))?;\n\n// after: fail with the actionable list of supported platforms\nlet platform_info = release.platforms.get(&config.platform).ok_or_else(|| {\n    let available = release.platforms.keys().cloned().collect::<Vec<_>>().join(\", \");\n    anyhow::anyhow!(\n        \"Platform {} not found in release {} (available: {available})\",\n        config.platform,\n        release.version\n    )\n})?;","handlingStrategy":"validation","validationCode":"// Before resolving platform_info\nif !release.platforms.contains_key(&config.platform) {\n    let available: Vec<_> = release.platforms.keys().cloned().collect();\n    eprintln!(\"platform {} not in release; available: {:?}\", config.platform, available);\n    return Ok(());\n}","typeGuard":"fn release_supports_platform(release: &Release, platform: &str) -> bool {\n    release.platforms.contains_key(platform)\n}","tryCatchPattern":"let platform_info = match release.platforms.get(&config.platform) {\n    Some(info) => info,\n    None => {\n        // log available keys, re-fetch latest release, or bail with context\n        anyhow::bail!(\"platform {} unsupported; available: {:?}\", config.platform, release.platforms.keys().collect::<Vec<_>>())\n    }\n};","preventionTips":["Print the release's supported platform keys on failure so mismatches are self-diagnosing.","Avoid overriding auto-detected platform strings unless they match the API's keys exactly.","Prefer the latest release when supporting new hardware variants."],"tags":["installer","platform-detection","release-metadata"],"backgroundTag":"unsupported-platform","analyzedSha":"caf1f223d3cfb94488c9198ad34487c6006c648f","analyzedAt":"2026-08-20T07:55:40.983Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}