App does not launch after sign or I got a blank electron window (macOS 10.14.4)
See original GitHub issueI need to sign my Electron application to submit to App Store. I tried with electron-osx-sign and the Mac App Store Submission Guide here, but with both I cannot open the application after signing.
I build my app with electron-packager using this command:
electron-packager . --app-bundle-id=my-bundle-id --helper-bundle-id=my-bundle-id.helper --app-version=1.1.22 --build-version=1.1.23 --platform=mas --arch=x64 --electron-version=3.0.4 --icon=assets/icons/mac/icon.icns --type=distribution --out=app-store --overwrite
After running this command I am able to open the .app file without problems. Then I try to sign the .app file and generate the .pkg file using these commands:
export DEBUG=electron-osx-sign*
electron-osx-sign 'app-store/Tok-mas-x64/Tok.app' --entitlements='build/entitlements.mas.plist' --entitlements-inherit='build/child.plist' --identity='3rd Party Mac Developer Application: My Company (XXXXX)' --provisioning-profile='embedded.provisionprofile' --verbose
I got the following message in terminal: “Application signed: app-store/Tok-mas-x64/Tok.app”
If I open the app file I got a blank electron window. If I run the following command
electron-osx-flat 'app-store/Tok-mas-x64/Tok.app' --entitlements='build/entitlements.mas.plist' --identity='3rd Party Mac Developer Installer: My Company (XXXXX)' --provisioning-profile='embedded.provisionprofile' --verbose
I got the .pkg file, that I am able to install successfully but then I cannot find the app between my applications. If I try to open the .app file, the app crashes with this error: “Termination Reason: Namespace CODESIGNING, Code 0x1”
I also tried signing manually, running this script
In the terminal I got this:
/Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.app/Contents/Frameworks/Electron Framework.framework: replacing existing signature /Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.app/Contents/Frameworks/Tok Helper.app/: replacing existing signature /Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.app/Contents/Library/LoginItems/Tok Login Helper.app/: replacing existing signature /Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.app/Contents/MacOS/Tok: **code object is not signed at all** In subcomponent: /Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.app/Contents/Frameworks/Tok Helper NP.app /Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.app: ### code object is not signed at all In subcomponent: /Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.app/Contents/Frameworks/Tok Helper NP.app productbuild: Adding component at /Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.app productbuild: Signing product with identity "3rd Party Mac Developer Installer: My company (XXXX)" from keychain /Users/irisgaleano/Library/Keychains/login.keychain-db productbuild: Adding certificate "Apple Worldwide Developer Relations Certification Authority" productbuild: Adding certificate "Apple Root CA" productbuild: Wrote product to /Users/irisgaleano/Electron-projects/tok-electron/app-store/Tok-mas-x64/Tok.pkg productbuild: Supported OS versions: [10.9.0, )
The problems are similar. I got the .pkg file, that I am able to install successfully but then I cannot find the installed app. If I try to open the .app file, I got a blank electron window again.
These are my entitlements.
entitlements.mas.plist
`<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.developer.aps-environment</key> <string>development</string> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.application-groups</key> <string>my.bundle.id</string> <key>com.apple.security.files.downloads.read-write</key> <true/> <key>com.apple.security.files.user-selected.read-write</key> <true/> <key>com.apple.security.network.client</key> <true/> <key>com.apple.developer.team-identifier</key> <string>XXXX</string> <key>com.apple.security.cs.allow-unsigned-executable-memory</key> <true/> </dict> </plist>`child.plist
`<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> <key>com.apple.security.inherit</key> <true/> </dict> </plist>`loginhelper.plist
`<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>com.apple.security.app-sandbox</key> <true/> </dict> </plist>`These are the cert.
electron: 3.0.4 electron-builder: 12.2.0 electron-osx-sign: 0.4.15
I tried this recommendation [#200] and this [#188] with not success.
Anyone can help me please? Thanks.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:6 (1 by maintainers)
Top GitHub Comments
Same problem here
Got exactly same problem