herdrdev/herdr · error

curl failed: {err}

Error message

curl failed: {err}

What it means

When fetching the update manifest over HTTP, the curl invocation's .output() call failed to spawn at all. The spawn error is wrapped as 'curl failed: {err}' with the original error kind.

Source

Thrown at src/remote/attach.rs:1472

    }

    Ok(InstallSource::temporary(path, dir))
}

fn fetch_remote_manifest(url: &str) -> io::Result<Vec<u8>> {
    let output = crate::noninteractive_process::curl_command()
        .args([
            "-sfL",
            "--retry",
            "3",
            "--connect-timeout",
            "10",
            "--max-time",
            "20",
            url,
        ])
        .output()
        .map_err(|err| io::Error::new(err.kind(), format!("curl failed: {err}")))?;
    if !output.status.success() {
        return Err(command_failed("failed to fetch update manifest", &output));
    }
    Ok(output.stdout)
}

fn remote_asset_info(asset: &RemoteAssetRef) -> RemoteReleaseAsset {
    RemoteReleaseAsset {
        url: asset.url().to_string(),
        sha256: asset.sha256().map(str::to_string),
    }
}

fn preview_assets_for_build<'a>(
    manifest: &'a RemotePreviewManifest,
    build_id: &str,
) -> io::Result<(u32, &'a BTreeMap<String, RemoteAssetRef>)> {
    if manifest.build_id == build_id {

View on GitHub (pinned to f457cff4f2)

Solutions

  1. Confirm curl --version works in the exact environment herdr runs in
  2. Install curl or fix PATH so the spawn succeeds
  3. If sandboxed, allow exec of curl or pre-seed the manifest locally

Example fix

# before: no curl in image
# after
RUN apt-get update && apt-get install -y curl
Defensive patterns

Strategy: fallback

Validate before calling

if !curl_available() { eprintln!("curl required for update checks"); }

Try / catch

match fetch_manifest(url) {
    Err(e) if e.to_string().contains("curl failed") => use_cached_manifest(),
    r => r,
}

Prevention

When it happens

Trigger: curl binary missing, not executable, wrong architecture, or process creation blocked (sandbox, resource limits) while fetching the update manifest URL.

Common situations: Minimal Docker images, hardened sandboxes denying exec, PATH differences in non-interactive SSH environments.

Related errors


AI-assisted analysis of herdrdev/herdr@f457cff4f2 (2026-08-28). Data as JSON: /api/errors/1d87df7419f64a4c. Report an issue: GitHub.