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

Black screen #890

Closed
dimas-cyriaco opened this issue Nov 8, 2017 · 12 comments
Closed

Black screen #890

dimas-cyriaco opened this issue Nov 8, 2017 · 12 comments

Comments

@dimas-cyriaco
Copy link

dimas-cyriaco commented Nov 8, 2017

I'm trying Oni, but I only get a black screen.

The editor seems to work, but it don't show anything on the UI. If I type :q CR blindly it exits and all. I tried opening both a file and a folder, and it shows nothing on the UI.

If I enter insert mode and start typing it shows an weird scrollbar.

oni-black-screen

I'm on Kubuntu 17.04, and I use nvim normally everyday. Electron apps usually work fine in this computer.

@bryphe
Copy link
Member

bryphe commented Nov 8, 2017

Hi @dimascyriaco ,

Thanks for trying out Oni! Sorry you're hitting this issue. It looks like some sort of rendering problem (unfortunately I haven't tested on Kubuntu).

Couple things to try:

  1. Does pressing Control+Shift+P bring up command palette? If so, can you open the dev tools and check if there any errors?

We also send an option to electron to force hardware rendering - we set this option here:

blinkFeatures: "ResizeObserver,Accelerated2dCanvas,Canvas2dFixedRenderingMode",

I wonder if disabling the Accelerated2dCanvas fixes the issue? If you're up for building from source, that might be worth a shot

@dimas-cyriaco
Copy link
Author

Ctrl+Shift+P don't do anything. But there is some erros in the console:

/home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:26 Starting Neovim - process: 2030
/home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:1 NeovimInstance: Neovim started
/home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44 Neovim version reported as 0.1.7
/home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44 Uncaught (in promise) TypeError: Cannot read property 'parentElement' of undefined
    at _neovimInstance.on (file:///home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44:33392)
    at emitOne (events.js:115:13)
    at _.emit (events.js:210:7)
    at _attachUI.then (file:///home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44:54835)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
/home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44 Uncaught (in promise) TypeError: Cannot read property 'parentElement' of undefined
    at _neovimInstance.on (file:///home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44:33392)
    at emitOne (events.js:115:13)
    at _.emit (events.js:210:7)
    at _attachUI.then (file:///home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44:54835)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
/home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44 Uncaught (in promise) TypeError: Cannot read property 'parentElement' of undefined
    at _neovimInstance.on (file:///home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44:33392)
    at emitOne (events.js:115:13)
    at _.emit (events.js:210:7)
    at _attachUI.then (file:///home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44:54835)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)
/home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:1 No supported language
t.error @ /home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:1
index.html:1 Uncaught (in promise) TypeError: Cannot read property 'parentElement' of undefined
    at _neovimInstance.on (bundle.js:44)
    at emitOne (events.js:115)
    at _.emit (events.js:210)
    at _attachUI.then (bundle.js:44)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188)

I'll try to change the options and build it.

@dimas-cyriaco
Copy link
Author

dimas-cyriaco commented Nov 8, 2017

I've build from source (with, and without changing Accelerated2dCanvas) and in both cases it appears to render everything except the text:

oni-black-screen

@bryphe
Copy link
Member

bryphe commented Nov 8, 2017

Wow, that's pretty crazy looking! Thanks for trying that out.

I see one interesting thing in the logs:

/home/dimas/Downloads/Oni-0.2.14-linux/resources/app/lib/browser/bundle.js:44 Neovim version reported as 0.1.7

It seems the version is reported as 0.1.7 - it may be worth trying a newer version of Neovim - have you upgraded to 0.2.1?

@dimas-cyriaco
Copy link
Author

That was it. I've updated neovim and it's working fine now!

Thanks!

@bryphe
Copy link
Member

bryphe commented Nov 8, 2017

Excellent! I'm planning on bundling Neovim with Oni, so that sort of thing won't happen in the future. Otherwise, it'd make sense to invest in a better error message / experience than a black screen... (#875)

Thanks for troubleshooting with me - I'll close this out now

@bryphe bryphe closed this as completed Nov 8, 2017
@badosu
Copy link
Collaborator

badosu commented Nov 8, 2017

@bryphe Can you confirm that linux distros won't have to keep track of neovim versions of packaging?

If true, I'll remove dependencies on neovim for the next release (for AUR)

@keforbes
Copy link
Collaborator

keforbes commented Nov 8, 2017

Personally, I think we should keep neovim as a dependency in AUR. It seems more to be the "linux way" to explicitly declare your dependencies rather than bundling them in. It makes sense to bundle binaries in Windows and Mac, just not Linux. That's my opinion anyway.

@badosu
Copy link
Collaborator

badosu commented Nov 9, 2017

@keforbes I agree, however that requires having to add a check not to include and not to use the bundled neovim binary on linux systems.

If neovim for ubuntu is not working for you, then I am not sure it will work for most people, ideally the package from the distro should be working and using a recent stable version.

If neovim keeps being bundled for linux, keeping the dependency will make no difference as it will use the bundled one anyway.

The distinction to be made is:

  • Assume that for linux the user and distro should be providing a working and up-to-date neovim version (not very difficult but adds friction)
  • Use the bundled neovim version and don't care about redundant neovim versions (bundled and packaged) on the user system.

Not sure what @bryphe's plan is for this. I prefer (1) as most linux users that care about neovim should be power users that understand that if there's no package for their distro they'll have to pay attention to this.

Ideally we should provide not only AUR packages, but .deb, .rpm, etc. But that's a lot of work for one person to do, and I am not sure if the automated builds we have are capable of this. Ubuntu/Debian/Mint/... users that care about this could take this work and maintain the packages, that's how it usually works and should happen with Oni as it gains popularity over time (before it is taken to the official repositories)

@keforbes
Copy link
Collaborator

keforbes commented Nov 9, 2017

@badosu, I think we're in agreement. I'd rather leave the neovim packaging and installing to the neovim folks and we would just declare it as a dependency. Even .deb and .rpm can declare dependencies and all package managers today can automatically download and install those dependencies before installing a package.

With that said, I don't think Windows and Mac have good dependency resolution managers so it still makes sense to bundle the binaries on those platforms. But I'm just repeating myself and I think we're agreeing with each other. 😄

@badosu
Copy link
Collaborator

badosu commented Nov 9, 2017

Even if we agree on this issue, currently the next version will bundle neovim, so that's why I need @bryphe's confirmation on his plan for this.

@bryphe
Copy link
Member

bryphe commented Nov 9, 2017

Sorry I'm late to the party here - thanks for the discussion @keforbes and @badosu

I'll defer to your judgement since you both know Linux better than I do 😄 The biggest pain point for me are issues like these where nvim isn't installed - but we can handle that by letting the user know they need nvim running. We had a check for that at one point, but it seems it is not working anymore.

The current version actually doesn't download the Linux binary, so I think we're okay there @badosu . The latest oni-neovim-binaries is a no-op on Linux, and the logic for starting Neovim on Linux still assumes its in the path:

const nvimLinuxPath = "nvim"
)

Given both your points, here are the two next steps in my mind for Linux:

Thanks again for your thoughts!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants