gitbutlerapp/gitbutler · error

No download URL for platform {} in release {}

Error message

No download URL for platform {} in release {}

What it means

macOS counterpart of the Linux error, thrown in download_and_install_app in crates/but-installer/src/install_macos.rs when PlatformInfo.url is None for config.platform. The release metadata entry for the platform exists but has no .tar.gz download URL, so the installer cannot proceed to validate_download_url or download the tarball.

Source

Thrown at crates/but-installer/src/install_macos.rs:31

use flate2::read::GzDecoder;
use tar::Archive;

use crate::{
    config::{Channel, InstallerConfig},
    download::download_file,
    install::{validate_installed_binary, verify_signature},
    release::{PlatformInfo, Release, validate_download_url},
    ui::{info, success, warn},
};

pub fn download_and_install_app(
    config: &InstallerConfig,
    platform_info: &PlatformInfo,
    release: &Release,
    channel: Option<Channel>,
) -> Result<()> {
    let download_url = platform_info.url.as_deref().ok_or_else(|| {
        anyhow::anyhow!(
            "No download URL for platform {} in release {}",
            config.platform,
            release.version
        )
    })?;

    validate_download_url(download_url)?;
    info(&format!("Download URL: {download_url}"));

    let temp_dir = tempfile::Builder::new()
        .prefix("gitbutler-install.")
        .tempdir()?;

    let filename = download_url
        .split('/')
        .next_back()
        .ok_or_else(|| anyhow::anyhow!("Failed to extract filename from download URL"))?;
    let tarball_path = temp_dir.path().join(filename);

View on GitHub (pinned to caf1f223d3)

Solutions

  1. Install the latest release or nightly channel, which always carries the macOS tarball URL.
  2. Verify the release JSON: the entry under release.platforms[config.platform] must have a non-null url.
  3. Check which platform key was detected (config.platform) and confirm it matches the key the release actually uses.
  4. If the latest release is also missing the artifact, report it — it is a publishing-side gap.
Defensive patterns

Strategy: validation

Validate before calling

// Before calling download_and_install_app on macOS
if platform_info.url.is_none() {
    eprintln!("release {} has no macOS tarball; try latest", release.version);
    return Ok(());
}

Type guard

fn has_download_url(p: &PlatformInfo) -> bool {
    p.url.as_deref().map(|u| !u.is_empty()).unwrap_or(false)
}

Try / catch

match download_and_install_app(&config, platform_info, &release, channel) {
    Ok(()) => {},
    Err(e) if e.to_string().contains("No download URL for platform") => {
        // re-fetch with VersionRequest::Release and retry
    },
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Installing a release whose platforms entry for the macOS platform key (e.g. "macos") has a null url; requesting a release that predates macOS tarball publishing; API response no longer populating the url field.

Common situations: Installing an old pinned release without macOS artifacts; running under Rosetta or an arch variant whose platform key resolved to an entry with no artifact; an incomplete release published to the API.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@caf1f223d3 (2026-08-20). Data as JSON: /api/errors/35f318022926275e. Report an issue: GitHub.