BigPizzaV3/CodexPlusPlus · error

DreamSkin 社区主题元数据无效:

Error message

DreamSkin 社区主题元数据无效:{}

What it means

validate_community_theme checks each DreamSkin community theme's metadata fields: safe (bounded, non-empty) display/license text, a valid semver version, nonzero package_bytes within the 32 MiB limit, and a valid sha256 hex digest. If any field fails, it bails naming the offending theme id. It is the filter used when normalizing the community catalog and before installing a theme.

Solutions

  1. Inspect the theme's metadata for the reported id and identify which field fails the checks (version format, sha256, sizes, text bounds).
  2. Refresh the catalog from the service; the invalid item is normally skipped/filtered rather than fatal for the whole catalog.
  3. Upgrade the theme's publish metadata upstream: valid semver version, correct package_bytes, and a full sha256 hex string.
  4. If you construct metadata manually (e.g. in tests or scripts), fill all required fields within limits before calling install.

Example fix

// before
let theme = DreamSkinCommunityTheme { version: "1.0".into(), package_sha256: "".into(), .. };
// after
let theme = DreamSkinCommunityTheme { version: "1.0.0".into(), package_sha256: "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08".into(), .. };
Defensive patterns

Strategy: validation

Validate before calling

// Rust
fn theme_meta_plausible(t: &DreamSkinCommunityTheme) -> bool {
    !t.id.is_empty() && !t.license.trim().is_empty() && t.license.len() <= 80
        && t.version.split('.').filter(|p| !p.is_empty() && p.chars().all(|c| c.is_ascii_digit())).count() >= 2
        && t.package_bytes > 0 && t.package_bytes <= 32 * 1024 * 1024
        && t.package_sha256.len() == 64 && t.package_sha256.bytes().all(|b| b.is_ascii_hexdigit())
}

Try / catch

// Rust
for theme in catalog.items {
    if let Err(e) = install_community_theme(state_dir, &theme).await {
        if e.to_string().contains("元数据无效") { skipped.push(theme.id); continue; }
        return Err(e);
    }
}

Prevention

When it happens

Trigger: install_community_theme with metadata whose license/display text is empty or too long, version is not semver, package_bytes is 0 or > PACKAGE_BYTES_LIMIT, or package_sha256 is not a valid digest; or a catalog item failing these checks during normalize_and_filter_catalog.

Common situations: Upstream API returns a newly added theme with placeholder metadata (empty license, version like "1.0"); the service omits package_sha256 for large packages; a broken publish pipeline stores 0 package_bytes.

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


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19). Data as JSON: /api/errors/7c1a00f4b0f9eb28. Report an issue: GitHub.

Appendix: source

Thrown at crates/codex-plus-core/src/dream_skin_community.rs:309

        .chars()
        .filter(|character| !unsafe_format_character(*character))
        .collect::<String>()
        .trim()
        .to_string()
}

fn validate_community_theme(theme: &DreamSkinCommunityTheme) -> anyhow::Result<()> {
    validate_version_id(&theme.id)?;
    if !safe_text(&theme.theme_id, 80)
        || !safe_text(&theme.name, 120)
        || !safe_text(&theme.author_display_name, 120)
        || !safe_text(&theme.license, 80)
        || !valid_semver(&theme.version)
        || theme.package_bytes == 0
        || theme.package_bytes > PACKAGE_BYTES_LIMIT
        || !valid_sha256(&theme.package_sha256)
    {
        bail!("DreamSkin 社区主题元数据无效:{}", theme.id);
    }
    Ok(())
}

fn validate_version_id(value: &str) -> anyhow::Result<()> {
    let Some(suffix) = value.strip_prefix("ver_") else {
        bail!("DreamSkin 主题版本 ID 无效");
    };
    if !(8..=64).contains(&suffix.len())
        || !suffix
            .bytes()
            .all(|byte| byte.is_ascii_lowercase() || byte.is_ascii_digit())
    {
        bail!("DreamSkin 主题版本 ID 无效");
    }
    Ok(())
}

View on GitHub (pinned to b1ed92e5e4)