"Unnotarized Developer ID" - Facing issue while code signing my electron application using the apple developer certificates

I've created an application using electron.js in Visual Studio Code to be published outside MAC App Store (MAS).

Before the macOS 10.14.4 release, my application was build and signed successfully using " electron-osx-sign " module which uses " electron-forge " internally. Now after macOS update I'm getting error message while building the application as - "rejected source = Unnotarized Developer ID".

Earlier, I followed the below mentioned steps to sign my application:

1. Download Developer ID Application and Developer Id Installer certificates from my apple developer account.

2. Install the certificates in KeyChain access of my mac system.

3. Run the below mentioned command:

"

electron-packager . myAppName --overwrite --platform=darwin --arch=x64 --electron-verison=5.0.1 -icon=icon.icns --osx-sign
"

4. A new application from identified developer was created in the mac system location.


I followed the same procedure to create a new build for my application post the macOS update and getting the below mentioned error message:


" WARNING: Code sign failed; please retry manually. Error: Command failed: spctl --assess --type execute --verbose --ignore-cache --no-cache /var/folders/n6/vn0gnf6j5mg0my_k9pplw4n80000gq/T/electron-packager/darwin-x64/ApplicationFolderName/MyAppName.app

/var/folders/n6/vn0gnf6j5mg0my_k9pplw4n80000gq/T/electron-packager/darwin-x64/ApplicationFolderName/MyAppName.app: rejected

source=Unnotarized Developer ID "


Kindly provide me with a possible solution to code sign and notarize my electron application.
Thanks in advance.

Replies

Notarization is required for new developers.

  • And what does this mean? Do I need to provide some official ID or something?

Add a Comment

More specifically, if you want to sign using a Developer ID certificate, whatever you're signing has to be notarized. You might have used Mac Development certificates or some other when it worked.


See Notarizing Your App Before Distribution.

Hi,
Thanks for the reply.
Can you please help me with how to do it for an application built in visual studio code with electron.js ?
Also, I'm getting error as "Unnotarized developer ID" as mentioned above. Is this issue specific to my apple developer account or will be issue with my code ?

Hi,
Thanks for the reply.
Can you help me in how to notarize my application built in visual studio code using electron.js ? I've found many solutions for application built in Xcode over internet but, I couldn't find any solution for application built in Visual studio code using electron.js

Is there any issue with my developer ID due to which I'm getting error as "Unnotarized developer ID" or the issue is something related to the code ?

I don't know what electron-packager you are using or what it does internally, but have you tried the suggestion in the error: "retry manually"? The "--overwrite" doesn't look like it would work with "--no-cache" "--ignore-cache", if binaries are resigned with new timestamps, they're not going to be notarized instantly, maybe you need to update your tools. The error says code sign failed, but that might not necessarily be 100% accurate, since it looks like it fails at spctl execute assessment. Try `

$ codesign -vvv --deep --strict`
on the app. If it seems to check out, `
$ codesign -dvv`
and inspect the signatures manually.

I was working on my own code-signing utility, which more or less worked. Then I tried AppWrapper, and haven't looked back. It will code-sign the bundle and optionally put it into a .dmg or .pkg file. The latest release has added notarization capability. I believe it leverages Xcode for this so you will need that installed. You also need to set up a subaccount in your Apple Developer account, for uploading your products for notarization. Notarization also requires the new "hardened runtime", and AppWrapper will take care of this as well. All of this can also be done, more tediously, through the command line with Xcode tools.


My apps that I notarize are written in Xojo, as is AppWrapper. The website seems to be Xojo-centric but, not knowing about your product (and I haven't tried this myself), offhand I would think it exploring whether it can handle bundles developed in other IDEs--at least bundles that are "drag and drop" installations and don't install stuff all over the disk. HTH.

Thanks for the reply.
Actually, the electron-packager packages my entire code and creates a '.app' for mac. My major issue is code signing part as before the update evehting was working absolutely fine for me but, post update I'm getting error to be unnoatrized developer ID. I've created a new application in Xcode and got it signed and notarized as everything was taken care by Xcode only. But, the current applicaiton being developed in Visual studio code using electron.js is coming up as a big challenge to me.
Do you know how can I get to know whether my developer ID is notarized or not, or is it related to something else?
Kindly share some inputs related to electron.js built applicaitons in visual studio code if possible.
Thanks in advance

Thanks for the reply.
Actually I created a new short application in Xcode for testing purpose. The Xcode took care of code signing and notarization for application built in Xcode. But my issue is I've created an applicaiton using Visual Studio Code in electron.js and I can't move or exxport my application to Xcode.
As mentioned, before the macOS update, the steps followed by me were working absolutely fine but post update, I started getting 'unnotarized developer ID' error. Can you please help me understandiing if it is something related to me developer account ID ?
Do i need to get it notarized or something similar to it needs to be done ?
Also please let me know how can I check if my developer ID s notarized or not ?
Thanks in advance.

Notarization is not something done to your developer ID. It is a process specifically applied to your application, after it is code-signed.


As I said, I use AppWrapper, which handles the signing, setting the "hardened runtime" and producing the final installer (.dmg or .pkg.) Notarization is the next step, where the installer is uploaded to Apple to go through its malware check, verifying your certificate, and whatever else it does. Following that your installer is "stapled" with the notarization.


Apple created this in response to instances where malware was found in apps that appeared to be legitimately signed. Of course, those certificates are revoked once found. Notarization is the new additional step where they audit the code before "stapling" it.

Hi @jerryfrit,

Thanks for the reply. I understood the case you explained. Now my worry is code-signing part. Why does my code-signing fails with the error message as "Unnotarized developer ID". Because of this error message I thought that there is some issue with my developer ID. Can you help me with any solution to code signing part.
I've been following https://github.com/electron/electron-osx-sign/wiki/1.-Getting-Started this link for the code-signing for an application outside MAC app store. Please provide with any possible solution with you.
Thanks in advance.

Hi,taiji kamiya-san!

I'm Japanese. But This forum doesn't seem to be able to write in Japanese.😟

I have same problem.

I was able to sign with Mojave until early September and recently updated to Catalina and can no longer sign.

I think that the cause is ID setting because it is written “unnotarized ID”.

In my case, target is Adobe AIR apps and I use codesign(productbuild) command.

Please let me know if you have any information.