DioxusLabs/dioxus · error · anyhow::Error

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

Error message

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

What it means

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.

Source

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

            .arg(&wxs_path);

        if wix_settings.fips_compliant {
            candle_cmd.arg("-fips");
        }

        candle_cmd.arg("-ext").arg("WixUIExtension");

        tracing::debug!("candle command: {:?}", candle_cmd);

        let candle_output = candle_cmd
            .output()
            .await
            .with_context(|| format!("Failed to run candle.exe at {}", candle.display()))?;

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

        let mut all_wixobj_paths = vec![wixobj_path];
        for frag_wxs in &fragment_wxs_paths {
            let frag_name = frag_wxs.file_stem().unwrap_or_default().to_string_lossy();
            let frag_wixobj = output_dir.join(format!("{frag_name}.wixobj"));

            let mut frag_candle = Command::new(&candle);
            frag_candle
                .arg("-arch")
                .arg(wix_arch)
                .arg("-o")
                .arg(&frag_wixobj)

View on GitHub (pinned to 24f6a829df)

Solutions

  1. candle.exe failed. Read the printed stdout and stderr and fix the WiX source it complains about.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown at packages/cli/src/bundler/windows.rs:268 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/0753f48ce07d65b4. Report an issue: GitHub.