Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Unnotarized Developer ID" error occurred while building for mac with Electron Builder

I've generated Developer ID Application and Installer certificates using Apple developper page and I can see it in login on Keychain. When I run electron-builder --mac --x64 I get the following error:

Error: Command failed: spctl --assess --type execute --verbose --ignore-cache --no-cache /Users/onokeita/Documents/workspace_js/stacknote-desktop-app/dist/mac/Stacknote.app
/Users/onokeita/Documents/workspace_js/stacknote-desktop-app/dist/mac/Stacknote.app: rejected
source=Unnotarized Developer ID

I tried it a few hours later and tried to recreate the certificate, but it didn't work. What should I do? Should I try to notarize the app manually?: How to upload dmg file for notarization in xcode

  • OSX 10.14.5.
  • electron-builder: 20.38.5
like image 521
Keita Ono Avatar asked Feb 24 '26 17:02

Keita Ono


2 Answers

TL;DR

For me, changing the password to app specific password resolved this error.

Explanation

App Store Connect now requires two-factor authentication (2FA) on all accounts, so you must create an app-specific password for Notarisations tools also.

How to create app-specific password: https://support.apple.com/en-us/HT204397)

Why you need app-specific password: https://developer.apple.com/documentation/xcode/notarizing_macos_software_before_distribution/customizing_the_notarization_workflow?language=objc#3087734

(By the way, the “Unnotarized Developer ID” warning will still be showing because electron process checks the staple before notarizing, but then it will continue and the build will complete)

like image 106
Avi L Avatar answered Feb 27 '26 08:02

Avi L


There is an issue related to this new bug here: https://github.com/electron-userland/electron-builder/issues/3828

like image 36
Adam Soto Avatar answered Feb 27 '26 08:02

Adam Soto



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!