electron-userland / electron-builder

A complete solution to package and build a ready for distribution Electron app with “auto update” support out of the box
https://www.electron.build
MIT License
13.62k stars 1.74k forks source link

Error on package app targeting MAS #7995

Open CurlerRoo opened 8 months ago

CurlerRoo commented 8 months ago

I'm encountering difficulty in packaging an Electron app on Mac, targeting the MAS. An error message is displayed: "Could not automatically determine ElectronTeamID from identity: ..."

After conducting an investigation, it appears that the issue lies in passing the identity hash instead of the identity name to osx-sign. Consequently, osx-sign is unable to extract the teamId from it. The code can be found here: https://github.com/electron-userland/electron-builder/blob/277341000a87abaa65a7985854c06e88ed5938b9/packages/app-builder-lib/src/macPackager.ts#L295

To resolve this problem, modifying the line from: identity: identity ? identity.hash || identity.name : undefined, to identity: identity ? identity.name || identity.hash : undefined, should address the issue.

Is it possible to include an option that prioritizes the use of the name over the hash for identity? Thanks!

pengyongqi commented 7 months ago

same problem,it's really suck

mmaietta commented 7 months ago

Out of curiosity, why not add ElectronTeamID directly to your info.plist file? That's all the electron/osx-sign is doing internally https://www.electronjs.org/docs/latest/tutorial/mac-app-store-submission-guide#extra-steps-without-electron-osx-sign

smithb1994 commented 7 months ago

Ran into same issue. Fixed this for myself by removing com.apple.security.app-sandbox permission from entitlements.mac.plist