notarize: Notarization hangs on `notarytool submit` for hours without output
Im using "@electron-forge/cli": "^7.2.0" which uses notarize under the hood. I provide credentials to notarize by passing them to my forge.config.js like this:
osxSign: {
'identity': "Developer ID Application: MYCOMPANYNAME",
'hardened-runtime': true,
'gatekeeper-assess': false,
'entitlements': 'entitlements.plist',
'entitlements-inherit': 'entitlements.plist',
},
osxNotarize: {
tool: 'notarytool',
appleId: process.env.APPLE_ID,
appleIdPassword: process.env.APP_SPECIFIC_PASSWORD,
teamId: process.env.APPLE_TEAM_ID,
},
And I run electron-forge package.
Expected Behavior:
Notarization succeeds or fails within 15 minutes.
Actual Behavior:
The notarization step hangs on the notarytool submit step shown here:
electron-notarize:spawn spawning cmd: xcrun args: [
'notarytool', 'submit', '/var/folders/4g/p6tq8s_j4tqf78675mcggp8m0000gn/T/electron-notarize-F7fJr2/MYAPPNAME.zip',
'--apple-id', '*********',
'--password', '*********',
'--team-id', '*********',
'--wait',
'--output-format', 'json'
] opts: {} +0ms
Notes:
Running this command by hand hangs, but if I remove --wait it succeeds in a couple minutes. My understanding of this wait flag is that its waiting on something else, but I dont understand what.
Removing the notarization steps prevents the hanging.
The zip is 0.3gb. I’ve checked that these vars are in my env. This issue has persisted all weekend.
What may be causing it to hang?
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 1
- Comments: 23 (1 by maintainers)
I waited for 2 days and succeeded
In my case it started to randomly to work.
A few things to note about my case, which might have been a factor:
Possibly Apple has a human in the loop for new developer accounts that are doing first time notarization?
I’d say if you are still having issues within a few days of attempting first notarization, try reaching out to Apple.
When notarization succeeds in my exp it has been within 15 mins.
What if I want to do this as a part of the release cycle using GitHub Actions. An action running for two days is crazy talk.
I have the same issue.
Similar configuration as you, but using w/ electron-builder + a afterSign script to call notarize.
It seems like wait flag does the following:
“Use the wait flag to tell notarytool to exit only after the Notary service finishes processing the submission. This eliminates the need to poll the service for status. Use the webhook flag if you want to specify a URL for the service to access after processing the submission.”
When you remove the wait flag is it successfully notarizing?
Is there a way to remove the --wait from the forge config?
Do not wait until it runs successfully