{"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":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/erlang.rs","lineNumber":815,"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":797,"sourceCodeEnd":833,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/plugins/core/erlang.rs#L797-L833","documentation":"The matched builds.txt line's 4th whitespace-separated field must be a 64-character lowercase hex sha256. This error fires when the field exists but fails that format — realistically a corrupted or hijacked builds.txt: a proxy/captive portal returning an HTML page that got stored by mise's text cache, a truncated download, or an upstream hex.pm format change. Fatal with erlang.compile=false, otherwise falls back to source.","triggerScenarios":"`mise install erlang` (compile=false) behind a corporate TLS-intercepting proxy that serves an error page for builds.hex.pm; a stale cached builds.txt from a partial fetch; upstream temporarily serving a malformed file.","commonSituations":"Corporate networks with SSL inspection; hotel/airport captive portals poisoning caches; CDN incidents serving error pages with 200 status.","solutions":["Inspect the live file: `curl -sSL https://builds.hex.pm/builds/otp/amd64/ubuntu-24.04/builds.txt | head -3` — if it is HTML, fix the network/proxy","Clear mise's HTTP cache and retry: `mise cache` (or remove the cache dir shown by `mise cache dir`)","Bypass TLS interception for builds.hex.pm in the proxy profile","Workaround: `mise settings set erlang.compile true` to skip the builds.txt path entirely"],"exampleFix":"# before\n$ mise install erlang@27.1\nERROR: invalid Hex OTP checksum for OTP-27.1: <html>...\n\n# after\n$ curl -sSL https://builds.hex.pm/builds/otp/amd64/ubuntu-24.04/builds.txt | head -1   # confirm real data\n$ mise cache   # drop poisoned cache\n$ mise install erlang@27.1","handlingStrategy":"retry","validationCode":"# sanity-check the live builds.txt payload before relying on it\ncurl -fsSL https://builds.hex.pm/builds/otp/amd64/ubuntu-24.04/builds.txt \\\n  | grep -E '^OTP-[^ ]+ .+ [0-9a-f]{64}$' >/dev/null \\\n  || { echo 'builds.txt malformed (proxy/CDN issue?)'; exit 1; }","typeGuard":null,"tryCatchPattern":"if ! mise install erlang@27.1; then\n  if mise install erlang@27.1 2>&1 | grep -q 'invalid Hex OTP checksum'; then\n    mise cache   # drop poisoned text cache, then retry once\n    mise install erlang@27.1\n  fi\nfi","preventionTips":["Exclude builds.hex.pm from TLS-inspecting proxies","When a checksum-format error appears right after a network change, suspect the cached builds.txt first"],"tags":["mise","erlang","checksum","builds-txt","proxy","cache-corruption","hex-pm"],"backgroundTag":"checksum-validation-failed","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}