{"record":{"id":"229fec1d3f10656d","repo":"DioxusLabs/dioxus","slug":"custom-sign-command-failed-with-exit-code","errorCode":null,"errorMessage":"Custom sign command failed with exit code: {:?}","messagePattern":"Custom sign command failed with exit code: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/bundler/windows.rs","lineNumber":849,"sourceCode":"/// Run a custom signing command. The `%1` placeholder in args is replaced\n/// with the path to the binary to sign.\nasync fn run_custom_sign_command(path: &Path, cmd: &str, args: &[String]) -> Result<()> {\n    let path_str = path.to_string_lossy();\n    let resolved_args: Vec<String> = args\n        .iter()\n        .map(|arg| arg.replace(\"%1\", &path_str))\n        .collect();\n\n    tracing::debug!(\"Running custom sign command: {} {:?}\", cmd, resolved_args);\n\n    let status = Command::new(cmd)\n        .args(&resolved_args)\n        .status()\n        .await\n        .with_context(|| format!(\"Failed to run custom sign command: {cmd}\"))?;\n\n    if !status.success() {\n        bail!(\n            \"Custom sign command failed with exit code: {:?}\",\n            status.code()\n        );\n    }\n\n    Ok(())\n}\n\n/// Run signtool.exe to sign a binary with a certificate thumbprint.\nasync fn run_signtool_sign(\n    path: &Path,\n    thumbprint: &str,\n    settings: &WindowsSettings,\n) -> Result<()> {\n    let mut args = vec![\n        \"sign\".to_string(),\n        \"/fd\".to_string(),\n        settings","sourceCodeStart":831,"sourceCodeEnd":867,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/bundler/windows.rs#L831-L867","documentation":"Raised in run_custom_sign_command (invoked from try_sign_windows) when a user-configured custom signing command — with `%1` placeholders already substituted with the binary path — completes but exits with a non-success status. This is an external tool failure: the user-supplied signing tool rejected the binary or its arguments, and the exit code identifies how it failed.","triggerScenarios":"Thrown at packages/cli/src/bundler/windows.rs:849 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The custom sign command failed. Check the command's exit code and output and fix the signing configuration."],"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"}