{"record":{"id":"50115d15b868dfbc","repo":"jdx/mise","slug":"invalid-lockfile-checksum-for-precompiled-erlang-o","errorCode":null,"errorMessage":"Invalid lockfile checksum for precompiled Erlang/OTP {version}; regenerate mise.lock with `mise lock`","messagePattern":"Invalid lockfile checksum for precompiled Erlang/OTP (.+?); regenerate mise\\.lock with `mise lock`","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/plugins/core/erlang.rs","lineNumber":829,"sourceCode":"    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\n    Ok(checksum.to_string())\n}\n\n#[cfg(test)]\nmod tests {\n    use super::*;\n\n    #[test]\n    fn test_parse_hex_build_checksum_requires_exact_publisher_record() {\n        let builds = \"OTP-28.5.0.4 abc 2026-07-27T13:55:40Z 34498e6287e1fbc31250d36dd88bcdb1d286cedbdd9b1a66bbc4284738d2d2eb\\n\\\n                      OTP-28.5.0.5 def 2026-08-04T10:35:03Z e3476633cae6fef8e1bb53576832b15823f715e70e3d4d1e66a6be908804f967\\n\";\n\n        assert_eq!(\n            parse_hex_build_checksum(builds, \"OTP-28.5.0.5\").unwrap(),","sourceCodeStart":811,"sourceCodeEnd":847,"githubUrl":"https://github.com/jdx/mise/blob/6f52dcdf99e282ef7a7db68c81301fa4618d0f79/src/plugins/core/erlang.rs#L811-L847","documentation":"On Linux installs driven by mise.lock (locked mode or when a lockfile URL exists for the platform), mise requires the erlang entry's checksum to match sha256:<64 lowercase hex>. This variant fires when a checksum is present but malformed — a hand-edited or badly merged mise.lock, or one written by an incompatible mise version. The sibling 'No lockfile checksum found' error covers the absent case; both tell you to regenerate with mise lock.","triggerScenarios":"`mise install --locked` (or settings.locked=true) after a git merge conflict in mise.lock left a broken checksum; someone hand-pasted a checksum without the sha256: prefix or with uppercase/truncated hex; lockfile rewritten by a formatting tool.","commonSituations":"Teams sharing mise.lock across branches hitting conflict residue; scripts that sed-edit mise.lock; upgrading mise across versions with lockfile schema drift.","solutions":["Regenerate the lockfile as the message says: `mise lock` (then commit it) and re-run the locked install","Inspect mise.lock around the erlang platform entry for merge-conflict markers or mangled values and fix them","Ensure everyone runs a recent mise version when writing mise.lock (`mise doctor` shows the version)"],"exampleFix":"# before\n$ mise install --locked\nERROR: Invalid lockfile checksum for precompiled Erlang/OTP 27.1; regenerate mise.lock with `mise lock`\n\n# after\n$ mise lock && mise install --locked","handlingStrategy":"validation","validationCode":"# CI gate: lockfile erlang checksums must be well-formed before --locked installs\ngrep -o 'checksum = \"[^\"]*\"' mise.lock | grep -vE 'checksum = \"(sha256:[0-9a-f]{64})?\"' && { echo 'bad mise.lock checksum'; exit 1; } || true","typeGuard":null,"tryCatchPattern":"if ! mise install --locked; then\n  # regenerate lockfile (as the error instructs) and retry once\n  mise lock && mise install --locked\nfi","preventionTips":["Treat mise.lock as generated: regenerate with `mise lock` instead of hand-editing after conflicts","Run `mise lock` in CI after merging branches that both touched mise.lock"],"tags":["mise","erlang","lockfile","mise-lock","checksum","merge-conflict"],"backgroundTag":"lockfile-validation-failed","analyzedSha":"6f52dcdf99e282ef7a7db68c81301fa4618d0f79","analyzedAt":"2026-08-22T10:14:23.840Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}