-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
App Crash after electron-builder 22.2.0 MAS build #4553
Comments
After adding "hardenedRuntime": false it opens without error. When I try to upload it to the app store I get this error... ERROR ITMS-90296: "App sandbox not enabled. The following executables must include the "com.apple.security.app-sandbox" ... |
Got it! package.json
entitlements.mac.plist
entitlements.mac.inherit.plist
Hope this helps someone out there! |
Was about to post the same question before I saw this. But sadly this didn't work for me either. It builds the app and I can launch it from the build/mac folder. But when I try to submit it to App Store connect using their Transporter app it fails saying Code Signing Invalid and Missing Required Icon even though the icon is there in the right place in the right format. |
I bet your really close. The icon is actually a collection of different sizes in one file. I had the same issue and got it worked out... |
Thanks for the tip on the icon. Per your link I fixed the icon issue. And I got the other errors fixed. Honestly I don't know what was the cause of the others. I just started the whole process over from scratch with new certificates and provisioning profiles and it worked after that. I am going to post an issue that the MAS submission process be documented. I scoured the web and couldn't find any up-to-date instructions on the whole process. Wasted lots of time on it. |
My electron app works fine before singing by the script provided here. However, after signing the app, the app can no longer access the network. Also, if I try to submit the app through Transporter I get this issue
Upon checking few comments and troubleshooting for last two days I can confirm that my plists are fine and all of them include
Also I tried, electron/osx-sign#192 (comment). My assumption is, after singing in the app, the pkg is losing its entitlements. Is there something I might be doing wrong? build script in package.json
entitlements CHILD_PLIST="build/entitlements.mac.inherit.plist"
PARENT_PLIST="build/entitlements.mac.plist"
LOGINHELPER_PLIST="entitlements.mas.loginhelper.plist"
Packages used:
|
thanks for posting your fixes @danieldoddjr and @steve981cr. Similar but different, we are struggling to find a fix to our electron build issue #4602 Do you have any ideas? And, we'd be willing to hire the right dev to help us get a fix if you know of one. Thanks. |
@kellerchch |
Thank you @steve981cr for replying with that link. I'll work with Wali who is my developer doing the work and we'll step through your instructions. :-) |
Great, let me know if that solves it for you. One thing I didn't include but is critical is you have to use Electron version 5.0.13 or 6.1.7 or your app will be rejected for use of private APIs. These two versions are patched to not use private APIs when building for the MAS. Electron version 7 does not have these patches. These are considered a temporary fix and the Electron team is working on a permanent solution. |
Release notes for Electron 8.0.2 include "Fixed Electron apps getting rejected to Mac App Store." electron/electron#22298 |
I followed the steps provided by @abhish3kk , no matter what I do... the app file after code sign crash. My package.json has these
I am using... Any one can help please ? |
Same problem here. I had my fingers crossed when trying the step by step signing solution for the mas/ folder from @danieldoddjr and @abhish3kk but I still get the error • electron-builder version=22.6.0 os=19.4.0
• loaded configuration file=package.json ("build" field)
• description is missed in the package.json appPackageFile=/Applications/MAMP/htdocs/webapp/app-electron/package.json
• packaging platform=mas arch=x64 electron=8.2.4 appOutDir=build/mas
• signing file=build/mas/superApp.app identityName=Developer ID Application: COMPANY_NAME (TEAM_ID) identityHash=XXXXXXXXXXXX04555B8B0FXXXXXXXXXX provisioningProfile=none
• signing file=build/mas/superApp.app identityName=3rd Party Mac Developer Application: COMPANY_NAME (TEAM_ID) identityHash=XXXXXXXXXXXX677A48XXXXXXXXXXXX provisioningProfile=xxxxxxxxxxxx.provisionprofile If I try to sign my app for local testing to the mac/ folder (with I'm using: My Certificates, Identifiers & Profiles are well installed and up to date (I revoked and redone the all process to be sure). Entitlements files are there too. "build": {
"appId": "xxx.xxxxxxxxxxxx.xxx",
"productName": "SuperApp",
"mac":{
"target":"mas",
"hardenedRuntime": false,
"gatekeeperAssess": false,
"type":"distribution",
"identity": "COMPANY_NAME (TEAM_ID)",
"category": "public.app-category.music-games",
"icon": "icons.icns",
"minimumSystemVersion":"10.9.0",
"electronLanguages":["en","fr","it","pt_BR","es","zh_TW","ja","de","tr","pl","ar","hi","ta","te","vi","id","ms","th","bn","nb","ko","ru","zh_CN"],
"extendInfo": {
"ITSAppUsesNonExemptEncryption": false,
"CFBundleVersion": "0.1.7"
}
},
"mas":{
"provisioningProfile": "xxxxxxxxxxxx.provisionprofile",
"entitlements": "build/entitlements.mac.plist",
"entitlementsInherit": "build/entitlements.mac.inherit.plist"
}
} (of course XXXXXX and COMPANY_NAME (TEAM_ID) are replaced in my code with correct values). Any ideas would be very very welcome! Thanks. |
I just tried to sign my app with the method explained on the Electron Github using a bash script. No error thrown during signing process (so I guess it is signed?) /Applications/test/build/mas/mySuperApp.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: replacing existing signature
/Applications/test/build/mas/mySuperApp.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib: replacing existing signature
/Applications/test/build/mas/mySuperApp.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libnode.dylib: No such file or directory
/Applications/test/build/mas/mySuperApp.app/Contents/Frameworks/Electron Framework.framework: replacing existing signature
/Applications/test/build/mas/mySuperApp.app/Contents/Frameworks/mySuperApp Helper.app/Contents/MacOS/mySuperApp Helper: replacing existing signature
/Applications/test/build/mas/mySuperApp.app/Contents/Frameworks/mySuperApp Helper.app/: replacing existing signature
/Applications/test/build/mas/mySuperApp.app/Contents/Library/LoginItems/mySuperApp Login Helper.app/Contents/MacOS/mySuperApp Login Helper: replacing existing signature
/Applications/test/build/mas/mySuperApp.app/Contents/Library/LoginItems/mySuperApp Login Helper.app/: replacing existing signature
/Applications/test/build/mas/mySuperApp.app/Contents/MacOS/mySuperApp: replacing existing signature
/Applications/test/build/mas/mySuperApp.app: replacing existing signature
productbuild: Adding component at /Applications/test/build/mas/mySuperApp.app
productbuild: Signing product with identity "3rd Party Mac Developer Installer: COMPANY_NAME (TEAM_ID)" from keychain /Users/myName/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/myName/Desktop/mySuperApp.pkg
productbuild: Supported OS versions: [10.9.0, ) I get my app.pkg and apparently it is signed. If I try to install this PKG on my Mac, installation succeed, but impossible to find the app (no ideas in what folder it goes)... So I tried on a second Mac -> open the PKG -> installation succeed -> I can find the app in the Applications folder -> open it -> app crashes -> crashlog: Any help/advises would be (hugely) appreciate. Thanks! |
I spent 4 days trying to sign my Electron app (without Notarization process) for the MAS (Mac App Store) distribution with electron-builder... Very important: my test succeed ONLY using these versions:
If you don't use these versions, I can't promise anything... Here you can find Electron version history list and Electron-builder version history list (if you still want to try different versions combination). Here is the step by step solution who worked for me, I really hope it could help some of you to not tear your hair off like I did. Restart process from a clean baseTo be sure that app's crashes I got after signing process wasn't due to my app code or because of my Certificats and Provisioning profiles, I restart all the process from scratch. Certificats, identifiers and Provisioning profileThis step has always been complicated and blurry for me. Never sure about what I am doing clearly during this process... So I removed every Certificats, Identifiers and Provisioning profiles from my App Store Connect interface, removed local certificats from my Keychain Access, and re-did it again. I followed the below steps using the App Store Connect interface: • Generate and install new Certificates Electron quick startTo be sure my own app code wasn't the source of my problems, I restarted from a clean project. I clone the official electron-quick-start app. I install it in my MAMP root folder from the Terminal: # Go to the folder you want
cd /Applications/MAMP/
# Clone this repository
git clone https://github.com/electron/electron-quick-start
# Go into the repository
cd electron-quick-start
# Install dependencies
npm install The electron-quick-start app use by default the latest version of Electron (which is 8.2.5 today). So I have to downgrade it:
Then I install the right version of
Now my {
"name": "electron-quick-start",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
"start": "electron ."
},
"devDependencies": {
"electron": "^5.0.13",
"electron-builder": "^21.2.0"
}
}
Adding files in the build folderNow I create a • embedded.provisionprofile is the Provisioning profile generated and downloaded from the App Store Connect which makes reference to my Identifier • entitlements.mas.plist contains: <?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.application-groups</key>
<array>
<string>TEAM_ID.com.myCompany.superApp</string>
</array>
</dict>
</plist> -> You have to replace • entitlements.mas.inherit.plist contains: <?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> • entitlements.mas.loginhelper.plist contains: <?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> • resignAndPackage.sh is a bash script needed to re-sign the #!/bin/bash
printf "......................\nresignAndPackage start\n\n"
# Name of your app.
APP="SuperApp"
# Your Certificate name.
CERT="COMPANY_NAME (TEAM_ID)"
# The path of your app to sign.
APP_PATH="/Applications/MAMP/electron-quick-start/dist/mas/$APP.app"
# The path to the location you want to put the signed package.
RESULT_PATH="/Applications/MAMP/electron-quick-start/dist/mas/$APP-mac_store.pkg"
# The name of certificates you requested.
APP_KEY="3rd Party Mac Developer Application: $CERT"
INSTALLER_KEY="3rd Party Mac Developer Installer: $CERT"
# The path of your plist files.
PARENT_PLIST="build/entitlements.mas.plist"
CHILD_PLIST="build/entitlements.mas.inherit.plist"
LOGINHELPER_PLIST="build/entitlements.mas.loginhelper.plist"
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Electron Framework"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Libraries/libffmpeg.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/Contents/MacOS/$APP Login Helper"
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/MacOS/$APP"
codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
printf "\nresignAndPackage end\n......................\n" -> Replace Edit the package.jsonNow I have to edit my {
"name": "electron-quick-start",
"version": "1.0.0",
"description": "A minimal Electron application",
"main": "main.js",
"scripts": {
"start": "electron .",
"build-mas": "electron-builder && bash build/resignAndPackage.sh"
},
"devDependencies": {
"electron": "^5.0.13",
"electron-builder": "^21.2.0"
},
"build": {
"productName": "SuperApp",
"appId": "com.myCompany.superApp",
"mac":{
"target":["mas"]
},
"mas":{
"provisioningProfile": "build/embedded.provisionprofile",
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist"
}
}
} Build + Sign + Re-SignFrom the Terminal you can now run (and cross your fingers :) npm run build-mas Your Terminal should return this: > [email protected] build-mas /Applications/MAMP/electron-quick-start
> electron-builder && bash build/resignAndPackage.sh
• electron-builder version=21.2.0 os=19.4.0
• loaded configuration file=package.json ("build" field)
• author is missed in the package.json appPackageFile=/Applications/MAMP/electron-quick-start/package.json
• writing effective config file=dist/builder-effective-config.yaml
• packaging platform=mas arch=x64 electron=5.0.13 appOutDir=dist/mas
• default Electron icon is used reason=application icon is not set
• signing file=dist/mas/SuperApp.app identityName=Developer ID Application: COMPANY_NAME (TEAM_ID) identityHash=XXXXXXXXXXXXXXXXXXXX provisioningProfile=none
• signing file=dist/mas/SuperApp.app identityName=3rd Party Mac Developer Application: COMPANY_NAME (TEAM_ID) identityHash=XXXXXXXXXXXXXXXXXXXX provisioningProfile=build/embedded.provisionprofile
......................
resignAndPackage start
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Electron Framework: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/Frameworks/Electron Framework.framework/Libraries/libffmpeg.dylib: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/Frameworks/Electron Framework.framework: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/Frameworks/SuperApp Helper.app/Contents/MacOS/SuperApp Helper: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/Frameworks/SuperApp Helper.app/: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/Library/LoginItems/SuperApp Login Helper.app/Contents/MacOS/SuperApp Login Helper: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/Library/LoginItems/SuperApp Login Helper.app/: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app/Contents/MacOS/SuperApp: replacing existing signature
/Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app: replacing existing signature
productbuild: Adding component at /Applications/MAMP/electron-quick-start/dist/mas/SuperApp.app
productbuild: Signing product with identity "3rd Party Mac Developer Installer: COMPANY_NAME (TEAM_ID)" from keychain /Users/YOU/Library/Keychains/login.keychain-db
productbuild: Adding certificate "Apple Worldwide Developer Relations Certification Authority"
productbuild: Adding certificate "Apple Root CA"
productbuild: Wrote product to /Applications/MAMP/electron-quick-start/dist/mas/SuperApp-mac_store.pkg
productbuild: Supported OS versions: [10.10.0, )
resignAndPackage end
...................... Asking electron-builder to build and sign your app without specifying an output folder for builds will create a new Hope this can helps! |
Nope, same issue, it says invalid signature. |
Sorry for you. Are you sure about the Certificats, identifiers and Provisioning profile process? Did you double check in your Keychain Access that your Certificats are valid and up to date? From which macOS version are you trying? |
This work for me, with the latest electron-builder version(22.6.1), my os x version is 10.15.4 |
@chenjuneking Could you show us your electron-builder's configuration and entitlements file? I tested in development using dev-provisioning-profile and failed again, with electron-builder version 22.6.1. |
package.json {
"name": "myapp",
// ...
"build": {
"productName": "myapp",
"copyright": "xxx",
"directories": {
"buildResources": "./"
},
"files": [
"!**/bin",
"!**/build",
"!**/*.sh"
],
"mac": {
"icon": "build/icon.icns",
"target": [
"mas"
],
"provisioningProfile": "build/myapp.provisionprofile"
},
"appId": "my.app",
"mas": {
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist"
}
}
} 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.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>xxx.com.myapp</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
</dict>
</plist> entitlements.mas.inherit.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> entitlements.mas.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> |
@chenjuneking Thanks a lot. Have you used I haven't test |
@vifird I didnot add
As you see, I didnot add any |
@chenjuneking Yeah, it' right. So you build your |
@vifird It's under review, not yet approved. |
Hard to say, let's waiting for Apple's reply. |
Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward? This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
The app quits on launch (no crash logs produced) on MAS build (development or distribution). "electron": "13.2.1", electron-builder.json "mac": {
...,
"type": "development",
"provisioningProfile": "build/GisMatrixApp_Development.provisionprofile",
...
},
"mas": {
...,
"type": "development",
"provisioningProfile": "build/GisMatrixApp_Development.provisionprofile",
"hardenedRuntime": false,
"gatekeeperAssess": false,
...
} |
@bojanbizjak same, I've been digging through so many github issues to try and understand the underlying cause. Did you ever resolve the issue? |
@hisnameisjimmy Works with electron-builder v22.11.5. // MAS-DEV
{
"appId": "com.gismatrix.app",
"productName": "Gismatrix",
"directories": {
"output": "out",
"buildResources": "build"
},
"files": [
"dist"
],
"mac": {
"type": "development",
"icon": "build/GM_1024x1024px.png",
"category": "public.app-category.productivity",
"extendInfo": {
"ITSAppUsesNonExemptEncryption": "NO"
},
"asarUnpack": [
"**/*.node"
]
},
"masDev": {
"type": "development",
"provisioningProfile": "build/GisMatrixApp_Development.provisionprofile",
"hardenedRuntime": false,
"gatekeeperAssess": false,
"category": "public.app-category.utilities",
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist"
}
}
// MAS
{
"appId": "com.gismatrix.app",
"productName": "Gismatrix",
"directories": {
"output": "out",
"buildResources": "build"
},
"files": [
"dist"
],
"mac": {
"type": "distribution",
"icon": "build/GM_1024x1024px.png",
"artifactName": "${productName}-${version}-${os}.${ext}",
"category": "public.app-category.productivity",
"extendInfo": {
"ITSAppUsesNonExemptEncryption": "NO"
},
"asarUnpack": [
"**/*.node"
]
},
"mas": {
"type": "distribution",
"provisioningProfile": "build/GisMatrixApp_AppStore.provisionprofile",
"hardenedRuntime": false,
"gatekeeperAssess": false,
"category": "public.app-category.utilities",
"entitlements": "build/entitlements.mas.plist",
"entitlementsInherit": "build/entitlements.mas.inherit.plist"
}
} |
I'm using electron-builder 23.0.8, and haven't been able to build something for Testflight ( When I look at the console, I see messages around unsatisfied entitlements and invalid signatures, but I'm not sure how to resolve them, as it looks like they're correct at the moment. Some messages from console:
I think next I'm going to regenerate all of my certificates and provisioning profiles and see if that does anything. |
@hisnameisjimmy Also having similar issues. Will update if I can find a workaround. Please post any additional findings here if you're able! |
I took a mental break as it's a side project and it was driving me crazy. Will report back in a couple weeks when I build the motivation to try again. |
@steve981cr Thanks for putting together this guide. It has helped, but are you able to deploy to TestFlight? I can get builds up to the App Store but they are flagged "Not available for testing" with no other information available. I reached out to Apple support for more info and so far (3 days) no response as to why it's not letting me deploy via TestFlight. |
@spartygw This might help you: #6856 (comment) |
@spartygw Have you figured it out how to enable it for TestFlight testing? My app was able to uploaded to app store connect via Transporter without errors. but the build is saying "Not available for testing" as yours. I got rejected by reviewer twice due to app crash when open. |
@ShongSu Sorry to say it but I never resolved the issue and spent way too much time on it. My solution is to drop electron. |
Dropping electron sounds like the only solution, really. I finished building the app in 1 month, and it's been more than a month now trying to figure out how to build it for MAS. Nothing seems to work. |
哈哈哈 |
@Faksprod thank you for the script, even though this whole process and debugging experience has been awful. For me to get a successful upload (whether it runs right remains to be seen), some additional codesigning was necessary as I suspect they've been added subsequently. I will paste the whole script for whatever other poor souls are out there trying to get this to work: #!/bin/bash
printf "......................\nresignAndPackage start\n\n"
# Name of your app.
APP="Your Apps Name"
# Your Certificate name.
CERT="Your Name (Y0UR_T3AM_1D)"
# The path of your app to sign.
APP_PATH="./release/build/mas/$APP.app"
# The path to the location you want to put the signed package.
RESULT_PATH="./release/build/mas/$APP-mac_store.pkg"
# The name of certificates you requested.
APP_KEY="3rd Party Mac Developer Application: $CERT"
INSTALLER_KEY="3rd Party Mac Developer Installer: $CERT"
# The path of your plist files.
PARENT_PLIST="assets/entitlements.mas.plist"
CHILD_PLIST="assets/entitlements.mas.inherit.plist"
LOGINHELPER_PLIST="assets/entitlements.mas.loginhelper.plist"
FRAMEWORKS_PATH="$APP_PATH/Contents/Frameworks"
ELECTRON_FRAMEWORK_RESOURCES_PATH="$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Resources"
RESOURCES_PATH="$APP_PATH/Contents/Resources"
PROVISIONING_PROFILE_PATH="$APP_PATH/Contents/embedded.provisionprofile"
# added begin
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (GPU).app/Contents/MacOS/$APP Helper (GPU)"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Renderer).app/Contents/MacOS/$APP Helper (Renderer)"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper (Plugin).app/Contents/MacOS/$APP Helper (Plugin)"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libEGL.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libGLESv2.dylib"
find "$ELECTRON_FRAMEWORK_RESOURCES_PATH" -type f -exec codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" {} \;
find "$RESOURCES_PATH" -type f -exec codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" {} \;
codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$PROVISIONING_PROFILE_PATH"
# added end
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Versions/A/Libraries/libffmpeg.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework/Libraries/libffmpeg.dylib"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/Electron Framework.framework"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/Contents/MacOS/$APP Helper"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$FRAMEWORKS_PATH/$APP Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/Contents/MacOS/$APP Login Helper"
codesign -s "$APP_KEY" -f --entitlements "$LOGINHELPER_PLIST" "$APP_PATH/Contents/Library/LoginItems/$APP Login Helper.app/"
codesign -s "$APP_KEY" -f --entitlements "$CHILD_PLIST" "$APP_PATH/Contents/MacOS/$APP"
codesign -s "$APP_KEY" -f --entitlements "$PARENT_PLIST" "$APP_PATH"
productbuild --component "$APP_PATH" /Applications --sign "$INSTALLER_KEY" "$RESULT_PATH"
printf "\nresignAndPackage end\n......................\n" Edit: resources must be signed AND --deep is depracated, the following script resulted in a successful submission for me |
electron-builder 22.2.0
MAS
I am trying to build for Mac App Store. All other builds work except MAS. It looks like all went well with signing but when I open the app I get a immediate crash. Here is the report...
Exception Type: EXC_BAD_ACCESS (Code Signature Invalid)
Exception Codes: 0x0000000000000032, 0x00000e4470682040
Exception Note: EXC_CORPSE_NOTIFY
Termination Reason: Namespace CODESIGNING, Code 0x2
What can be done to resolve this issue?
The text was updated successfully, but these errors were encountered: