Closed brondibur closed 11 months ago
This happens because electron-builder notarizes the app (unintentionally) after building and signing, as it calls notarizeIfProvided
. This calls the generateNotarizeOptions
function, which returns "legacy" as the tool since we don't specify the notarize field in the build config and it is undefined.
So we're essentially notarizing twice, once unintentionally via electron-builder using altool, and once intentionally via electron-notarize using notarytool.
This can be "fixed" by adding notarize: false
to the build config, so that electron-builder will skip notarization:
mac: {
...
notarize: false
}
Or we can stop using electron-notarize and just use electron-builder for notarization by properly passing the notarize
field in the build config.
mac: {
...
notarize: {
teamId: <TEAM_ID>
}
}
We have the following script in package.json:
The contents of macos.build.prod.js are:
And finally, the contents of notarize.js are:
We clearly specify the tool as
notarytool
. But we still see the following warning: