MacOS pkg error: electron-builder attemps to code-sign a framework
See original GitHub issue- Version: 21.2.0 (not the latest version as it does not currently work on MacOS)
- Target: MacOS pkg
Hi, We’re working on the MacOS version of an existing Windows app.
Everything works fine when code-signing is disabled. If code-signing is enabled, we get the following error:
⨯ Command failed: codesign --sign E0769897B5207F7E3FF79D46FCEFC98F84A212F3 --force --options runtime --entitlements installer/osx/entitlements.mac.plist /Users/merwan/Documents/MyApp/_bundles/mac/MyApp.app/Contents/Resources/app.asar.unpacked/someDependencyC.framework
/Users/merwan/Documents/MyApp/_bundles/mac/MyApp.app/Contents/Resources/app.asar.unpacked/someDependencyC.framework: bundle format unrecognized, invalid, or unsuitable
The app contains a native Node addon and some of its dependencies. They are asarUnpacked so here’s what’s inside of MyApp.App/Contents/Resources/app.asar.unpacked
.
- nodeAddon.node (our native addon)
- someDependencyA.dylib (no issue with this one)
- someDependencyB.dylib (no issue with this one)
- someDependencyC.framework (library provided by a third party)
It seems that electron-builder attempts to sign the .framework, which fails.
1) Is this an expected behavior?
2) I noticed that there’s a Contents/Frameworks
folder in the bundled app. Should I put our dependency there? If yes, how to instruct electron builder to do so?
Note: if we exclude the framework from the bundle and then, after everything is signed, we copy it manually in the app.asar.unpacked
folder (or even in Content/Frameworks
), there’s no signing error and the app works. I guesse we could do this with an afterSign script as a workaround but this is not obviously not ideal.
Thanks for your help,
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (3 by maintainers)
Top GitHub Comments
I simply disabled automatic sign off aaplication
export CSC_IDENTITY_AUTO_DISCOVERY=false
$ export CSC_IDENTITY_AUTO_DISCOVERY=false $ npm run pack
Okey.