question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crash once sandbox set to true, once set false App is not crashing but Apple rejects build because of sandbox false.

See original GitHub issue
  • 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"
    },

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:48 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
devon2018commented, Dec 21, 2021

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-sandbox entitlement to true, it then crases the app with not much detail on startup.

2reactions
stale[bot]commented, Sep 6, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Sandbox activated macOS application crashes ...
It crashes in a couple of sec. with following console error after execution, Although it works fine without sandbox activation :
Read more >
Sandboxed Helper Tool Crashing in `libsystem_secinit`
A while back I created a test project that shows how to embed a helper tool within a sandboxed app. I recently had...
Read more >
App Sandbox | Apple Developer Forums
This works in sandbox. Reason for rejection: "Specifically, your app requires to grant accessibility access, but once we opened the accessibility settings, ...
Read more >
App Sandbox | Apple Developer Forums
I have build a python app by pyinstaller for Mac OS. The app run correctly and I can sign and send to App...
Read more >
App Sandbox | Apple Developer Forums
Like this: <key>com.apple.security.app-sandbox</key> <true/> After sandboxing has been ... We have tried, (for testing), to set the sandbox exception ...
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