BigPizzaV3/CodexPlusPlus · error · anyhow::Error
DreamSkin 主题包 SHA-256 与审核元数据不一致
Error message
DreamSkin 主题包 SHA-256 与审核元数据不一致
What it means
SHA-256 over the downloaded package (hex, compared case-insensitively) must equal metadata.package_sha256 recorded at review time. Any byte-level difference - transit corruption or a replaced artifact - aborts the install before the zip is opened.
Source
Thrown at crates/codex-plus-core/src/dream_skin_community.rs:170
}
if !metadata.apply_compatible {
bail!("该主题是旧格式,只支持在线预览或手动下载");
}
let download_url = format!("{COMMUNITY_API_ORIGIN}/v1/themes/{version_id}/download");
let package = download_limited(
&client,
&download_url,
metadata.package_bytes,
"application/zip",
)
.await?;
if package.len() != metadata.package_bytes {
bail!("DreamSkin 主题包实际大小与审核元数据不一致");
}
let actual_sha = format!("{:x}", Sha256::digest(&package));
if !actual_sha.eq_ignore_ascii_case(&metadata.package_sha256) {
bail!("DreamSkin 主题包 SHA-256 与审核元数据不一致");
}
let validated = crate::dream_skin_package::validate_and_read_package(
&package,
if cfg!(windows) { "windows" } else { "macos" },
)?;
if validated.manifest.theme_id != metadata.theme_id
|| validated.manifest.version != metadata.version
{
bail!("DreamSkin 主题包身份与审核元数据不一致");
}
crate::dream_skin_library::save_validated_dream_skin_package(state_dir, &validated)
}
pub fn import_theme_package(
state_dir: &Path,
archive_path: &Path,
) -> anyhow::Result<DreamSkinThemeSummary> {
let metadata = std::fs::symlink_metadata(archive_path)View on GitHub (pinned to f2074595a2)
Solutions
- Retry once - transit corruption is the most common cause
- Refresh the catalog and retry so metadata matches any re-published artifact
- If SHA still mismatches, stop and report the theme - a persistent hash mismatch may mean a tampered or mis-versioned artifact
Defensive patterns
Strategy: retry
Try / catch
Catch the 'SHA-256 与审核元数据不一致' message and retry install_community_theme once; a second identical failure must terminate with a clear report (artifact drift or tampering), never a retry loop.
Prevention
- Use stable networks for large (up to 32 MiB) downloads
- Report persistent hash mismatches instead of working around them - the check protects you
When it happens
Trigger: Bit-level corruption on flaky links; the zip replaced on the server after review; a CDN serving different content for the same URL.
Common situations: Hotspot or mobile networks corrupting large transfers; gallery re-publishing artifacts without refreshing reviewed metadata.
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
- DreamSkin 主题包身份与审核元数据不一致
- DreamSkin 主题版本与请求不一致
- 该主题是旧格式,只支持在线预览或手动下载
- DreamSkin 主题包实际大小与审核元数据不一致
- 主题包必须是 32 MiB 以内的普通 ZIP 文件
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23).
Data as JSON: /api/errors/6707cd648e92af03.
Report an issue: GitHub.