Hmbown/CodeWhale · error
invalid SHA256 manifest line
Error message
invalid SHA256 manifest line {}: {trimmed} What it means
parse_checksum_manifest validates each line of a SHA256SUMS-style manifest. A line is rejected when it is shorter than 66 characters (64-char hash + whitespace + at least a filename start). The error reports the 1-based line number and the offending line text.
Solutions
- Check the manifest URL in a browser/curl — if it returns HTML or a truncated file, the source/mirror is broken; use another source.
- Regenerate or republish the checksum manifest for the release.
- Retry later if the release is mid-publish.
Example fix
// before (truncated line) abc123 codewhale-linux-x86_64 // after (valid line) <64 hex chars> codewhale-linux-x86_64
Defensive patterns
Strategy: validation
Validate before calling
fn line_plausibly_sha256(line: &str) -> bool {
let t = line.trim(); !t.is_empty() && t.len() >= 66
} // pre-check manifest lines before parsing Prevention
- Validate that the manifest URL returns text/plain, not an HTML error page
- Check manifest integrity (length, encoding) after publish and after mirroring
When it happens
Trigger: select_release_source/probe_release_source -> parse_checksum_manifest on a fetched manifest where a non-empty trimmed line has len < 66; e.g. a truncated hash, a bare filename, or HTML error pages being parsed line-by-line.
Common situations: Mirror serving an HTML error page instead of the manifest; release manifest truncated or hand-edited; CRLF/binary corruption producing short garbage lines.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- does not list
- from does not list ; refusing to download an unverified…
- Android identifies runtime linker ` `; refusing to use the…
- Android reported deleted loaded image
- Android reported non-absolute loaded-image path
AI-assisted analysis of Hmbown/CodeWhale@73e0f67d83 (2026-09-22).
Data as JSON: /api/errors/f8e32cc5baa6fb46.
Report an issue: GitHub.
Appendix: source
Thrown at crates/cli/src/update.rs:1229
fn select_checksum_manifest_asset(release: &Release) -> Option<&Asset> {
release
.assets
.iter()
.find(|asset| asset.name == CHECKSUM_MANIFEST_ASSET)
}
fn parse_checksum_manifest(text: &str) -> Result<HashMap<String, String>> {
let mut checksums = HashMap::new();
for (index, line) in text.lines().enumerate() {
let trimmed = line.trim();
if trimmed.is_empty() {
continue;
}
if trimmed.len() < 66 {
bail!("invalid SHA256 manifest line {}: {trimmed}", index + 1);
}
let (hash, rest) = trimmed.split_at(64);
if !hash.chars().all(|ch| ch.is_ascii_hexdigit())
|| rest.is_empty()
|| !rest.chars().next().is_some_and(char::is_whitespace)
{
bail!("invalid SHA256 manifest line {}: {trimmed}", index + 1);
}
let mut asset_name = rest.trim_start();
if let Some(stripped) = asset_name.strip_prefix('*') {
asset_name = stripped;
}
if asset_name.is_empty() {
bail!("invalid SHA256 manifest line {}: {trimmed}", index + 1);
}
View on GitHub (pinned to 73e0f67d83)