BigPizzaV3/CodexPlusPlus · error

dream skin target art should serialize

Error message

dream skin target art should serialize

What it means

dream_skin_target_runtime_script serializes the dream skin art assignment to embed into the injected runtime script, and this expect-style error fires if serde_json::to_string fails. Serializing internal art data should never fail, so the error signals an internal invariant violation (e.g. a non-string map key in art config), not user error.

Source

Thrown at crates/codex-plus-core/src/assets.rs:172

            &serde_json::to_string("1.2.0").unwrap(),
        )
        .replace(
            "__DREAM_SKIN_STYLE_REVISION_JSON__",
            &serde_json::to_string(&style_revision).unwrap(),
        )
        .replace(
            "__DREAM_SKIN_PAYLOAD_REVISION_JSON__",
            &serde_json::to_string(&payload_revision).unwrap(),
        );
    if payload.contains("__DREAM_") || payload.contains("__GLASS_VISION_") {
        panic!("dream skin target renderer contains unresolved placeholders");
    }

    let art_assignment = include_art.then(|| {
        format!(
            "window.__CODEX_PLUS_DREAM_SKIN_ART__ = {};\n",
            serde_json::to_string(&dream_skin_art_data_uri(settings))
                .expect("dream skin target art should serialize")
        )
    });
    let skin_api_bootstrap = dream_skin_skin_api_bootstrap_script(&theme);
    payload = format!(
        "(() => {{\nwindow.__CODEX_PLUS_EXTERNAL_DREAM_SKIN_RUNTIME__ = true;\nwindow.__CODEX_PLUS_CLEAR_DREAM_SKIN__?.();\n{}window.__CODEX_PLUS_DREAM_SKIN_ART_SIGNATURE__ = {};\nwindow.__CODEX_PLUS_DREAM_SKIN_THEME__ = {};\nwindow.__CODEX_PLUS_DREAM_SKIN_RUNTIME_REVISION__ = {};\nwindow.__CODEX_PLUS_DREAM_SKIN_TARGET_ENGINE__ = {};\n{}const result = {};\nconst state = window.__CODEX_DREAM_SKIN_STATE__ || window.__CODEX_GLASS_VISION_SKIN_STATE__;\nif (state) {{\n  state.version = `codex-plus:${{String(window.__CODEX_PLUS_DREAM_SKIN_PLATFORM__ || 'unknown')}}:${{window.__CODEX_PLUS_DREAM_SKIN_TARGET_ENGINE__}}:r${{window.__CODEX_PLUS_DREAM_SKIN_RUNTIME_REVISION__}}`;\n  state.observer?.disconnect?.();\n  if (state.timer) clearInterval(state.timer);\n  state.observer = null;\n  state.timer = null;\n}}\nwindow.__CODEX_PLUS_DREAM_SKIN_PAYLOAD_SIGNATURE__ = {};\nreturn result;\n}})()",
        art_assignment.unwrap_or_default(),
        serde_json::to_string(&dream_skin_art_content_signature(settings)).unwrap(),
        theme,
        serde_json::to_string(DREAM_SKIN_RENDERER_REVISION).unwrap(),
        serde_json::to_string(engine).unwrap(),
        skin_api_bootstrap,
        payload,
        serde_json::to_string(&payload_revision).unwrap(),
    );
    payload
}

fn managed_dream_skin_css(settings: &BackendSettings) -> String {

View on GitHub (pinned to f2074595a2)

Solutions

  1. Inspect the art payload for non-string JSON map keys
  2. Check recent changes to dream skin art data structures
  3. Report as a bug; this path is expected to be infallible
Defensive patterns

Strategy: fallback

When it happens

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