DioxusLabs/dioxus · error · anyhow::Error

light.exe failed (exit code {:?}): stdout: {} stderr: {}

Error message

light.exe failed (exit code {:?}):
stdout: {}
stderr: {}

What it means

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.

Source

Thrown at packages/cli/src/bundler/windows.rs:328

            .arg(&output_path)
            .arg("-ext")
            .arg("WixUIExtension");

        for wixobj in &all_wixobj_paths {
            light_cmd.arg(wixobj);
        }

        tracing::debug!("light command: {:?}", light_cmd);

        let light_output = light_cmd
            .output()
            .await
            .with_context(|| format!("Failed to run light.exe at {}", light.display()))?;

        if !light_output.status.success() {
            let stderr = String::from_utf8_lossy(&light_output.stderr);
            let stdout = String::from_utf8_lossy(&light_output.stdout);
            bail!(
                "light.exe failed (exit code {:?}):\nstdout: {}\nstderr: {}",
                light_output.status.code(),
                stdout,
                stderr
            );
        }

        if can_sign_windows(&windows_settings) {
            self.try_sign_windows(&output_path).await?;
        }

        if !output_path.exists() {
            bail!(
                "light.exe completed but MSI not found at {}",
                output_path.display()
            );
        }

View on GitHub (pinned to 24f6a829df)

Solutions

  1. light.exe failed. Read the printed stdout and stderr and fix the WiX linking error it reports.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/cli/src/bundler/windows.rs:328 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of DioxusLabs/dioxus@24f6a829df (2026-08-23). Data as JSON: /api/errors/5143efc5d6b9ed10. Report an issue: GitHub.