libnyanpasu/clash-nyanpasu · error
failed to restart service, exit code: {}, signal: {:?}
Error message
failed to restart service, exit code: {}, signal: {:?} What it means
restart_service ran the service restarter with elevated privileges (RunasCommand on Windows, sudo on macOS) and the child process exited non-zero, so the nyanpasu service was not restarted. This is the ExitStatus guard on the privileged restart command: failure points to a denied elevation prompt, a service that is not installed, or the service failing to come back up after stop.
Source
Thrown at backend/tauri/src/core/service/control.rs:285
})
.await??;
if !child.success() {
anyhow::bail!(
"failed to restart service, exit code: {}, signal: {:?}",
child.code().unwrap_or(-1),
{
#[cfg(unix)]
{
child.signal().unwrap_or(0)
}
#[cfg(not(unix))]
{
0
}
}
);
}
Ok(())
}View on GitHub (pinned to f7dbce2997)
Solutions
- Retry and accept the UAC/sudo elevation prompt.
- Verify the service is installed and running via status(); reinstall (install_service) if it is missing.
- Run the service binary manually with the `restart` argument as administrator to capture detailed output.
- If restart keeps failing, stop then start the service as separate steps to isolate which phase fails.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at backend/tauri/src/core/service/control.rs:285 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of libnyanpasu/clash-nyanpasu@f7dbce2997 (2026-09-08).
Data as JSON: /api/errors/68dc5bca53b0ec94.
Report an issue: GitHub.