Hmbown/CodeWhale · error · NonRetryableError
Checksum manifest is missing
Error message
Checksum manifest is missing ${assetName} What it means
`checksumMatches` is the boolean (non-throwing for mismatch) variant used for probing; but like `verifyChecksum` it still requires the asset to exist in the manifest and throws this NonRetryableError when the asset name has no digest entry. It cannot return false for a missing entry because 'missing' and 'mismatch' are treated as distinct conditions.
Solutions
- Confirm the exact asset key by printing `Array.from(checksums.keys())` and use an exact matching name.
- Parse the manifest from the same release the asset was downloaded from.
- Normalize the asset name (strip/append version or extension) to match the manifest entries.
Example fix
// before const ok = await checksumMatches(file, "codewhale-linux", checksums); // after const ok = await checksumMatches(file, "codewhale-linux-x64.tar.gz", checksums);
Defensive patterns
Strategy: validation
Validate before calling
if (!checksums.has(assetName)) {
throw new Error(`Key ${assetName} not in manifest; available: ${[...checksums.keys()].join(', ')}`);
} Prevention
- Use exact manifest key names (print checksums.keys() to confirm).
- Parse the manifest from the same release as the downloaded asset.
- Wrap checksumMatches calls with a has() check.
When it happens
Trigger: Calling `checksumMatches(filePath, assetName, checksums)` with an assetName key not present in the parsed manifest map.
Common situations: Comparing a differently named asset (e.g. with/without a version prefix or .tar.gz suffix) against the manifest; calling the probe with a checksums map parsed from the wrong release.
Understand the failure class
Background: Checksum mismatch errors: "checksum verification failed", "digest mismatch", "expected vs actual checksum" — what they mean and how to fix them — this error's family across 41 libraries.
Related errors
- Checksum manifest is missing
- Invalid checksum manifest line
- checksum manifest is missing
- Checksum mismatch for
- CODEWHALE_USE_CNB_MIRROR=1 currently supports only Linux…
AI-assisted analysis of Hmbown/CodeWhale@433685b202 (2026-09-15).
Data as JSON: /api/errors/3dc671e6d73d9ec7.
Report an issue: GitHub.
Appendix: source
Thrown at npm/codewhale/scripts/install.js:1195
const from = sourceLabel ? ` from ${sourceLabel}` : "";
throw new NonRetryableError(`Checksum manifest is missing ${assetName}${from}`);
}
const actual = await sha256File(filePath);
if (actual !== expected) {
// Bytes are corrupted; another fetch is unlikely to help without a fix
// upstream. Mark non-retryable. Never mix a locked source's bytes with
// another source's manifest.
const from = sourceLabel ? ` from ${sourceLabel}` : "";
throw new NonRetryableError(
`Checksum mismatch for ${assetName}${from}: expected ${expected}, got ${actual}`,
);
}
}
async function checksumMatches(filePath, assetName, checksums) {
const expected = checksums.get(assetName);
if (!expected) {
throw new NonRetryableError(`Checksum manifest is missing ${assetName}`);
}
const actual = await sha256File(filePath);
return actual === expected;
}
function formatSourceReceipt(source, version) {
return [
`source=${source.id}`,
`label=${source.label}`,
`base=${source.baseUrl}`,
`version=${version}`,
"",
].join("\n");
}
async function writeSourceReceipt(targetPath, source, version) {
await writeFile(`${targetPath}.source`, formatSourceReceipt(source, version), "utf8");
}View on GitHub (pinned to 433685b202)