Oni: Oni does not launch Neovim.

Created on 4 Jul 2018  路  22Comments  路  Source: onivim/oni

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.

Most helpful comment

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",
};

All 22 comments

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.

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.

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.

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

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.

@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.

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.

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.

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

@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.

@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

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.

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",
};

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.

@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.

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

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

I tried the workaround in https://github.com/onivim/oni/issues/2396#issuecomment-430533798, 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.

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)

With 0.3.9, Oni now quits without an error, but I still can't open any files. Seems like https://github.com/onivim/oni/issues/2706

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bryphe picture bryphe  路  3Comments

bfulop picture bfulop  路  3Comments

badosu picture badosu  路  3Comments

timeyyy picture timeyyy  路  3Comments

IvRRimum picture IvRRimum  路  3Comments