DioxusLabs/dioxus · error · anyhow::Error
Custom sign command failed with exit code: {:?}
Error message
Custom sign command failed with exit code: {:?} What it means
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.
Source
Thrown at packages/cli/src/bundler/windows.rs:849
/// Run a custom signing command. The `%1` placeholder in args is replaced
/// with the path to the binary to sign.
async fn run_custom_sign_command(path: &Path, cmd: &str, args: &[String]) -> Result<()> {
let path_str = path.to_string_lossy();
let resolved_args: Vec<String> = args
.iter()
.map(|arg| arg.replace("%1", &path_str))
.collect();
tracing::debug!("Running custom sign command: {} {:?}", cmd, resolved_args);
let status = Command::new(cmd)
.args(&resolved_args)
.status()
.await
.with_context(|| format!("Failed to run custom sign command: {cmd}"))?;
if !status.success() {
bail!(
"Custom sign command failed with exit code: {:?}",
status.code()
);
}
Ok(())
}
/// Run signtool.exe to sign a binary with a certificate thumbprint.
async fn run_signtool_sign(
path: &Path,
thumbprint: &str,
settings: &WindowsSettings,
) -> Result<()> {
let mut args = vec![
"sign".to_string(),
"/fd".to_string(),
settingsView on GitHub (pinned to 24f6a829df)
Solutions
- The custom sign command failed. Check the command's exit code and output and fix the signing configuration.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at packages/cli/src/bundler/windows.rs:849 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/229fec1d3f10656d.
Report an issue: GitHub.