{"record":{"id":"0753f48ce07d65b4","repo":"DioxusLabs/dioxus","slug":"candle-exe-failed-exit-code-stdout-std","errorCode":null,"errorMessage":"candle.exe failed (exit code {:?}):\nstdout: {}\nstderr: {}","messagePattern":"candle\\.exe failed \\(exit code (.+?)\\):\nstdout: (.+?)\nstderr: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/bundler/windows.rs","lineNumber":268,"sourceCode":"            .arg(&wxs_path);\n\n        if wix_settings.fips_compliant {\n            candle_cmd.arg(\"-fips\");\n        }\n\n        candle_cmd.arg(\"-ext\").arg(\"WixUIExtension\");\n\n        tracing::debug!(\"candle command: {:?}\", candle_cmd);\n\n        let candle_output = candle_cmd\n            .output()\n            .await\n            .with_context(|| format!(\"Failed to run candle.exe at {}\", candle.display()))?;\n\n        if !candle_output.status.success() {\n            let stderr = String::from_utf8_lossy(&candle_output.stderr);\n            let stdout = String::from_utf8_lossy(&candle_output.stdout);\n            bail!(\n                \"candle.exe failed (exit code {:?}):\\nstdout: {}\\nstderr: {}\",\n                candle_output.status.code(),\n                stdout,\n                stderr\n            );\n        }\n\n        let mut all_wixobj_paths = vec![wixobj_path];\n        for frag_wxs in &fragment_wxs_paths {\n            let frag_name = frag_wxs.file_stem().unwrap_or_default().to_string_lossy();\n            let frag_wixobj = output_dir.join(format!(\"{frag_name}.wixobj\"));\n\n            let mut frag_candle = Command::new(&candle);\n            frag_candle\n                .arg(\"-arch\")\n                .arg(wix_arch)\n                .arg(\"-o\")\n                .arg(&frag_wixobj)","sourceCodeStart":250,"sourceCodeEnd":286,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/bundler/windows.rs#L250-L286","documentation":"Raised in bundle_windows_msi after running the WiX compiler candle.exe on the main .wxs file: the process was spawned and completed, but returned a non-zero exit status. This is an external tool failure — the WiX source, arguments (arch, fips flag, WixUIExtension), or environment caused the compile to fail — and the stdout/stderr captured from candle are surfaced to diagnose it.","triggerScenarios":"Thrown at packages/cli/src/bundler/windows.rs:268 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["candle.exe failed. Read the printed stdout and stderr and fix the WiX source it complains about."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}