spacedriveapp/spacedrive · error · anyhow::Error

Could not find sd binary for platform: {}

Error message

Could not find sd binary for platform: {}

What it means

'sd update' fetches the latest GitHub release and scans release.assets for one whose name contains both the detected platform string (printed as 'Platform:') and 'sd'. This error means no asset matched: the release has no CLI binary for your platform, or the asset naming scheme changed.

Source

Thrown at apps/cli/src/domains/update/mod.rs:71

		std::io::stdin().read_line(&mut response)?;

		if !response.trim().eq_ignore_ascii_case("y") {
			println!("Update cancelled.");
			return Ok(());
		}
	}

	// Determine platform
	let platform = get_platform_string();
	println!();
	println!("Platform: {}", platform);

	// Find matching assets
	let sd_asset = latest_release
		.assets
		.iter()
		.find(|a| a.name.contains(&platform) && a.name.contains("sd"))
		.ok_or_else(|| anyhow::anyhow!("Could not find sd binary for platform: {}", platform))?;

	let daemon_asset = latest_release
		.assets
		.iter()
		.find(|a| a.name.contains(&platform) && a.name.contains("sd-daemon"))
		.ok_or_else(|| {
			anyhow::anyhow!("Could not find sd-daemon binary for platform: {}", platform)
		})?;

	println!("Downloading updates...");

	// Download binaries
	let sd_data = download_file(&sd_asset.browser_download_url, sd_asset.size).await?;
	let daemon_data = download_file(&daemon_asset.browser_download_url, daemon_asset.size).await?;

	// Get current binary paths
	let current_exe = std::env::current_exe()?;
	let bin_dir = current_exe

View on GitHub (pinned to 6dfeccf211)

Solutions

  1. Compare the printed 'Platform:' string against asset names on the GitHub release page
  2. Download the closest matching CLI artifact manually and place it in the same directory as sd-daemon
  3. If you build from source, update via cargo build --release instead of 'sd update'
  4. Fix or report the release workflow so an sd-named asset exists for your platform
Defensive patterns

Strategy: fallback

Validate before calling

#!/usr/bin/env bash
# Verify a matching asset exists before running sd update
repo="spacedrive/spacedrive"
platform=$(sd update --dry-run 2>/dev/null | grep '^Platform:' | cut -d' ' -f2)
curl -s "https://api.github.com/repos/$repo/releases/latest" \
  | jq -e --arg p "$platform" '.assets[]?.name | contains($p) and contains("sd")' >/dev/null \
  || { echo "No sd asset for $platform; update manually"; exit 2; }

Try / catch

match latest_release.assets.iter().find(|a| a.name.contains(&platform) && a.name.contains("sd")) {
    Some(asset) => asset,
    None => {
        // fallback: print asset names and let the user pick instead of hard-failing
        eprintln!("No asset matched {}. Available: {:?}", platform, latest_release.assets.iter().map(|a| &a.name).collect::<Vec<_>>());
        continue;
    }
};

Prevention

When it happens

Trigger: Running 'sd update' on a platform without a published artifact (e.g. ARM Linux when only x86_64 assets exist); a release whose CLI asset was renamed so it no longer contains 'sd'; a draft/partial release.

Common situations: Nightly builds with an incomplete target matrix; musl-vs-glibc platform strings not matching asset suffixes; running from source where you never installed release binaries.

Related errors


AI-assisted analysis of spacedriveapp/spacedrive@6dfeccf211 (2026-08-16). Data as JSON: /api/errors/409656429fd33342. Report an issue: GitHub.