electron-builder: App crash once sandbox set to true, once set false App is not crashing but Apple rejects build because of sandbox false.
-
electron-builder: ^22.6.1:
-
electron: ^8.2.5:
- Target: mas:
I am really helpless, once i set <key>com.apple.security.app-sandbox</key><true/> to true the app is crashing on load and once i submitted to Apple store they rejected with reason, app is crashing on load.
But once i set <key>com.apple.security.app-sandbox</key><false/> to false the app is not crashing but Apple rejects build with this error.
ITMS-90296: App sandbox not enabled - The following executables must include the "com.apple.security.app-sandbox" entitlement with a Boolean value of true in the entitlements property list:
I am just waiting to some electron HERO to rescue from this issue.
Here are details of plist files.
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>GROUPID_AND_PACKAGE_ID</string>
</array>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.security.network.server</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</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>
package.json
"mac": {
"category": "public.app-category.productivity",
"target": "mas",
"provisioningProfile": "dist/provisionprofile",
"electronLanguages": [
"en"
],
},
"mas": {
"entitlements": "dist/entitlements.mas.plist",
"entitlementsInherit": "dist/entitlements.mas.inherit.plist"
},
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 48 (1 by maintainers)
I’m running into a similar issue, I am able to build and run mas-dev and mas locally all works fine, until i set the
com.apple.security.app-sandboxentitlement to true, it then crases the app with not much detail on startup.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.
ah, I missed that you successfully submitted app to the app store, I thought you’re receiving error while trying to upload app with Transporter. If you passed Transporter uploading, your signatures are fine.
Most likely you problem is that you’re using
app.requestSingleInstanceLock()in your app.It’s not working for MAS builds. Please check this issue - https://github.com/electron/electron/issues/15958
You can do on this way - https://github.com/ubergrape/grape-electron/blob/master/src/index.js#L77
Up
@abettadapur please follow these steps https://github.com/electron-userland/electron-builder/issues/4553#issuecomment-623451338 and sign “hello world” application. In this way, we will determine where is a problem in code signing or with app code. You can use electron 8.2.5 and electron-builder 22.6.1, simply ignore steps about downgrading to electron@5 and electron-builder@21.2.0. If your signatures are correct you’ll see app. Don’t forget to build with
mas-devand sethardenedRuntimeandgatekeeperAssesstofalse. Actually you can try to set these values for your app and try to sign with them because I don’t those values in your build config.