denoland/deno · error · AnyError
Could not find a "{artifact_name}" artifact for branch '{bra
Error message
Could not find a "{artifact_name}" artifact for branch '{branch}'.
Artifacts may have expired or CI may not have completed. What it means
For a branch install, Deno iterates the (up to 5) most recent CI runs trying both the release and debug artifact names; if none of the runs expose either artifact, it bails. Causes mirror the PR case: artifacts expire, CI is incomplete, or the wanted artifact type was never produced for that branch.
Source
Thrown at cli/tools/upgrade.rs:930
.context("failed to run `gh run download`")?;
if dl_result.status.success() {
log::info!(
"Downloaded artifact \"{}\" from run {}",
colors::green(name),
run_id
);
downloaded = true;
break;
}
}
if downloaded {
break;
}
}
if !downloaded {
bail!(
"Could not find a \"{artifact_name}\" artifact for branch '{branch}'.\n\
Artifacts may have expired or CI may not have completed."
);
}
let exe_name = if cfg!(windows) { "deno.exe" } else { "deno" };
let new_exe_path = download_dir.join(exe_name);
if !new_exe_path.exists() {
bail!("Downloaded artifact does not contain '{exe_name}'.");
}
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
fs::set_permissions(&new_exe_path, std::fs::Permissions::from_mode(0o755))?;
}
View on GitHub (pinned to 9ad36f7a2c)
Solutions
- Wait for the newest run on the branch to finish uploading artifacts and retry.
- Inspect available artifacts: `gh run view <run-id> --repo denoland/deno` and match against the expected name (`release-<os>-<arch>-deno` / debug variant).
- If artifacts expired, re-run the workflow or build the branch from source.
- On non-linux-x86_64 platforms, target the debug artifact or build locally.
Defensive patterns
Strategy: retry
Validate before calling
run_id=$(gh run list --branch "$BRANCH" --repo denoland/deno --limit 1 -q '.[].databaseId') gh api "repos/denoland/deno/actions/runs/$run_id/artifacts" --jq '.artifacts[].name' | grep -Eq 'release-|debug-' || echo "no usable artifact yet"
Try / catch
deno upgrade --branch "$BRANCH" 2>err.log || { grep -q 'Could not find a' err.log && { sleep 300; deno upgrade --branch "$BRANCH"; }; } Prevention
- Install from branches whose latest run finished the artifact-upload step.
- Expect only release (linux-x86_64) and debug artifacts on branches.
- Old branches: re-run the workflow or build from source once artifacts expire.
When it happens
Trigger: `deno upgrade` from a branch where all listed runs predate artifact upload, artifacts passed GitHub's retention window, or only platform-specific artifacts (e.g. linux-x86_64 release) exist while you need another platform.
Common situations: Old branches whose artifacts expired; racing an in-flight CI run; requesting release artifacts on platforms where only debug artifacts exist.
Related errors
- Could not find a "{}" artifact for PR #{pr_number}. Availabl
- No CI runs found for branch '{branch}'. CI may not have run
- Downloaded artifact does not contain '{exe_name}'.
- Unsupported platform for PR builds: {}
- No CI runs found for PR #{pr_number}. The PR may not have be
AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20).
Data as JSON: /api/errors/bdeff4b742082e62.
Report an issue: GitHub.