{"record":{"id":"0b8689680dba5b40","repo":"DioxusLabs/dioxus","slug":"makensis-failed-exit-code-stdout-stder","errorCode":null,"errorMessage":"makensis failed (exit code {:?}):\nstdout: {}\nstderr: {}","messagePattern":"makensis failed \\(exit code (.+?)\\):\nstdout: (.+?)\nstderr: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/bundler/windows.rs","lineNumber":593,"sourceCode":"        let nsi_path = output_dir.join(format!(\"{product_name}.nsi\"));\n        std::fs::write(&nsi_path, &nsi_content).context(\"Failed to write NSIS script\")?;\n\n        tracing::info!(\"Running makensis to build NSIS installer...\");\n        let mut cmd = Command::new(&makensis);\n        cmd.arg(\"-NOCD\");\n        cmd.arg(&nsi_path);\n\n        tracing::debug!(\"makensis command: {:?}\", cmd);\n\n        let output = cmd\n            .output()\n            .await\n            .with_context(|| format!(\"Failed to run makensis at {}\", makensis.display()))?;\n\n        if !output.status.success() {\n            let stderr = String::from_utf8_lossy(&output.stderr);\n            let stdout = String::from_utf8_lossy(&output.stdout);\n            bail!(\n                \"makensis failed (exit code {:?}):\\nstdout: {}\\nstderr: {}\",\n                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                \"makensis completed but installer not found at {}\",\n                output_path.display()\n            );\n        }\n","sourceCodeStart":575,"sourceCodeEnd":611,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/bundler/windows.rs#L575-L611","documentation":"Raised in bundle_windows_nsis after running makensis on the generated .nsi installer script: the process completed but returned a non-zero exit status. This is an external tool failure — the generated NSIS script or local NSIS setup caused the installer build to fail — and makensis's captured stdout/stderr are surfaced in the message.","triggerScenarios":"Thrown at packages/cli/src/bundler/windows.rs:593 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["makensis failed. Read the printed stdout and stderr and fix the NSIS script 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-14T05:17:10.506Z"}