BigPizzaV3/CodexPlusPlus · error · anyhow::Error
invalid Dream Skin theme config
Error message
invalid Dream Skin theme config
What it means
Raised in load_stored_dream_skin_theme: the theme's theme.json exists but failed the safe-file check (not a regular file, or is a symlink), so its contents cannot be trusted and are not parsed. Protects against symlink attacks in the themes directory.
Source
Thrown at crates/codex-plus-core/src/dream_skin_library.rs:386
id: &str,
) -> anyhow::Result<DreamSkinThemeDraft> {
if !valid_theme_id(id) {
bail!("invalid Dream Skin theme id");
}
let directory = state_dir.join(THEMES_DIR).join(id);
let metadata = std::fs::symlink_metadata(&directory)
.with_context(|| format!("Dream Skin theme not found: {id}"))?;
if !metadata.file_type().is_dir() || metadata.file_type().is_symlink() {
bail!("Dream Skin theme path is not a safe directory");
}
let config_path = directory.join(THEME_CONFIG_FILE);
let metadata = std::fs::symlink_metadata(&config_path)
.with_context(|| format!("Dream Skin theme config not found: {id}"))?;
if !metadata.file_type().is_file()
|| metadata.file_type().is_symlink()
|| metadata.len() > THEME_CONFIG_LIMIT
{
bail!("invalid Dream Skin theme config");
}
let config: DreamSkinThemeConfig = serde_json::from_slice(&std::fs::read(&config_path)?)?;
if config.id != id {
bail!("Dream Skin theme id does not match directory");
}
let image = find_theme_image(&directory)
.ok_or_else(|| anyhow::anyhow!("Dream Skin theme must contain exactly one image"))?;
let draft = DreamSkinThemeDraft {
config,
image_path: image.to_string_lossy().into_owned(),
builtin: false,
};
validate_theme_draft(&draft)?;
Ok(draft)
}
pub fn rename_dream_skin_theme(
state_dir: &Path,View on GitHub (pinned to f2074595a2)
Solutions
- Replace the theme.json with a real regular file (reinstall the theme)
- Check for symlink attacks or misbehaving sync tools in the state dir
- Restore the theme from a known-good package
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at crates/codex-plus-core/src/dream_skin_library.rs:386 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/1f683fd2698beeed.
Report an issue: GitHub.