BigPizzaV3/CodexPlusPlus · warning · anyhow::Error

该主题是旧格式,只支持在线预览或手动下载

Error message

该主题是旧格式,只支持在线预览或手动下载

What it means

The theme's reviewed metadata sets apply_compatible = false: it was published in the legacy package layout that this build cannot validate or install. The API still serves preview and manual download, so the error steers users there instead of failing silently.

Source

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

) -> anyhow::Result<DreamSkinThemeSummary> {
    validate_version_id(version_id)?;
    let client = community_http_client(Duration::from_secs(120))?;
    let metadata_url = format!("{COMMUNITY_API_ORIGIN}/v1/themes/{version_id}");
    let metadata_bytes = download_limited(
        &client,
        &metadata_url,
        METADATA_BYTES_LIMIT,
        "application/json",
    )
    .await?;
    let metadata: DreamSkinCommunityTheme =
        serde_json::from_slice(&metadata_bytes).context("DreamSkin 主题元数据不是有效 JSON")?;
    validate_community_theme(&metadata)?;
    if metadata.id != version_id {
        bail!("DreamSkin 主题版本与请求不一致");
    }
    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(

View on GitHub (pinned to f2074595a2)

Solutions

  1. Pick a theme marked apply-compatible (newer publication) and install that
  2. Use the online preview or manual download for the legacy theme
  3. Ask the theme author to republish in the current package format
Defensive patterns

Strategy: validation

Validate before calling

let installable: Vec<&DreamSkinCommunityTheme> =
    catalog.items.iter().filter(|t| t.apply_compatible).collect();

Type guard

fn is_installable(theme: &DreamSkinCommunityTheme) -> bool {
    theme.apply_compatible
}

Prevention

When it happens

Trigger: Installing any theme published before the current package format; the gallery mixes old and new themes and the picker offered a legacy one.

Common situations: Gallery contents predating the packaging migration; users following old share links.

Related errors


AI-assisted analysis of BigPizzaV3/CodexPlusPlus@f2074595a2 (2026-08-23). Data as JSON: /api/errors/b0fa689ecb937bd7. Report an issue: GitHub.