BigPizzaV3/CodexPlusPlus · error
manifest.files 的 SHA-256 或大小不匹配:{}
Error message
manifest.files 的 SHA-256 或大小不匹配:{} What it means
Thrown by validate_manifest_files during integrity verification: the entry's declared byte size differs from the actual extracted file length, or the SHA-256 hex digest of the bytes does not match the entry's sha256. The offending input is the manifest.files entry for {file.path} versus the real package bytes — this is tamper/corruption detection, not a format check.
Source
Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1133
"LICENSE.txt" => license_bytes.context("manifest 声明了 LICENSE.txt 但包内缺失")?,
"manifest.sig" => continue,
_ => continue,
};
let expected_media_type = match file.path.as_str() {
"theme.json" => "application/json",
"theme.css" => "text/css",
"background.webp" => "image/webp",
"background.jpg" => "image/jpeg",
"background.png" => "image/png",
"LICENSE.txt" => "text/plain",
_ => "",
};
if file.media_type != expected_media_type {
bail!("manifest.files 的 mediaType 不匹配:{}", file.path);
}
let actual = format!("{:x}", Sha256::digest(bytes));
if file.bytes != bytes.len() || !actual.eq_ignore_ascii_case(&file.sha256) {
bail!("manifest.files 的 SHA-256 或大小不匹配:{}", file.path);
}
}
if !seen.contains("theme.json") || !seen.contains("theme.css") || !seen.contains(image_name) {
bail!("manifest.files 缺少必需文件");
}
if seen.contains("LICENSE.txt") != license_bytes.is_some() {
bail!("manifest.files 的 LICENSE.txt 与包内容不一致");
}
Ok(())
}
fn valid_theme_id(value: &str) -> bool {
let mut chars = value.chars();
chars.next().is_some_and(|c| c.is_ascii_alphanumeric())
&& value
.chars()
.all(|c| c.is_ascii_lowercase() || c.is_ascii_digit() || matches!(c, '-' | '.'))
}View on GitHub (pinned to f2074595a2)
Solutions
- 重新打包后用工具重算 SHA-256 并更新 manifest
- 确保 bytes 字段等于实际文件字节数
- 不要在打包后手工修改包内文件
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_package.rs:1133 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/134918db17f19e17.
Report an issue: GitHub.