BigPizzaV3/CodexPlusPlus · error
不支持的 Dream Skin 主题协议版本
Error message
不支持的 Dream Skin 主题协议版本
What it means
validate_manifest requires package_version == 1 and skin_api_version == 1; any other protocol version is rejected with this message. The library only supports the first iteration of the Dream Skin package protocol.
Solutions
- Set packageVersion: 1 and skinApiVersion: 1 in manifest.json and repack.
- Regenerate the manifest with the current officially supported packaging tool.
- If you target a newer protocol, upgrade the CodexPlusPlus runtime that supports it.
Example fix
// before
{ "packageVersion": 2, "skinApiVersion": 1, ... }
// after
{ "packageVersion": 1, "skinApiVersion": 1, ... } Defensive patterns
Strategy: validation
Validate before calling
fn manifest_versions_ok(m: &serde_json::Value) -> bool {
m["packageVersion"] == 1 && m["skinApiVersion"] == 1
} Try / catch
match validate_and_read_package(path, platform) {
Ok(pkg) => install(pkg),
Err(e) if e.to_string().contains("不支持的 Dream Skin 主题协议版本") => eprintln!("set packageVersion and skinApiVersion to 1"),
Err(e) => return Err(e),
} Prevention
- Generate manifests with the supported tooling, not by hand.
- Pin packaging tool versions.
- Check protocol versions before packaging upgrades.
When it happens
Trigger: validate_and_read_package parses manifest.json whose packageVersion or skinApiVersion is 0, 2, or any value other than 1.
Common situations: Hand-writing manifest.json and omitting/typo-ing the version fields; using a manifest template from a newer or older tool version; future-proofing authors bumping versions before the library supports them.
Related errors
- 无效的主题市场相对路径
- 市场主题 的来源地址协议无效
- manifest 版本号无效
- manifest 发布者、许可证或来源说明为空
- manifest.capabilities 无效或缺少 safe-css 能力
AI-assisted analysis of BigPizzaV3/CodexPlusPlus@b1ed92e5e4 (2026-09-19).
Data as JSON: /api/errors/99bbe0c44df2c647.
Report an issue: GitHub.
Appendix: source
Thrown at crates/codex-plus-core/src/dream_skin_package.rs:909
bail!("主题包背景图片内容与扩展名不一致:{name}");
}
Ok(())
}
fn file_limit(name: &str) -> usize {
match name {
"manifest.json" => MANIFEST_LIMIT,
"theme.json" => THEME_LIMIT,
"theme.css" => CSS_LIMIT,
"LICENSE.txt" => LICENSE_LIMIT,
"manifest.sig" => SIGNATURE_LIMIT,
_ => IMAGE_LIMIT,
}
}
fn validate_manifest(manifest: &DreamSkinPackageManifest, platform: &str) -> anyhow::Result<()> {
if manifest.package_version != 1 || manifest.skin_api_version != 1 {
bail!("不支持的 Dream Skin 主题协议版本");
}
if manifest.theme_id.chars().count() < 3
|| manifest.theme_id.chars().count() > 64
|| !valid_theme_id(&manifest.theme_id)
{
bail!("manifest.themeId 无效");
}
if !valid_semver(&manifest.version) || !valid_semver(&manifest.min_client_version) {
bail!("manifest 版本号无效");
}
if compare_semver(&manifest.min_client_version, "1.5.12").is_gt() {
bail!(
"主题包需要更新版本的 Dream Skin 协议:{}",
manifest.min_client_version
);
}
if manifest.platforms.is_empty()
|| manifest.platforms.len() > 2View on GitHub (pinned to b1ed92e5e4)