denoland/deno · error · AnyError
Downloaded artifact does not contain '{}'. Contents: {:?}
Error message
Downloaded artifact does not contain '{}'. Contents: {:?} What it means
A PR artifact was downloaded and unpacked into a temp dir, but the expected `deno` (or `deno.exe` on Windows) executable is not among the extracted files; Deno lists the actual directory contents to help diagnose. This means the artifact zip has an unexpected layout — the binary is missing, nested under a subdirectory, or the artifact is not the build you assumed.
Source
Thrown at cli/tools/upgrade.rs:773
break;
}
}
if !downloaded {
bail!(
"Could not find a \"{}\" artifact for PR #{pr_number}.\n\
Available artifacts may have expired or CI may not have completed.\n\
Only release builds on linux-x86_64 and debug builds are typically available for PRs.",
artifact_name
);
}
// Find the downloaded binary
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 '{}'. Contents: {:?}",
exe_name,
fs::read_dir(download_dir)?
.filter_map(|e| e.ok())
.map(|e| e.file_name().to_string_lossy().to_string())
.collect::<Vec<_>>()
);
}
// Set executable permissions
#[cfg(unix)]
{
use std::os::unix::fs::PermissionsExt;
fs::set_permissions(&new_exe_path, std::fs::Permissions::from_mode(0o755))?;
}
// Verify the binary works
check_exe(&new_exe_path)?;View on GitHub (pinned to 9ad36f7a2c)
Solutions
- Read the 'Contents:' list in the error — if the binary sits in a subfolder or has a different name, that is a packaging change; report it against the PR/Deno.
- Retry the download in case of a truncated transfer (the temp dir is recreated each run).
- Check the PR's CI workflow for how artifacts are packaged and pick the correct artifact.
- Fall back to building the PR branch locally (`cargo build --bin deno`) until packaging is fixed.
Defensive patterns
Strategy: fallback
Validate before calling
# pre-inspect the artifact layout before letting deno download it tmp=$(mktemp -d) gh run download <run-id> -n release-linux-x86_64-deno --repo denoland/deno -D "$tmp" test -x "$tmp/deno" || echo "layout changed — binary not at archive root"
Try / catch
deno upgrade --pr 12345 2>err.log || { grep -q 'does not contain' err.log && gh run download <run-id> -D manual && ./manual/deno -V; } Prevention
- Report packaging changes on the PR when the binary is not at the archive root.
- Keep temp-dir disk space available so extraction is not partial.
- Fall back to `cargo build --bin deno` when artifacts are malformed.
When it happens
Trigger: CI artifact packaging changes (binary moved into a subfolder or renamed); downloading an artifact type (e.g. libs/tests) that contains no binary; partial/corrupted download that unpacked only metadata; the code at cli/tools/upgrade.rs:773 finding `download_dir.join(exe_name)` missing.
Common situations: Upgrading Deno from a PR right after the CI packaging workflow was refactored; disk-full temp dirs producing incomplete extraction; mixed-release/debug artifact layouts.
Related errors
- Downloaded artifact does not contain '{exe_name}'.
- Unsupported platform for PR builds: {}
- Could not find a "{}" artifact for PR #{pr_number}. Availabl
- The `gh` CLI is required for installing from a PR. Install i
- Failed to find PR #{pr_number}: {stderr}
AI-assisted analysis of denoland/deno@9ad36f7a2c (2026-08-20).
Data as JSON: /api/errors/7f4a6e28300f52bb.
Report an issue: GitHub.