{"record":{"id":"5143efc5d6b9ed10","repo":"DioxusLabs/dioxus","slug":"light-exe-failed-exit-code-stdout-stde","errorCode":null,"errorMessage":"light.exe failed (exit code {:?}):\nstdout: {}\nstderr: {}","messagePattern":"light\\.exe failed \\(exit code (.+?)\\):\nstdout: (.+?)\nstderr: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/bundler/windows.rs","lineNumber":328,"sourceCode":"            .arg(&output_path)\n            .arg(\"-ext\")\n            .arg(\"WixUIExtension\");\n\n        for wixobj in &all_wixobj_paths {\n            light_cmd.arg(wixobj);\n        }\n\n        tracing::debug!(\"light command: {:?}\", light_cmd);\n\n        let light_output = light_cmd\n            .output()\n            .await\n            .with_context(|| format!(\"Failed to run light.exe at {}\", light.display()))?;\n\n        if !light_output.status.success() {\n            let stderr = String::from_utf8_lossy(&light_output.stderr);\n            let stdout = String::from_utf8_lossy(&light_output.stdout);\n            bail!(\n                \"light.exe failed (exit code {:?}):\\nstdout: {}\\nstderr: {}\",\n                light_output.status.code(),\n                stdout,\n                stderr\n            );\n        }\n\n        if can_sign_windows(&windows_settings) {\n            self.try_sign_windows(&output_path).await?;\n        }\n\n        if !output_path.exists() {\n            bail!(\n                \"light.exe completed but MSI not found at {}\",\n                output_path.display()\n            );\n        }\n","sourceCodeStart":310,"sourceCodeEnd":346,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/bundler/windows.rs#L310-L346","documentation":"Raised in bundle_windows_msi after running the WiX linker light.exe over all compiled .wixobj files: the linker ran to completion but exited non-zero. This is an external tool failure during MSI linking — typical causes are unresolved symbols, duplicate symbols across fragments, or missing extensions — and light's stdout/stderr are included for diagnosis.","triggerScenarios":"Thrown at packages/cli/src/bundler/windows.rs:328 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["light.exe failed. Read the printed stdout and stderr and fix the WiX linking error it reports."],"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"}