jdx/mise · error · eyre::Report

Invalid checksum: {platform_key}

Error message

Invalid checksum: {platform_key}

What it means

When a mise.lock entry carries a checksum for a platform key, the ubi backend expects the format `algorithm:hexdigest` and splits on the first colon to pick the hash algorithm. A stored value without a colon cannot be parsed, so the checksum verification step bails with 'Invalid checksum: <platform_key>' (src/backend/ubi.rs:410).

Source

Thrown at src/backend/ubi.rs:410

        if let Some(exe) = opts.exe() {
            platform_key = format!("{platform_key}-{exe}");
        }
        if let Some(matching) = opts.matching() {
            platform_key = format!("{platform_key}-{matching}");
        }
        // Include filename to distinguish different downloads for the same platform
        platform_key = format!("{platform_key}-{filename}");

        // Get or create platform info for this platform key
        let platform_info = tv.lock_platforms.entry(platform_key.clone()).or_default();

        if let Some(checksum) = &platform_info.checksum {
            ctx.pr
                .set_message(format!("checksum verify {platform_key}"));
            if let Some((algo, check)) = checksum.split_once(':') {
                hash::ensure_checksum(file, check, Some(ctx.pr.as_ref()), algo)?;
            } else {
                bail!("Invalid checksum: {platform_key}");
            }
        } else if Settings::get().lockfile_enabled() {
            ctx.pr
                .set_message(format!("checksum generate {platform_key}"));
            let hash = hash::file_hash_blake3(file, Some(ctx.pr.as_ref()))?;
            platform_info.checksum = Some(format!("blake3:{hash}"));
        }
        Ok(())
    }

    async fn list_bin_paths(
        &self,
        _config: &Arc<Config>,
        tv: &ToolVersion,
    ) -> eyre::Result<Vec<std::path::PathBuf>> {
        let raw_opts = tv.request.options();
        let opts = UbiOptions::new(&raw_opts);
        if let Some(bin_path) = opts.bin_path() {

View on GitHub (pinned to 9dcfcaa0dc)

Solutions

  1. Fix the lockfile value to `blake3:<hash>` (algorithm, colon, digest), e.g. blake3:af39c1...
  2. Or delete the tool's entry (or the whole mise.lock) and re-run mise install to have mise regenerate conforming checksums
  3. Avoid manual checksum edits; use MISE_LOCKFILE settings or mise's own generation instead

Example fix

# before (mise.lock)
[tools.ubi.org\tool.v1.0.0.lock_platforms."x86_64-linux-tool.tar.gz"]
checksum = "af39c1a5d2..."

# after
checksum = "blake3:af39c1a5d2..."
Defensive patterns

Strategy: validation

Validate before calling

# Validate every lockfile checksum has an algo prefix
fn checksum_ok(v: &str) -> bool {
    match v.split_once(':') {
        Some((algo, hash)) => !algo.is_empty() && !hash.is_empty(),
        None => false,
    }
}
assert!(checksum_ok("blake3:0f9c..."));
assert!(!checksum_ok("0f9c..."));

Prevention

When it happens

Trigger: A mise.lock file whose lock_platforms.<platform>.checksum value is a bare hex digest (no `blake3:` prefix) — typically from hand-editing the lockfile, a merge conflict resolution, or an older lockfile format. Hits during install/verify of the matching platform asset.

Common situations: Editing mise.lock to paste a sha256 from a vendor site without the algo prefix; git merge conflicts in mise.lock resolved by keeping only the hash; tools that regenerate lockfiles with a non-conforming format.

Related errors


AI-assisted analysis of jdx/mise@9dcfcaa0dc (2026-08-17). Data as JSON: /api/errors/0887621c1dc2c81b. Report an issue: GitHub.