dagger/dagger · error
could not find a matching file
Error message
could not find a matching file
What it means
extract_from_tar scanned every entry of the downloaded gzip tarball and no entry path ended with 'dagger', so the expected CLI binary was not found — the archive layout is unexpected or the archive is corrupt/wrong artifact.
Source
Thrown at sdk/rust/crates/dagger-sdk/src/core/downloader.rs:239
Ok(hex::encode(res))
}
fn extract_from_tar(&self, temp: &[u8], output: &mut Vec<u8>) -> eyre::Result<()> {
let decompressed_temp = GzDecoder::new(temp);
let mut archive = Archive::new(decompressed_temp);
for entry in archive.entries()? {
let mut entry = entry?;
let path = entry.path()?;
if path.ends_with("dagger") {
copy(&mut entry, output)?;
return Ok(());
}
}
eyre::bail!("could not find a matching file")
}
}
#[derive(Debug, Error)]
#[error("CLI release unavailable: failed to download checksums from {url}: {status}")]
pub(super) struct CliReleaseUnavailableError {
pub(super) url: String,
pub(super) status: StatusCode,
}
pub(super) fn has_cli_release_unavailable_error(error: &DaggerError) -> bool {
match error {
DaggerError::DownloadClient(error) => {
error.downcast_ref::<CliReleaseUnavailableError>().is_some()
}
_ => false,
}
}View on GitHub (pinned to 82ba2681db)
Solutions
- Verify the CLI archive URL/version points at the official release artifact
- Clear the download cache and retry to rule out a corrupted download
- Report the archive name/URL if an official artifact consistently lacks a 'dagger' entry
Defensive patterns
Strategy: validation
Try / catch
match session::connect().await {
Err(e) if format!("{e}").contains("could not find a matching file") => {
std::fs::remove_dir_all(cache_dir).ok();
retry_with_backoff(3).await
}
other => other,
} Prevention
- Clear the dagger cache directory after version upgrades
- Avoid artifacts mirrors that may serve wrong tarballs
- Keep the dagger-sdk crate aligned with CLI releases
When it happens
Trigger: extract_cli_archive → extract_from_tar when the downloaded tarball contains no file matching the expected CLI binary name (wrong artifact served, empty archive, or layout change).
Common situations: Mirror serving a wrong/placeholder artifact, release packaging change in a newer version vs pinned SDK, or corrupted archive that decompressed into nothing usable.
Related errors
- could not find checksum in checksums.txt
- could not find file_name in checksums.txt
- invalid checksum line: %s
- failed to scan checksums from %s: %w
- Could not find dagger binary in CLI archive
AI-assisted analysis of dagger/dagger@82ba2681db (2026-09-05).
Data as JSON: /api/errors/a9b94a2cd28482ce.
Report an issue: GitHub.