I'm trying to create a package for the Mac App Store using Electron 6.1.9 and Electron builder 21.2.0.
I sign the package with "3rd Party Mac Developer Application" and "3rd Party Mac Developer Installer" certificates and an am using a proper provisioning profile.
It appears to work fine, the build is successful. But I cannot start the resulting app. It crashes immediately with this error:
Exception Type: EXCCRASH (Code Signature Invalid) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXCCORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x1
I also tried to a create VM running MacOS Catalina and install and run the app there. The result is the same.
My question is how do I make sure that the MAS package is OK? How to test this package?
Tools like codesign, pkgutil etc all print the expected output, the signature appears to be fine. Yet I'm still getting invalid signature error.
Btw I know I could build with type="development", in which case the app would run locally, but that wouldn't be the same package. I wanna test the distribution package before sending to Apple for review.
UPDATE:
Using Apple's tool, I found the following error:
ERROR ITMS-90277: "Invalid Bundle Identifier. The application bundle contains a tool or framework Electron Helper (GPU) [hu.icell.etcd.pkg/Payload/ETCD Manager.app/Contents/Frameworks/ETCD Manager Helper (GPU).app] using the bundle identifier 'hu.icell.etcd.helper.(GPU)', which is not a valid bundle identifier."
So somehow it is trying to use my appid with Electron's own stuff. Any ideas about how to fix this?