electron-builder icon indicating copy to clipboard operation
electron-builder copied to clipboard

Error on package app targeting MAS

Open CurlerRoo opened this issue 5 months ago • 0 comments

  • Electron-Builder Version: 24.9.1
  • Node Version: 20.11.0
  • Electron Version: 27.2.2
  • Electron Type (current, beta, nightly):
  • Target: mas

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!

CurlerRoo avatar Jan 21 '24 04:01 CurlerRoo