Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] remote-nvim.nvim - Fails to connect to workspace, bad interpreter #2669

Open
0x006E opened this issue Dec 15, 2024 · 2 comments
Open
Labels
bug Something isn't working

Comments

@0x006E
Copy link

0x006E commented Dec 15, 2024

Field Description
Plugin remote-nvim
Nixpkgs unstable
Home Manager unstable
  • [ x ] I have read the FAQ and my bug is not listed there.

Description

remote-nvim fails to download neovim on the target devpod container. The script being being run is using patched to use nix bash which is not available on the container.

Creating devcontainer...
Inspecting image ghcr.io/cachix/devenv:latest
Image ghcr.io/cachix/devenv:latest not found
Pulling image ghcr.io/cachix/devenv:latest
63960f2bed91fa99c8e33871ba66eec8f8a6de073af3b0de3f28c21bf7b1d2e4
Setup container...
Chown workspace...
Chown projects...
Run command : devenv test...
bash: line 1: devenv: command not found
lifecycle hooks: failed to run: devenv test, error: exit status 127
devcontainer up: run agent command: Process exited with status 1
Try using the --debug flag to see a more verbose output
run agent command: Process exited with status 1
ERROR Sun 15 Dec 2024 11:42:49 AM IST /nix/store/0y1yznahxy9cw5a9lrfcp92hviy081f3-vim-pack-dir/pack/myNeovimPackages/start/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:760: 'Launching devpod workspace' failed
stack traceback:
	.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:760: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:759>
	[C]: in function 'nvim_set_option_value'
	...k/myNeovimPackages/start/nui.nvim/lua/nui/utils/init.lua:154: in function 'set_buf_option'
	...k/myNeovimPackages/start/nui.nvim/lua/nui/utils/init.lua:170: in function 'set_buf_options'
	...ck/myNeovimPackages/start/nui.nvim/lua/nui/tree/init.lua:457: in function 'render'
	...art/remote-nvim.nvim/lua/remote-nvim/ui/progressview.lua:214: in function '_collapse_all_nodes'
	...art/remote-nvim.nvim/lua/remote-nvim/ui/progressview.lua:712: in function '_add_progress_view_run_heading'
	...art/remote-nvim.nvim/lua/remote-nvim/ui/progressview.lua:614: in function 'add_progress_node'
	...art/remote-nvim.nvim/lua/remote-nvim/ui/progressview.lua:277: in function 'start_run'
	.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:300: in function 'start_progress_view_run'
	...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:179: in function <...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:177>
	[C]: in function 'xpcall'
	.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:759: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:758> ...k/myNeovimPackages/start/nui.nvim/lua/nui/utils/init.lua:154: Invalid buffer id: 32
ERROR Sun 15 Dec 2024 11:43:18 AM IST /nix/store/0y1yznahxy9cw5a9lrfcp92hviy081f3-vim-pack-dir/pack/myNeovimPackages/start/remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:973: 'Installing Neovim (if required)' failed.
stack traceback:
	.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:974: in function '_handle_job_completion'
	.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:1017: in function 'run_command'
	.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:645: in function '_setup_remote'
	.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:873: in function '_launch_neovim'
	...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:189: in function <...vim/lua/remote-nvim/providers/devpod/devpod_provider.lua:177>
	[C]: in function 'xpcall'
	.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:759: in function <.../remote-nvim.nvim/lua/remote-nvim/providers/provider.lua:758> 

FAILED JOB OUTPUT (SO FAR)
/home/vscode/.remote-nvim/scripts/neovim_install.sh: /home/vscode/.remote-nvim/scripts/neovim_download.sh: /nix/store/p6k7xp1lsfmbdd731mlglrdj2d66mr82-bash-5.2p37/bin/bash: bad interpreter: No such file or directory

Possible solution, don't patch shebang for scripts in scripts directory for plugin.

Minimal, Reproducible Example (MRE)

programs.nixvim = {
 plugins = {
   remote-nvim.enable = true;
 };
}

Then try starting a workspace using RemoteStart

@0x006E 0x006E added the bug Something isn't working label Dec 15, 2024
@khaneliman
Copy link
Contributor

Can you try with

remote-nvim.package = pkgs.vimPlugins.remote-nvim-nvim.overrideAttrs { dontPatchShebangs = true; } ;

@0x006E
Copy link
Author

0x006E commented Dec 15, 2024

That works, but still no plugins or config are copied I think, because I get a clean nvim client.

Not sure how to debug this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants