{"record":{"id":"58f6822415a369bf","repo":"libnyanpasu/clash-nyanpasu","slug":"failed-to-install-service-exit-code-signal","errorCode":null,"errorMessage":"failed to install service, exit code: {}, signal: {:?}","messagePattern":"failed to install service, exit code: (.+?), signal: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/tauri/src/core/service/control.rs","lineNumber":80,"sourceCode":"    })\n    .await??;\n    if !child.success() {\n        anyhow::bail!(\n            \"failed to install service, exit code: {}, signal: {:?}\",\n            child.code().unwrap_or(-1),\n            {\n                #[cfg(unix)]\n                {\n                    child.signal().unwrap_or(0)\n                }\n                #[cfg(not(unix))]\n                {\n                    0\n                }\n            }\n        );\n    }\n    Ok(())\n}","sourceCodeStart":62,"sourceCodeEnd":98,"githubUrl":"https://github.com/libnyanpasu/clash-nyanpasu/blob/f7dbce2997c633e484f54788035e770b3ee99773/backend/tauri/src/core/service/control.rs#L62-L98","documentation":"install_service ran the privileged service installer (RunasCommand elevation on Windows, sudo helper on macOS) via spawn_blocking, and the child process exited with a non-zero status. The exit code/signal is surfaced so callers can diagnose why the nyanpasu service failed to install; it does not indicate a Rust-side failure, only that the elevated installer itself reported failure (e.g. user denied elevation or the installer errored).","triggerScenarios":"Thrown at backend/tauri/src/core/service/control.rs:80 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-run install_service and accept the OS elevation (UAC/sudo) prompt when it appears.","Check the exit code: non-zero usually means the elevation prompt was denied or the service installer binary failed; run the service executable manually with the install argument to see its error output.","Verify the service binary exists at SERVICE_PATH and is not blocked/quarantined by antivirus before retrying.","On Windows, check that the user account is allowed to elevate; on macOS, verify sudo credentials are valid."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"f7dbce2997c633e484f54788035e770b3ee99773","analyzedAt":"2026-09-08T01:24:59.197Z","contentChangedAt":"2026-09-08T01:24:59.197Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}