Skip to content
This repository was archived by the owner on Apr 1, 2020. It is now read-only.

Oni does not launch Neovim. #2396

Closed
jordan-arenstein opened this issue Jul 4, 2018 · 22 comments
Closed

Oni does not launch Neovim. #2396

jordan-arenstein opened this issue Jul 4, 2018 · 22 comments

Comments

@jordan-arenstein
Copy link
Contributor

Oni Version: 0.3.6
Neovim Version (Linux only):
Operating System: macOS Mojave Beta 2, and 3.

Issue: Oni cannot launch neovim instance on open. Instead, it shows a screen "Uh oh! Unable to launch Neovim... Neovim v0.2.1 is required to run Oni. This has persisted through clean installs of neovim 0.3.0, 0.2.1, and builds of Oni from Homebrew Cask and Github releases.

Oni 0.3.4 works fine.

Expected behavior: Oni launches and shows neovim interface.

Actual behavior: Oni shows error screen.

Steps to reproduce: Open Oni.

@jordan-arenstein
Copy link
Contributor Author

Looks like this is very similar to #2354, my bad for missing that. However, I am running macOS 10.14. Sorry if this counts as a duplicate.

@CrossR
Copy link
Member

CrossR commented Jul 4, 2018

I'm running the same OS as you and can confirm it looks to be the same as #2354. Downgrading to neovim 0.2.2 worked fine for me, but I'm less sure why 0.3.0 isn't working, nor the 0.3.1 nightly.

@jordan-arenstein
Copy link
Contributor Author

jordan-arenstein commented Jul 4, 2018

I just followed your advice in #2354 to set debug.neovimPath, and it works for me with 0.3.0 and 0.2.1, by setting it to my brew directory:

"debug.neovimPath": "/usr/local/Cellar/neovim/0.3.0/bin/nvim",

Alternating between 0.2.1 and 0.3.0, it seems fine with this line.

@jeffling
Copy link

jeffling commented Jul 5, 2018

@jordan-arenstein interesting, that didn't work for me. Just to double check, this was in the config.tsx right?

@CrossR
Copy link
Member

CrossR commented Jul 5, 2018

You'll want it in the config.js not config.tsx @jeffling, since the config.tsx needs to be compiled, which can't happen if Oni can't run!

Once you've added it to your config.js you should be able to launch Oni, at which point the config.tsx can be compiled when you save it.

@jeffling
Copy link

jeffling commented Jul 5, 2018

@CrossR Perfect. It's weird for me because I don't have a config.js, I suppose I'll just create it for now.

UPDATE - problem still persists after creating a config.js.

@alxdb
Copy link

alxdb commented Oct 3, 2018

I had this issue and the fix of adding "debug.neovimPath": "/usr/local/Cellar/neovim/0.3.1/bin/nvim" to config.js solved it. Also occurred under macOS Mojave.

@jwmann
Copy link

jwmann commented Oct 12, 2018

I also have this issue with the public version of Mojave 10.14 and "debug.neovimPath": "/usr/local/Cellar/neovim/0.3.1/bin/nvim" inside the config fixed it.

However, I do think this should be fixed so that we don't have to set this config.

@olalonde
Copy link

Where's that mysterious config.js file located? I could only find ~/.config/oni/config.tsx

@jordan-arenstein
Copy link
Contributor Author

@olalonde The config.tsx file is a typescript file, which compiles to the config.js file. Using either is fine. You can add the same line to either.

@olalonde
Copy link

@jordan-arenstein I added the line to config.tsx but still getting the same error when opening Oni.. also there isn't any .js files in that folder at least

@jordan-arenstein
Copy link
Contributor Author

Oh my bad! A reply further above sorts this out. Creating a default config.js with that line should work. I'll look around for you.

@olalonde
Copy link

Fixed by creating ~/.config/oni/config.js with following content:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.activate = function (oni) {
		console.log("config activated");
		// Input
		//
		// Add input bindings here:
		//
		oni.input.bind("<c-enter>", function () { return console.log("Control+Enter was pressed"); });
		//
		// Or remove the default bindings here by uncommenting the below line:
		//
		// oni.input.unbind("<c-p>")
};
exports.deactivate = function (oni) {
		console.log("config deactivated");
};
exports.configuration = {
		//add custom config here, such as
		"ui.colorscheme": "nord",
		//"oni.useDefaultConfig": true,
		//"oni.bookmarks": ["~/Documents"],
		//"oni.loadInitVim": false,
		//"editor.fontSize": "12px",
		//"editor.fontFamily": "Monaco",
		// UI customizations
		"ui.animations.enabled": true,
		"ui.fontSmoothing": "auto",
		// https://github.com/onivim/oni/issues/2396#issuecomment-426767185
		"debug.neovimPath": "/usr/local/Cellar/neovim/0.3.1/bin/nvim",
};

@jordan-arenstein
Copy link
Contributor Author

The core issue seems to be that the github releases of neovim from 0.3.0 (which are packaged with Oni) do not run at all on macOS 10.14. This has persisted through full system wipes. I have not tested previous versions.

@direvus
Copy link

direvus commented Oct 30, 2018

@jordan-arenstein could Oni fall back gracefully to the system nvim if the bundled nvim fails? If there is an nvim in the PATH, maybe just try running it and see what happens?

FWIW I was able to work around the issue just by putting "debug.neovimPath": "/usr/local/bin/nvim" into my config.js, which is a symlink to the brew install.

@mikepc
Copy link

mikepc commented Nov 16, 2018

I experienced this problem and added

"debug.neovimPath": "/usr/local/Cellar/neovim/0.3.0/bin/nvim",
to ~/.config/oni/config.tsx

This solved the issue for me

@bryphe
Copy link
Member

bryphe commented Dec 14, 2018

Thanks for the investigation @jordan-arenstein and workaround @olalonde !

bryphe added a commit that referenced this issue Dec 15, 2018
* Set 'LANG' environment variable on Mac if not set to workaround crash

* Fix lint
@goerz
Copy link

goerz commented Jan 5, 2019

I tried the workaround in #2396 (comment), which fixed the message initially. However, I'm the not able to open any file (nothing ever shows up in the right editor pane). When I hit cmd-Q, the app does not quit, but I'm again getting the "Uh oh! Unable to launch Neovim..." message in the editor pane.

This is Oni 0.3.6 on macOS Mojave 10.14.2 (18C54) and NVIM v0.3.2-dev installed through homebrew.

@bryphe
Copy link
Member

bryphe commented Jan 5, 2019

FYI - the 0.3.9 release has a fix for this: https://github.com/onivim/oni/releases/tag/v0.3.9

Recommend upgrading to that build (it was fixed in #2682 , which was included in 0.3.9)

@goerz
Copy link

goerz commented Jan 5, 2019

With 0.3.9, Oni now quits without an error, but I still can't open any files. Seems like #2706

@goerz
Copy link

goerz commented Jan 5, 2019

I did have an old NVIM v0.2.3-dev laying around in my homebrew Cellar, and that seems to work.

@badosu
Copy link
Collaborator

badosu commented Jan 17, 2019

Closing this in favor of #2706. Let us know if it's a different issue.

@badosu badosu closed this as completed Jan 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests