2

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
Keita Ono
  • 71
  • 1
  • 5

2 Answers2

3

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)

Avi L
  • 1,558
  • 2
  • 15
  • 33
1

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

Adam Soto
  • 174
  • 2
  • 14