Invalid code signing for MAS build (version 23.3.3)

See original GitHub issue
  • Electron-Builder Version: 23.3.3
  • Node Version: 16
  • Electron Version: 19.0.10
  • Target: MAS

From version 23.3.0 and later, signing MAS build will use 3rd Party Mac Developer Application certificate by default, and this causes invalid build for my app. When upload to the Mac App Store, I see the below error:

Asset validation failed (90284) Invalid Code Signing. The executable 'com.app.name.pkg/Payload/AppName.app/Contents/Library/LoginItems/AppName Login Helper.app/Contents/MacOS/AppName Login Helper' must be signed with the certificate that is contained in the provisioning profile. (ID: c3f46e59-cbb9-4b15-841d-04ffb05cb2b7)

I believe when the certificate doesn’t match the one embedded in provisioning profile, the build will show this error. However, when I set identity in mas key to Apple Distribution, I get the below error:

⨯ Cannot find valid "3rd Party Mac Developer Installer" identity to sign MAS installer, please see https://electron.build/code-signing

I believe this PR https://github.com/electron-userland/electron-builder/pull/6970 is related. When I manually patch macPackager.js to change ["3rd Party Mac Developer Application", "Apple Distribution"] to ["Apple Distribution", "3rd Party Mac Developer Application"], the app can be signed and uploaded to the Mac App Store successfully.

Should we use Apple Distribution by default and move 3rd Party Mac Developer Application to fallback? This should work for issue https://github.com/electron-userland/electron-builder/issues/6621 where Apple Distribution cannot be found so electron-builder will use 3rd Party Mac Developer Application certificate.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
jeanfbritocommented, Aug 25, 2022

I had the same problem, validated the suggestion of swapping it, and it worked. Created the PR for this. Thank you @thomasdao

0reactions
jeanfbritocommented, Sep 1, 2022

Already used in production and worked 100%. Thank you very much @mmaietta

Read more comments on GitHub >

github_iconTop Results From Across the Web

ITMS-90286: Invalid Code Signing E… - Apple Developer
ITMS-90286 : Invalid Code Signing Entitlements - Your application bundle's signature contains code signing entitlements that are not supported on macOS.
Read more >
ERROR ITMS-90046: "Invalid Code Signing Entitlement"
From the error, It looks like you're using wildcard certificate (*) which is not allowed to release build on App store.
Read more >
2019 SHA-2 Code Signing Support requirement for Windows ...
Required: Updates for legacy Windows versions will require that SHA-2 code signing support be installed. The support released in March (KB4474419 and KB4490628) ......
Read more >
electron-builder: Versions | Openbase
Code signing of NSIS uninstaller is supported on macOS Catalina (where it is broken by Apple, since wine 32 is not supported anymore)...
Read more >
Invalid Code Signature when Exporting Development build for ...
I choose my provisioning profile that has the proper UDID's in it (have triple checked that the QA's Mac is in the list)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found