{"record":{"id":"a9b94a2cd28482ce","repo":"dagger/dagger","slug":"could-not-find-a-matching-file","errorCode":null,"errorMessage":"could not find a matching file","messagePattern":"could not find a matching file","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdk/rust/crates/dagger-sdk/src/core/downloader.rs","lineNumber":239,"sourceCode":"        Ok(hex::encode(res))\n    }\n\n    fn extract_from_tar(&self, temp: &[u8], output: &mut Vec<u8>) -> eyre::Result<()> {\n        let decompressed_temp = GzDecoder::new(temp);\n        let mut archive = Archive::new(decompressed_temp);\n\n        for entry in archive.entries()? {\n            let mut entry = entry?;\n            let path = entry.path()?;\n\n            if path.ends_with(\"dagger\") {\n                copy(&mut entry, output)?;\n\n                return Ok(());\n            }\n        }\n\n        eyre::bail!(\"could not find a matching file\")\n    }\n}\n\n#[derive(Debug, Error)]\n#[error(\"CLI release unavailable: failed to download checksums from {url}: {status}\")]\npub(super) struct CliReleaseUnavailableError {\n    pub(super) url: String,\n    pub(super) status: StatusCode,\n}\n\npub(super) fn has_cli_release_unavailable_error(error: &DaggerError) -> bool {\n    match error {\n        DaggerError::DownloadClient(error) => {\n            error.downcast_ref::<CliReleaseUnavailableError>().is_some()\n        }\n        _ => false,\n    }\n}","sourceCodeStart":221,"sourceCodeEnd":257,"githubUrl":"https://github.com/dagger/dagger/blob/82ba2681dbe30d3547a1dc50ea495900ab5b6047/sdk/rust/crates/dagger-sdk/src/core/downloader.rs#L221-L257","documentation":"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.","triggerScenarios":"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).","commonSituations":"Mirror serving a wrong/placeholder artifact, release packaging change in a newer version vs pinned SDK, or corrupted archive that decompressed into nothing usable.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":"match session::connect().await {\n    Err(e) if format!(\"{e}\").contains(\"could not find a matching file\") => {\n    std::fs::remove_dir_all(cache_dir).ok();\n    retry_with_backoff(3).await\n}\n    other => other,\n}","preventionTips":["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"],"tags":["rust","tar","download","parsing"],"backgroundTag":"artifact-not-found","analyzedSha":"82ba2681dbe30d3547a1dc50ea495900ab5b6047","analyzedAt":"2026-09-05T07:21:37.930Z","contentChangedAt":"2026-09-05T07:21:37.930Z","schemaVersion":2},"datasetVersion":"2026-09-12T12:17:11.808Z"}