glacambre / firenvim

Embed Neovim in Chrome, Firefox & others.
GNU General Public License v3.0
4.71k stars 146 forks source link

"Unexpected output. Run nvim --headless and ensure it prints nothing." #1587

Open aikooo7 opened 7 months ago

aikooo7 commented 7 months ago

What I tried to do

Troubleshooting guide.

What happened

Extension shows "Neovim died without answering", so does the debugging of the problem.

We also have #1458 which has the same system as me, nixos-wsl, so maybe he could help out here?

aikooo7 commented 7 months ago

Actually by settings nixos as my default wsl distro I now get a "better" error:

"Unexpected output. Run nvim --headless and ensure it prints nothing."

nvim --headless doesn't print nothing.

I also got this in the debugging console of the plugin:

"Uncaught (in promise) Error: Native application tried to send a message of 1581276785 bytes, which exceeds the limit of 1048576 bytes."

glacambre commented 7 months ago

nvim --headless doesn't print nothing.

What does it print? It's likely that the messages are caused by your config and you'll need to find a way to disable them.

aikooo7 commented 7 months ago

nvim --headless doesn't print nothing.

What does it print? It's likely that the messages are caused by your config and you'll need to find a way to disable them.

It doesn't print nothing, redirecting to a file, waiting and then opening the file shows that the file is empty

aikooo7 commented 7 months ago

nvim --headless doesn't print nothing.

What does it print? It's likely that the messages are caused by your config and you'll need to find a way to disable them.

Here is my config, note that I didn't yet upload my firenvim config to it and that I also disabled dashboard locally and it didn't change anything

glacambre commented 7 months ago

It doesn't print nothing, redirecting to a file, waiting and then opening the file shows that the file is empty

Ah, okay, so it does print nothing. The double negation confused me :)

So, just to confirm your system:

1) You're using windows 2) Firenvim is installed in a NixOS wsl environment 3) You are using Firefox from Windows, not WSL

The message:

"Uncaught (in promise) Error: Native application tried to send a message of 1581276785 bytes, which exceeds the limit of 1048576 bytes."

Indicates that the registry key specifying the location of the Firenvim extension manifest to the browser is correct, but that that the script pointed to by the extension manifest is printing a message that the browser cannot understand.

So let's try to understand what message Firenvim is printing. In order to do this, open the windows registry editor and look for the key named HKEY_CURRENT_USER\SOFTWARE\Mozilla\NativeMessagingHosts\firenvim. This key's value should be a path to a file.

Open this file in a text editor. It should contain a JSON object. This JSON object should have an attribute named path. The value of this attribute should be the path of a script.

Please upload the contents of the script here.