{"record":{"id":"0660491eb49ca70f","repo":"tauri-apps/tauri","slug":"error-message-e","errorCode":null,"errorMessage":"{error_message}: {e}","messagePattern":"\\{error_message\\}: \\{e\\}","errorType":"exception","errorClass":"io::Error","httpStatus":null,"severity":"error","filePath":"crates/tauri-macos-sign/src/lib.rs","lineNumber":362,"sourceCode":"  let decoded = base64::engine::general_purpose::STANDARD\n    .decode(&cleaned)\n    .map_err(Error::Base64Decode)?;\n\n  std::fs::write(out_path, &decoded).map_err(|error| Error::Fs {\n    context: \"failed to write decoded certificate\",\n    path: out_path.to_path_buf(),\n    error,\n  })?;\n\n  Ok(())\n}\n\nfn assert_command(\n  response: std::result::Result<std::process::ExitStatus, std::io::Error>,\n  error_message: &str,\n) -> std::io::Result<()> {\n  let status =\n    response.map_err(|e| std::io::Error::new(e.kind(), format!(\"{error_message}: {e}\")))?;\n  if !status.success() {\n    Err(std::io::Error::other(error_message))\n  } else {\n    Ok(())\n  }\n}\n","sourceCodeStart":344,"sourceCodeEnd":369,"githubUrl":"https://github.com/tauri-apps/tauri/blob/460ec35447493200d64290dd7f015d5a91d0fd58/crates/tauri-macos-sign/src/lib.rs#L344-L369","documentation":"assert_command wraps the result of spawning/waiting for an external signing or notarization command (codesign, notarytool, etc.). If the process failed to run, it re-raises the io::Error prefixed with the given context message; if the process ran but exited non-zero, it returns Error::other with just the message.","triggerScenarios":"with_certificate_file, sign or notarize_inner invoke a command whose ExitStatus is an Err (binary missing, permission denied) or non-zero (codesign rejects the app, wrong certificate password, notarization rejected).","commonSituations":"Missing Apple developer certificate in the keychain, wrong APPLE_CERTIFICATE_PASSWORD, codesign/xcode-tools not installed, expired provisioning/signing identity, App Store Connect API keys rejected during notarization.","solutions":["Read the wrapped message after the colon to see the root cause (e.g. 'No such file or directory' means the tool binary is missing)","Verify the signing identity exists: `security find-identity -v -p codesigning`","Install/verify Xcode command line tools (`xcode-select --install`) and that codesign/notarytool are on PATH","Check certificate env vars (APPLE_CERTIFICATE, APPLE_CERTIFICATE_PASSWORD, APPLE_ID/APPLE_PASSWORD or APPLE_API_KEY) are correct and unexpired","Run the failing command manually to see full stderr"],"exampleFix":"// before: sign with a non-existent identity\nsign(app_path, \"Developer ID Application: Foo (BADTEAM)\", ...)\n// after: use a valid identity from `security find-identity`\nsign(app_path, \"Developer ID Application: Acme Inc (TEAMID1234)\", ...)","handlingStrategy":"try-catch","validationCode":"// preflight checks before signing/notarizing\nassert(typeof process.env.APPLE_CERTIFICATE_PASSWORD === 'string');\n// verify codesigning identity exists:\n// security find-identity -v -p codesigning | grep 'Developer ID Application'","typeGuard":null,"tryCatchPattern":"match tauri_macos_sign::sign(&app, &identity, &cert) {\n  Err(e) if e.to_string().contains(\"codesign\") => eprintln!(\"Signing failed: {e}; check identity & keychain\"),\n  Err(e) => return Err(e.into()),\n  Ok(_) => {}\n}","preventionTips":["Install Xcode CLT and verify codesign/notarytool availability in CI before signing","Preflight the signing identity with `security find-identity`","Keep certificate env vars/secrets validated at pipeline start","Run the same codesign/notarytool command manually when debugging"],"tags":["macos","codesign","notarization","process"],"backgroundTag":"git-command-failed","analyzedSha":"460ec35447493200d64290dd7f015d5a91d0fd58","analyzedAt":"2026-09-18T23:55:51.277Z","contentChangedAt":"2026-09-18T23:55:51.277Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}