{"record":{"id":"5efd986fe7cd40fa","repo":"jdx/mise","slug":"invalid-hex-otp-checksum-for-release-tag-check","errorCode":null,"errorMessage":"invalid Hex OTP checksum for {release_tag}: {checksum}","messagePattern":"invalid Hex OTP checksum for (.+?): (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/erlang.rs","lineNumber":827,"sourceCode":"        .lines()\n        .filter_map(|line| {\n            let parts = line.split_whitespace().collect::<Vec<_>>();\n            (parts.first() == Some(&release_tag)).then_some(parts)\n        })\n        .collect::<Vec<_>>();\n\n    if matching.len() != 1 {\n        bail!(\n            \"expected exactly one Hex OTP build record for {release_tag}, found {}\",\n            matching.len()\n        );\n    }\n\n    let checksum = matching[0]\n        .get(3)\n        .ok_or_else(|| eyre::eyre!(\"Hex OTP build record for {release_tag} has no checksum\"))?;\n    if !regex!(r\"^[0-9a-f]{64}$\").is_match(checksum) {\n        bail!(\"invalid Hex OTP checksum for {release_tag}: {checksum}\");\n    }\n\n    Ok(format!(\"sha256:{checksum}\"))\n}\n\n#[cfg(any(linux, test))]\nfn require_locked_precompiled_checksum(version: &str, checksum: Option<&str>) -> Result<String> {\n    let checksum = checksum.ok_or_else(|| {\n        eyre::eyre!(\n            \"No lockfile checksum found for precompiled Erlang/OTP {version}; regenerate mise.lock with `mise lock`\"\n        )\n    })?;\n    if !regex!(r\"^sha256:[0-9a-f]{64}$\").is_match(checksum) {\n        bail!(\n            \"Invalid lockfile checksum for precompiled Erlang/OTP {version}; regenerate mise.lock with `mise lock`\"\n        );\n    }\n","sourceCodeStart":809,"sourceCodeEnd":845,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/core/erlang.rs#L809-L845","documentation":"After locating the Hex OTP build record, parse_hex_build_checksum validates that the checksum field is a 64-character lowercase hex sha256. A malformed or absent-format checksum indicates corrupted or unexpected upstream data, so it bails.","triggerScenarios":"The matched Hex builds line has a checksum field at index 3 that is not 64 lowercase hex chars (truncated line, different record format, corrupted download).","commonSituations":"Upstream Hex file format changes, partially cached/corrupted checksum files, or custom-mirrored Hex data with altered columns.","solutions":["Clear the cached Hex builds data and retry so a fresh file is fetched","Upgrade mise in case the parser needs updating for a new upstream format","Manually verify the Hex builds file for the release and report upstream corruption"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"# validate checksum line shape before parsing\ngrep -E \"^OTP-26\\.2\\.5\\s+\\S+\\s+\\S+\\s+[0-9a-f]{64}$\" builds.txt","typeGuard":null,"tryCatchPattern":"mise install erlang@X || { rm -rf ~/.cache/mise/erlang*; mise install erlang@X; }","preventionTips":["Clear caches when upstream format changes are announced","Keep mise updated to track upstream Hex builds format","Don't mirror/edit Hex builds files locally"],"tags":["erlang","hex","checksum","sha256","validation"],"backgroundTag":"checksum-mismatch","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"}