tinyhumansai/openhuman · error

SHA-256 mismatch for {} (expected {expected}, got {actual_he

Error message

SHA-256 mismatch for {} (expected {expected}, got {actual_hex})

What it means

Streaming hash of the downloaded Node archive does not match the pinned expected SHA-256 — a truncated/corrupted transfer or a compromised mirror. The partial archive is deleted before the error propagates, so the target path is clean for a re-attempt.

Source

Thrown at src/openhuman/runtime/node/downloader.rs:232

            error = %err,
            "[node_runtime::downloader] streaming failed — removing partial archive"
        );
        let _ = tokio::fs::remove_file(target_path).await;
        return Err(err);
    }

    let actual_hex = hex::encode(hasher.finalize());
    let expected = expected_sha256.trim().to_ascii_lowercase();

    if actual_hex != expected {
        tracing::error!(
            expected = %expected,
            actual = %actual_hex,
            target = %target_path.display(),
            "[node_runtime::downloader] SHA-256 mismatch — deleting partial archive"
        );
        let _ = tokio::fs::remove_file(target_path).await;
        bail!(
            "SHA-256 mismatch for {} (expected {expected}, got {actual_hex})",
            dist.archive_name
        );
    }

    tracing::info!(
        target = %target_path.display(),
        bytes = written,
        total = ?total_bytes,
        "[node_runtime::downloader] download complete, hash verified"
    );
    Ok(())
}

#[cfg(test)]
mod tests {
    use super::*;

View on GitHub (pinned to 7491200858)

Solutions

  1. Retry the download — transient truncation is the common cause
  2. Check for a proxy, captive portal or flaky link mangling large binaries
  3. If it persists, verify the pinned digest against the upstream release manifest to rule out a re-cut release
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/openhuman/runtime/node/downloader.rs:232 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17). Data as JSON: /api/errors/5fc89bf41c7b2f48. Report an issue: GitHub.