{"record":{"id":"c8faf0f54943d3c0","repo":"jdx/mise","slug":"no-checksum-entry-found-for-filename-in-checksum","errorCode":null,"errorMessage":"no checksum entry found for {filename} in checksum file","messagePattern":"no checksum entry found for (.+?) in checksum file","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/backend/aqua.rs","lineNumber":2501,"sourceCode":"\n    /// Parse a checksum from checksum file content for a specific filename.\n    fn parse_checksum_from_content(\n        &self,\n        content: &str,\n        checksum_config: &AquaChecksum,\n        filename: &str,\n    ) -> Result<String> {\n        let mut checksum_file = content.to_string();\n\n        if checksum_config.file_format() == \"regexp\" {\n            let pattern = checksum_config.pattern();\n            if let Some(file_pattern) = &pattern.file {\n                let re = regex::Regex::new(file_pattern.as_str())?;\n                let Some(line) = checksum_file\n                    .lines()\n                    .find(|l| re.captures(l).is_some_and(|c| c[1].to_string() == filename))\n                else {\n                    bail!(\"no checksum entry found for {filename} in checksum file\");\n                };\n                checksum_file = line.to_string();\n            }\n            let re = regex::Regex::new(pattern.checksum.as_str())?;\n            if let Some(caps) = re.captures(checksum_file.as_str()) {\n                checksum_file = caps[1].to_string();\n            } else {\n                debug!(\n                    \"no checksum found matching {} in checksum file\",\n                    pattern.checksum\n                );\n            }\n        }\n\n        // Standard format: \"<hash>  <filename>\" or \"<hash> *<filename>\"\n        let entries = checksum_file\n            .lines()\n            .filter_map(|l| {","sourceCodeStart":2483,"sourceCodeEnd":2519,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/backend/aqua.rs#L2483-L2519","documentation":"Aqua checksum files list `digest filename` lines. When a file_pattern-based lookup is configured, the backend regex-matches lines to find the entry whose captured filename equals the artifact's filename; if no line's captured name matches, it throws this error because the artifact's checksum cannot be located.","triggerScenarios":"Verifying an aqua artifact whose checksum config specifies a `file` regex pattern, but the downloaded checksums file contains no line whose captured group (c[1]) equals the artifact filename — e.g. the regex captures a different part of the line or the file lists checksums under different names.","commonSituations":"Upstream changed the checksums file format or naming convention between releases; the `file` pattern in the package config no longer matches the current format; downloading the wrong checksum file (e.g. for another platform) that doesn't include this artifact; path prefixes (./, subdirectory) in the checksum lines that break exact filename equality.","solutions":["Inspect the downloaded checksum file and update the `file` regex pattern so its capture group exactly matches the artifact filename as it appears in the file","Check for upstream format changes for this version and update the checksum config accordingly","Confirm you downloaded the checksum file corresponding to the right release/platform","If lines include path prefixes, adjust the pattern to capture just the basename or match the full path"],"exampleFix":"# before (pattern no longer matches format)\n[checksum]\nfile = 'checksums-(.*).txt'\n# after: capture group must equal the artifact filename\n# checksums.txt line: \"abc123  darwin-arm64/sometool\"\n[checksum]\nfile_pattern = '^[0-9a-f]{64}\\s+(.+)$'\n","handlingStrategy":"validation","validationCode":"let re = regex::Regex::new(&cfg.file_pattern)?;\nlet matched = checksum_file.lines().any(|l| {\n    re.captures(l).map(|c| c[1].to_string()) == Some(artifact_filename.to_string())\n});\nif !matched {\n    eprintln!(\"checksum file has no entry for {artifact_filename}; fix the file_pattern before verifying\");\n}","typeGuard":null,"tryCatchPattern":"match parse_checksum_entry(&checksum_file, &pattern, &filename) {\n    Err(e) if e.to_string().contains(\"no checksum entry found\") => {\n        eprintln!(\"artifact {filename} missing from checksum file; check upstream format changes\");\n    }\n    r => r?,\n}","preventionTips":["After upgrading a tool, re-check that its checksum file regex patterns still match the current file format","Download the checksum file from the same release/platform as the artifact","Inspect a sample checksum file line and confirm the pattern's capture group yields exactly the artifact filename (watch for ./ or path prefixes)","Pin the checksum file source URL alongside the artifact to avoid mixing releases"],"tags":["aqua","checksum","regex"],"backgroundTag":"record-not-found","analyzedSha":"533346cc374382b41ec5ff70536252b2e96e725c","analyzedAt":"2026-09-17T13:35:38.149Z","contentChangedAt":"2026-09-17T13:35:38.149Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}