-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: check notarytool response status #173
fix: check notarytool response status #173
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Since result.output
is JSON, can we refactor this to move the JSON.parse
to line 79, and change the if statement to check parsed.status !== 'Accepted'
?
According to the man
page for notarytool
: "Only return from notarytool once the Apple notary service has responded with a status of "Accepted", "Invalid", "Rejected", or if a fatal error has occurred during submission."
So the current change in this PR wouldn't catch "Rejected", which we also want to handle.
Thank you for your insights! Do you think we should go even more defensive by wrapping |
I think it's fine to let it throw an error in that case, since it would mean there's a bug and it'll be easier to debug if we let it throw directly. |
@electron/wg-ecosystem, OK to merge? This has been sitting approved + unmerged for a few weeks now. |
🎉 This PR is included in version 2.2.1 🎉 The release is available on: Your semantic-release bot 📦🚀 |
I tried to sign and notarize my application, but kept getting error
The staple and validate action failed! Error 65.
. It is not obvious why this happens and what does it mean. After some digging I found that the problem is with my certificate. I understand that this is not directly related to this package, but this package could save some time by providing additional information.Here is the output:
As you can see on line
electron-notarize:notarytool result code 0, output
, notary tool exited with code0
which is treated as success, but the output contains statusInvalid
. Currently code checks only exit code and discards output, so notarization process continues even though it will definitely fail. And we and up with final error message which does not tell whats wrong and let us think that problem is withstaple
step:With provided change we get this result:
It does not explicitly tell what's wrong, but using
DEBUG
we can get all the information from notarization log:Thank you.