BigPizzaV3/CodexPlusPlus · error

主题包包含未处理文件

Error message

主题包包含未处理文件

What it means

Completeness guard at the end of validate_and_read_package: after removing all recognized files (manifest, theme, css, image, license, signature), some entries remain in the map. The package contains files that passed the name whitelist but were not consumed, indicating an unexpected layout.

Source

Thrown at crates/codex-plus-core/src/dream_skin_package.rs:170

    if ["background.webp", "background.jpg", "background.png"]
        .iter()
        .filter(|name| files.contains_key(**name))
        .count()
        != 1
    {
        bail!("主题包必须且只能包含一个背景图片");
    }
    let image_bytes = files.remove(&image_name).expect("image was checked above");
    validate_image_content(&image_name, &image_bytes)?;
    let license_bytes = files.remove("LICENSE.txt");
    let signature = files.remove("manifest.sig");
    if let Some(signature) = signature {
        if signature.len() > SIGNATURE_LIMIT {
            bail!("manifest.sig 超过大小限制");
        }
    }
    if !files.is_empty() {
        bail!("主题包包含未处理文件");
    }

    let manifest: DreamSkinPackageManifest = parse_json(&manifest_bytes, "manifest.json")?;
    validate_manifest(&manifest, platform)?;
    let theme: Value = parse_json(&theme_bytes, "theme.json")?;
    validate_theme(&theme, &manifest, &image_name)?;
    let css = String::from_utf8(css_bytes).context("theme.css 不是有效 UTF-8")?;
    validate_safe_css(&css)?;
    validate_manifest_files(
        &manifest,
        &manifest_bytes,
        &theme_bytes,
        css.as_bytes(),
        &image_name,
        &image_bytes,
        license_bytes.as_deref(),
    )?;

View on GitHub (pinned to f2074595a2)

Solutions

  1. Rebuild the package with only the supported file set
  2. Check for duplicated or misnamed files inside the ZIP
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at crates/codex-plus-core/src/dream_skin_package.rs:170 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/b71a6d7879be03c8. Report an issue: GitHub.