First, I'm building an Electron app, using the node / electron tool chain, not XCode (and not VSCode -- Terminal only.) I did have to download and start XCode and click through the dialog boxes, else this process would fail with some missing tools (altool I think?) (So, for anyone else in the same boat, start there!) Running Monterey 12.1 on a Apple M1 Pro MacBook Pro, with OS and XCode updates downloaded and updated yesterday to whatever was latest at the time.
I'm trying to get my .dmg (initial install) and .zip (update) files signed, so that the Electron auto-updater will install auto-updates, which doesn't work if the update isn't signed. Given that this build tooling is pretty deep, and I wrote none of it myself, I'm trying to distill the failure to a root cause, as follows.
This whole process fails, with a mysterious source=Unnotarized Developer ID error printed from spctl.
I am not particularly well versed in how modern macOS notarization/signing works, but as far as I can tell, the process is as follows:
electron-builder(a node-based module/tool) builds the appropriateappfolder in a temp locationelectron-buildercallselectron-osx-sign(another node-based module/tool)electron-osx-signcallscodesign(an Apple-supplied tool) for each file in the folderelectron-osx-signthen attempts to verify thatcodesignworked, by usingspctl(another Apple-supplied tool) to--assessthe execution of the app- this
spctl --assessinvocation tells me that it's not executable, becausesource=Unnotarized Developer ID
And now I'm stuck. codesign does not print any error messages; it seems to work fine. The error message source=Unnotarized Developer ID from spctl is not documented anywhere I can find, so I can't figure out what I'm supposed to do to make this work.
In fact, this error message is confusing, because the documentation says you're supposed to notarize applications, not developer IDs.
I have two concrete questions:
- Is
electron-osx-signmissing doing something it should be doing? (See log pasted below) - What does the mysterious, undocumented error
source=Unnotarized Developer IDfromspctlmean, and where should I look to follow that error backwards to a root cause I can fix?
Excerpts from the build logs, cutting out a bunch of similar codesign invocations that all seem the same (but for different files):