astrid-runtime/astrid · error

release has no asset '{name}'

Error message

release has no asset '{name}'

What it means

After filtering the release's assets by exact name, exact_asset_url requires at least one match. If no asset in the release has the requested name, it throws this error naming the missing asset. This is the standard 'expected artifact not present in release' failure.

Source

Thrown at crates/astrid-cli/src/commands/self_update/mod.rs:318

/// Find exactly one release asset and return its browser download URL.
pub(super) fn exact_asset_url<'a>(
    release: &'a serde_json::Value,
    name: &str,
) -> anyhow::Result<&'a str> {
    let assets = release
        .get("assets")
        .and_then(serde_json::Value::as_array)
        .ok_or_else(|| anyhow::anyhow!("release has no asset list"))?;
    anyhow::ensure!(
        assets.len() <= MAX_RELEASE_ASSETS,
        "release contains too many assets"
    );
    let mut matches = assets
        .iter()
        .filter(|asset| asset.get("name").and_then(|value| value.as_str()) == Some(name));
    let asset = matches
        .next()
        .ok_or_else(|| anyhow::anyhow!("release has no asset '{name}'"))?;
    anyhow::ensure!(
        matches.next().is_none(),
        "release contains duplicate asset '{name}'"
    );
    asset
        .get("browser_download_url")
        .and_then(|value| value.as_str())
        .filter(|url| !url.is_empty())
        .ok_or_else(|| anyhow::anyhow!("release asset '{name}' has no download URL"))
}

fn publisher_bundle_url<'a>(
    release: &'a serde_json::Value,
    archive_name: &str,
) -> Result<&'a str, UpdateStageError> {
    let bundle_name = format!("{archive_name}.sigstore.json");
    exact_asset_url(release, &bundle_name)
        .map_err(|error| UpdateStageError::publisher(error.to_string()))

View on GitHub (pinned to affd8760f4)

Solutions

  1. Check the release page on GitHub to confirm an asset with the exact expected name exists.
  2. Update to a release tag that includes artifacts for your platform.
  3. If pointing at a fork via ASTRID_UPDATE_REPO, ensure it publishes assets with the same naming convention, or revert to the default repo.
  4. Re-run the release workflow if assets were never uploaded.
Defensive patterns

Strategy: validation

Validate before calling

// confirm the tag has the needed asset before updating
curl -fsSL https://api.github.com/repos/OWNER/REPO/releases/tags/TAG \
  | jq -e --arg n "astrid-linux-x86_64.tar.gz" '.assets[] | select(.name == $n)' >/dev/null

Try / catch

match exact_asset_url(release, name) {
    Err(e) => eprintln!("{e:#}; check https://github.com/{org}/{repo}/releases/tag/{tag} for artifacts"),
    Ok(url) => { /* download */ }
}

Prevention

When it happens

Trigger: Looking up a platform archive, publisher bundle, integrity manifest, or signed channel file that the target release does not contain — e.g. updating on a platform whose build wasn't published for that release, or fetching by a tag whose workflow partially failed.

Common situations: Running self update on an OS/arch the release didn't ship binaries for; a release workflow that failed to upload the integrity manifest; pointing ASTRID_UPDATE_REPO at a fork whose releases use different asset names.

Understand the failure class

Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.

Related errors


AI-assisted analysis of astrid-runtime/astrid@affd8760f4 (2026-09-09). Data as JSON: /api/errors/8dcb66c0c64ede54. Report an issue: GitHub.