electron: Electron broken on OS X in Apple Sandboxed apps (App Store)
š Not sure if this is related to the Chromium itself. Iāve been trying and successfully packed and signed my app, but still there are logs in console like:
12/19/15 9:45:14.000 PM kernel[0]: Sandbox: Electron Helper(15181) deny(1) mach-lookup org.chromium.Chromium.rohitfork.15175
12/19/15 9:45:14.000 PM kernel[0]: Sandbox: Electron Helper(15181) deny(1) mach-lookup org.chromium.Chromium.iosurfacemgr.15175
12/19/15 9:45:15.520 PM sandboxd[326]: ([15176]) Electron Helper(15176) deny mach-lookup org.chromium.Chromium.rohitfork.15175
12/19/15 9:45:15.574 PM sandboxd[326]: ([15176]) Electron Helper(15176) deny mach-lookup org.chromium.Chromium.iosurfacemgr.15175
12/19/15 9:45:15.926 PM sandboxd[326]: ([15177]) Electron Helper(15177) deny mach-lookup org.chromium.Chromium.rohitfork.15175
12/19/15 9:45:15.958 PM sandboxd[326]: ([15177]) Electron Helper(15177) deny mach-lookup org.chromium.Chromium.iosurfacemgr.15175
12/19/15 9:45:16.742 PM sandboxd[326]: ([15178]) Electron Helper(15178) deny mach-lookup org.chromium.Chromium.rohitfork.15175
12/19/15 9:45:16.773 PM sandboxd[326]: ([15178]) Electron Helper(15178) deny mach-lookup org.chromium.Chromium.iosurfacemgr.15175
12/19/15 9:45:16.946 PM sandboxd[326]: ([15180]) Electron Helper(15180) deny mach-lookup org.chromium.Chromium.rohitfork.15175
12/19/15 9:45:16.977 PM sandboxd[326]: ([15180]) Electron Helper(15180) deny mach-lookup org.chromium.Chromium.iosurfacemgr.15175
The following extract from my entitlements doesnāt seem work work. I guess that Wildcards may not be accepted; however, the * bits keep changing every time I execute the application.
<key>com.apple.security.temporary-exception.mach-lookup.global-name</key>
<array>
<string>org.chromium.Chromium.rohitfork.*</string>
<string>org.chromium.Chromium.iosurfacemgr.*</string>
</array>
May there be any fixes on this in future releases? P.S.: Iāve found that the sandboxed app runs much slower and has some issues (like jittering graphics, the best way I could describe it). Again, I guess it is related to the denials from sandboxing. Thanks!
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 109 (58 by maintainers)
For people watching this issue, you can just follow the latest guide to get Electron sandboxed for Mac App Store, there is no need to wait for next release.
The key change is adding an entry to entitlements:
@zcbenz Lemme try to get set up with building custom libchromiumcontent and Iāll have a go tomorrow
@sethlu My app also started freezing when sandboxed after updating Electron from v1.1.0 to 1.2.0. The problem went away after I upgraded electron-packager to the latest version and I added
com.apple.security.application-groupsandElectronTeamIDkeys as described in the updated MAS submission guide.FYI: I submitted an app (electron 0.37.3) with these changes and it got approved.
This is a super important bug for us at Slack, weāll probably have a look at this soon
@sethlu Remember, many node.js / web devs have no idea about PLists so, being Opinionated and just filling out everything for them from the package.json info might be A Better Thing (as long as people can opt-out and choose their own way of course) - I would assume the input Info.plist is junk / incorrectly configured and prioritize info in package.json as much as possible
It would be real neat if electron-osx-sign handled fixing up entitlements automatically /cc @sethlu
sad thing I need API introduced at
0.36.11and canāt just use old mas build. any workaround ideas?Just tested some of the recent releases of Electron:
okay, I found what kills app when it is signed http://electron.atom.io/docs/all/#appmakesingleinstancecallback
shouldQuit === truein this example from old official doc:@sethlu it looks like it is same as here: electron-userland/electron-osx-sign/issues/59 any update on that problem?
@sethlu as I said, my app after being signed canāt run and exit after launch, same things happen and on App Store reviews. and sandboxing is still rise questions from App Store, here is answer:
@tyv I suspect a lot of people are getting caught up here: https://github.com/electron-userland/electron-osx-sign/blob/master/index.js#L155, which seems to require them to half fill-out their PList file. electron-osx-sign should just have a
--masoption that does everything@sethlu - looks like one of the node modules thatās a required dependency is being ignored by electron-packager, the regex that used to work
--ignore=.+\.o$is now including anything that ends with o, rather than .o, which caused an uncaught javascript error (really need to look into how to handling those properly š ) . changing it up to--ignore=.+\\.o$fixed that, and it now works! šSo now I guess the question is, from here, what do I need to change up to be able to submit it to the app store? Iām guessing I donāt include the provisionprofile?
Thanks for all your help!
@jpittner The app should be launched correctly I think⦠May you try adding the following into your
main.js, or equivalent, script someplace after the windowās created, just to confirm some web page is shown?If the dev tools shows, the loaded page should be found somewhere in the panels. Otherwise we may have to think about some other resolutions to this issue.
@sethlu just a white screen, no spinning cursor. In fact can access the App menu (which just has Quit) and can quit.