{"record":{"id":"6301dccb91d5ca3f","repo":"DioxusLabs/dioxus","slug":"candle-exe-failed-on-fragment-exit-code","errorCode":null,"errorMessage":"candle.exe failed on fragment {} (exit code {:?}):\n{}","messagePattern":"candle\\.exe failed on fragment (.+?) \\(exit code (.+?)\\):\n(.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/bundler/windows.rs","lineNumber":295,"sourceCode":"        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)\n                .arg(frag_wxs);\n\n            let frag_output = frag_candle.output().await.with_context(|| {\n                format!(\"Failed to compile WiX fragment: {}\", frag_wxs.display())\n            })?;\n\n            if !frag_output.status.success() {\n                let stderr = String::from_utf8_lossy(&frag_output.stderr);\n                bail!(\n                    \"candle.exe failed on fragment {} (exit code {:?}):\\n{}\",\n                    frag_wxs.display(),\n                    frag_output.status.code(),\n                    stderr\n                );\n            }\n            all_wixobj_paths.push(frag_wixobj);\n        }\n\n        tracing::info!(\"Running light.exe to link MSI...\");\n\n        let mut light_cmd = Command::new(&light);\n        light_cmd\n            .arg(\"-o\")\n            .arg(&output_path)\n            .arg(\"-ext\")\n            .arg(\"WixUIExtension\");\n","sourceCodeStart":277,"sourceCodeEnd":313,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/bundler/windows.rs#L277-L313","documentation":"Raised in bundle_windows_msi when candle.exe exits with a non-zero status while compiling an individual WiX fragment (.wxs files generated for resources like shortcuts or registry entries) into a .wixobj. Each fragment is compiled in a loop, so this indicates one specific fragment failed to compile — the fragment name and candle's combined output are included to identify the offending fragment.","triggerScenarios":"Thrown at packages/cli/src/bundler/windows.rs:295 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["candle.exe failed on the named fragment. Read the error output and fix that WiX fragment."],"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-14T05:17:10.506Z"}