{"record":{"id":"eeb253758ed3b611","repo":"jdx/mise","slug":"expected-exactly-one-hex-otp-build-record-for-rel","errorCode":null,"errorMessage":"expected exactly one Hex OTP build record for {release_tag}, found {}","messagePattern":"expected exactly one Hex OTP build record for (.+?), found (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/erlang.rs","lineNumber":817,"sourceCode":"        lock_platforms\n            .get(platform_key)\n            .is_some_and(|pi| pi.install.as_deref() == Some(\"source\"))\n    } else {\n        erlang_compile == Some(true)\n    }\n}\n\nfn parse_hex_build_checksum(builds: &str, release_tag: &str) -> Result<String> {\n    let matching = builds\n        .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(|| {","sourceCodeStart":799,"sourceCodeEnd":835,"githubUrl":"https://github.com/jdx/mise/blob/533346cc374382b41ec5ff70536252b2e96e725c/src/plugins/core/erlang.rs#L799-L835","documentation":"parse_hex_build_checksum scans the Hex OTP builds checksum file for the line whose first field equals the release tag. If zero or multiple lines match, the lock cannot be established unambiguously, so it bails with this error.","triggerScenarios":"Fetching a precompiled Linux Erlang build whose release tag is missing from the Hex builds file (deleted/renamed build) or appears more than once (duplicated upload).","commonSituations":"Very new or yanked OTP releases where the Hex build record has not propagated, or upstream Hex data anomalies causing duplicate records.","solutions":["Retry later or after `mise lock` to re-fetch an updated Hex builds file","Choose a different Erlang version whose Hex build record exists","Check the Hex builds checksum file for the release tag and report upstream duplicates if found"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"# pre-check Hex builds data for the tag before installing\ncurl -s https://builds.hex.pm/builds/otp/amd64/ubuntu-24.04/builds.txt | grep -c \"^OTP-26.2.5\"","typeGuard":null,"tryCatchPattern":"mise install erlang@26.2.5 || { sleep 30; mise lock && mise install erlang@26.2.5; }","preventionTips":["Install Erlang versions a bit after release so Hex builds propagate","Check builds.hex.pm for the exact release tag first","Avoid pinning brand-new OTP versions in locked CI pipelines"],"tags":["erlang","hex","checksum","lockfile"],"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"}