Skip to content
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

LSOpenURLsWithRole error after changing the executable name (Gatekeeper issue) #323

Closed
gabriel opened this issue Apr 11, 2016 · 8 comments
Closed
Labels
build-target:mac 🍎 Bundling an Electron app specifically for macOS

Comments

@gabriel
Copy link

gabriel commented Apr 11, 2016

Changing the executable name in an app bundle can cause a Gatekeeper failure. This change was made
aaeee76 which changes the executable name (in Contents/MacOS) from Electron to the app name.

This is due to a bug in Gatekeeper it seems: http://www.openradar.me/23614087

This happens when upgrading from <= 0.37.2 to 0.37.3 on OS X.

@malept
Copy link
Member

malept commented Apr 11, 2016

I don't know how this should be resolved. There were a fair number of users who wanted #195 resolved, so I'm not currently inclined to revert it.

@malept malept added the build-target:mac 🍎 Bundling an Electron app specifically for macOS label Apr 11, 2016
@gabriel
Copy link
Author

gabriel commented Apr 11, 2016

Yeah it's a good fix to have, and I don't think it's worth reverting either. It's kind of a gnarly thing to diagnose so wanted to people to be aware of the potential issue.

@erkyrath
Copy link

I ran into this, and found that the error went away if I dragged the old version of the app to the trash (via the Finder) before installing the new version. (I don't know if this works for everybody.)

@malept
Copy link
Member

malept commented Apr 11, 2016

OK, since there's nothing to do on this end, I'm going to close the issue (and hope that users who have this issue can search for it).

@gabriel
Copy link
Author

gabriel commented Apr 12, 2016

So, we also figured out adding a symlink in Contents/MacOS is a possible workaround too.. We didn't want to break all our users on upgrade so we have for example:

/Applications/AppName.app/Contents/MacOS/Electron symlinked to /Applications/AppName.app/Contents/MacOS/AppName and it seems to be ok...

I don't know if it's worth patching the packager here to do the same, but it might prevent some headaches for people in the future.

@malept
Copy link
Member

malept commented Apr 12, 2016

If anyone wants to implement this, keep in mind that you likely can't create symlinks on Windows.

gabriel added a commit to keybase/client that referenced this issue Apr 12, 2016
gabriel added a commit to keybase/client that referenced this issue Apr 12, 2016
@gabriel
Copy link
Author

gabriel commented Apr 13, 2016

Yeah this would be a mac only thing

@savanain
Copy link

savanain commented Apr 26, 2016

sudo launchctl stop com.apple.security.syspolicy && sudo launchctl start com.apple.security.syspolicy did help for me after the name change.

imlucas added a commit to mongodb-js/hadron-build that referenced this issue Sep 21, 2016
* INT-1836 👔 Code cleanup and ⬆️ [email protected]

* INT-1836 🍎 Symlink `Electron` to `${productName}`

Or else OS X gatekeeper will refuse to install new versions if the app
is already installed.

@see
electron/packager#323 (comment)
omment-209026064

* INT-1836 Add initial `release` command functional tests

* 💚 Skip release tests on travis for now

* 👕

* 💚

* 💚

* ⚡ node@6

* 💚

* 💚
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build-target:mac 🍎 Bundling an Electron app specifically for macOS
Projects
None yet
Development

No branches or pull requests

4 participants