Hello Apple Developer Community,
I’m encountering an issue where my macOS app (signed with a valid ‘Developer ID Application’ certificate and accepted by Apple’s notary service) fails when I attempt to staple the notarization ticket. The Apple notary service reports ‘Accepted’ each time, but xcrun stapler staple always returns Error 65, with the local check (spctl -a -vvv) showing ‘Unnotarized Developer ID.’
Here are some key points:
- Certificate: I have a valid ‘Developer ID Application’ certificate (unexpired) in my login and system keychains, with Apple’s intermediate certificates also installed and set to System Defaults or Always Trust.
- Notarization: Regardless of whether I submit a
.zipof the.appor the final.dmgfor notarization, notarytool reports ‘Accepted.’ - Stapling:
xcrun stapler staple(ornotarytool staple) on the exact file I uploaded fails with Error 65, claiming it can’t validate the downloaded ticket. - Environment Checks:
- Checked for duplicate or outdated certificates—only one Developer ID remains.
- Repeated on multiple code-signed builds (both
.appand.dmg) with the same result. - Manually tested code-signing the
.appwith entitlements (for the hardened runtime) and then signing the.dmgwithout entitlements.
- Logs: The relevant excerpt from stapler indicates “Could not validate ticket for [app]. The staple and validate action failed! Error 65,” even though Apple’s notary service claims success.
Could you please advise any additional troubleshooting steps or possible causes for local validation failure after a successful notarization? I’ve already ensured the environment is up to date with valid intermediates, only one Developer ID certificate. Any insight on diagnosing ticket mismatch or known tool bugs with Error 65 would be appreciated.
Thank you!
Error 65 means that stapler couldn’t find a ticket for the cdhash of the item you’re trying to staple. I have more details and some debugging hints in this thread.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"