{"record":{"id":"8dcb66c0c64ede54","repo":"astrid-runtime/astrid","slug":"release-has-no-asset-name","errorCode":null,"errorMessage":"release has no asset '{name}'","messagePattern":"release has no asset '(.+?)'","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/astrid-cli/src/commands/self_update/mod.rs","lineNumber":318,"sourceCode":"/// Find exactly one release asset and return its browser download URL.\npub(super) fn exact_asset_url<'a>(\n    release: &'a serde_json::Value,\n    name: &str,\n) -> anyhow::Result<&'a str> {\n    let assets = release\n        .get(\"assets\")\n        .and_then(serde_json::Value::as_array)\n        .ok_or_else(|| anyhow::anyhow!(\"release has no asset list\"))?;\n    anyhow::ensure!(\n        assets.len() <= MAX_RELEASE_ASSETS,\n        \"release contains too many assets\"\n    );\n    let mut matches = assets\n        .iter()\n        .filter(|asset| asset.get(\"name\").and_then(|value| value.as_str()) == Some(name));\n    let asset = matches\n        .next()\n        .ok_or_else(|| anyhow::anyhow!(\"release has no asset '{name}'\"))?;\n    anyhow::ensure!(\n        matches.next().is_none(),\n        \"release contains duplicate asset '{name}'\"\n    );\n    asset\n        .get(\"browser_download_url\")\n        .and_then(|value| value.as_str())\n        .filter(|url| !url.is_empty())\n        .ok_or_else(|| anyhow::anyhow!(\"release asset '{name}' has no download URL\"))\n}\n\nfn publisher_bundle_url<'a>(\n    release: &'a serde_json::Value,\n    archive_name: &str,\n) -> Result<&'a str, UpdateStageError> {\n    let bundle_name = format!(\"{archive_name}.sigstore.json\");\n    exact_asset_url(release, &bundle_name)\n        .map_err(|error| UpdateStageError::publisher(error.to_string()))","sourceCodeStart":300,"sourceCodeEnd":336,"githubUrl":"https://github.com/astrid-runtime/astrid/blob/affd8760f44190dbdfbec23403f4c4b642c33112/crates/astrid-cli/src/commands/self_update/mod.rs#L300-L336","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Check the release page on GitHub to confirm an asset with the exact expected name exists.","Update to a release tag that includes artifacts for your platform.","If pointing at a fork via ASTRID_UPDATE_REPO, ensure it publishes assets with the same naming convention, or revert to the default repo.","Re-run the release workflow if assets were never uploaded."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// confirm the tag has the needed asset before updating\ncurl -fsSL https://api.github.com/repos/OWNER/REPO/releases/tags/TAG \\\n  | jq -e --arg n \"astrid-linux-x86_64.tar.gz\" '.assets[] | select(.name == $n)' >/dev/null","typeGuard":null,"tryCatchPattern":"match exact_asset_url(release, name) {\n    Err(e) => eprintln!(\"{e:#}; check https://github.com/{org}/{repo}/releases/tag/{tag} for artifacts\"),\n    Ok(url) => { /* download */ }\n}","preventionTips":["Only self-update to releases confirmed to ship your platform's artifacts.","Check the release page when a workflow runs on a brand-new tag.","Keep ASTRID_UPDATE_REPO forks publishing identical asset names."],"tags":["github","release","self-update","missing-artifact"],"backgroundTag":"resource-not-found","analyzedSha":"affd8760f44190dbdfbec23403f4c4b642c33112","analyzedAt":"2026-09-09T21:28:12.402Z","contentChangedAt":"2026-09-09T21:28:12.402Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}