rogual / neovim-dot-app

Mac OS X GUI for Neovim
1.13k stars 62 forks source link

can't launch from the Dock or Spotlight, nor with gnvim #289

Closed mattsawyer77 closed 7 years ago

mattsawyer77 commented 8 years ago

I'm only able to launch the app from the terminal using open -a /Applications/Neovim.app/Contents/MacOS/Neovim

Attempting to launch via Spotlight or the Dock results in a dialog stating:

Neovim cannot be opened because of a problem.

Check with the developer to make sure Neovim works with this version of OS X. You may need to reinstall the application. Be sure to install any available updates for the application and OS X.

gnvim results in the same dialog, and also this in the terminal:

LSOpenURLsWithRole() failed for the application /Users/sawyer/src/neovim-dot-app/build/Neovim.app with error -10810.

I saw this error message in https://github.com/rogual/neovim-dot-app/issues/239 but I was unsure of the resolution. I've reinstalled neovim (with --HEAD) a few times, to no avail.

I'm running OS X 10.11.6, and my shell is zsh. nvim --version:

NVIM v0.1.5-564-g6cee9d1 Build type: Dev Compilation: /usr/local/Library/ENV/4.3/clang -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -O2 -g -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -I/tmp/neovim-20160706-97103-abyaib/build/config -I/tmp/neovim-20160706-97103-abyaib/src -I/tmp/neovim-20160706-97103-abyaib/deps-build/usr/include -I/tmp/neovim-20160706-97103-abyaib/deps-build/usr/include -I/tmp/neovim-20160706-97103-abyaib/deps-build/usr/include -I/tmp/neovim-20160706-97103-abyaib/deps-build/usr/include -I/tmp/neovim-20160706-97103-abyaib/deps-build/usr/include -I/tmp/neovim-20160706-97103-abyaib/deps-build/usr/include -I/usr/local/opt/gettext/include -I/usr/include -I/usr/include -I/tmp/neovim-20160706-97103-abyaib/build/src/nvim/auto -I/tmp/neovim-20160706-97103-abyaib/build/include Compiled by sawyer@mMBP.local

Optional features included (+) or not (-): +acl +iconv +jemalloc +tui For differences from Vim, see :help vim-differences

system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/local/Cellar/neovim/HEAD/share/nvim"

mattsawyer77 commented 8 years ago

FWIW: to my surprise, I realized I can open Neovim.app from the Finder by ctrl-clicking a file, then doing Open With, and then selecting Neovim.app. But just trying to open Neovim.app on its own thru Spotlight or the aforementioned methods always fails.

andreiamatuni commented 7 years ago

having the same issue. any fix in sight?

bambu commented 7 years ago

In this case it seems that gnvim (and possibly even the dock / spotlight) is trying to open Neovim at /Users/sawyer/src/neovim-dot-app/build/Neovim.app and not /usr/local/opt/neovim-dot-app/Neovim.app where it would be installed by homebrew. You can try resetting launch services database and trying again.

cd /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/
./lsregister -kill -r -domain local -domain system -domain user  

Another thing that was noted in #205 is that the spotlight may not display the Neovim.app if you do a brew linkapps. To resolve this you would need to create an alias or copy over the /usr/local/opt/neovim-dot-app/Neovim.app directory to /Applications/

Hope this helps!

mattsawyer77 commented 7 years ago

Thanks, this fixed my issue. At one point I had tried to build neovim-dot-app myself instead of using homebrew. I removed the other instance, reset the services cache, then I hit issue #205 at which point I just did cp -a /usr/local/opt/neovim-dot-app/Neovim.app /Applications. Now Spotlight and gnvim are launching as expected.