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

Devpod try to use wrapper instead of bash on NixOS-WSL #1653

Open
Ow1Dev opened this issue Feb 19, 2025 · 2 comments
Open

Devpod try to use wrapper instead of bash on NixOS-WSL #1653

Ow1Dev opened this issue Feb 19, 2025 · 2 comments
Labels

Comments

@Ow1Dev
Copy link

Ow1Dev commented Feb 19, 2025

What happened?
When running devpod up --ide none . --debug i get this error:

17:52:01 debug No pro instance available, skipping provider upgrade check
17:52:01 debug Acquire workspace lock...
17:52:01 debug Acquired workspace lock...
17:52:01 info Creating devcontainer...
17:52:01 debug Adding ssh keys to agent, disable via 'devpod context set-options -o SSH_ADD_PRIVATE_KEYS=false'
17:52:01 debug Inject and run command: '/nix/store/fi2ca12198r3dv7f1lipai0rpr24aqyb-devpod-0.6.12/bin/devpod' helper ssh-server --stdio --debug
17:52:01 debug Execute command locally
17:52:01 debug Run ssh-add /home/ow1/.ssh/id_ed25519
17:52:01 debug Attempting to create SSH client
17:52:02 debug SSH client created
17:52:02 debug SSH session created
17:52:02 debug Forwarding ssh-agent using /tmp/ssh-XXXXXXhHjT2Z/agent.1497
17:52:02 info Execute SSH server command: wrapper -c '/nix/store/fi2ca12198r3dv7f1lipai0rpr24aqyb-devpod-0.6.12/bin/devpod' agent workspace up --workspace-info 'H4sIAAAAAAAA/5RSwXLTMBD9lz3LUWxoob6VttAMBUNxmIFLR5XWtVpZ60qy007G/87IdpMAwwHfvNq3+96+t4UNuQffComF03faQg68pgY5bVK+UNi3pLgkG/ApeK6wEp0JfAfy/LFDHzRZqgIp8bx/Wtx7ssD2CyDfglaQwx8QYNCN9Xl68tglQsr0GBi0jnqt0EWsFQ3GLpIP6IABtXGIj0/nxdnHi+ubL6flZfzthekOWgcGq8+nZ+Xq+6r8cVOuPl0U6xLy7TAMDBoha20juYGBVniwyZLFCPbUuYm+ISnMezIjo4NDOWyJ3+lQd7cLSQ0vNuk59vzrLLSoylHowEA6FLFU6gZ9EE0LOWTL7ChZZkl6UqbH+VGWL9OfwMAIH9Ye1b87Zl/2p4sbxB3asCMLOQTXYTylCHUkbfUT94Ec8kpnUqRZevLWvVL9myo1uhV66VqXvRaPz7fJZH+yXBwv0ozfasunCjBQtLGGhFpfX0EOdQitz/nhCQxVIfH1jOAODQqPnr8AeT+NBQba3qMMH3Q4c6jQBi2M3/PGJ5STO5OdBr0//I9SZ227aGjrgzBRfCWMH02UnQ/UjK4zkEYX+/SMru/c/jtW79arq/OL62npXLssvpW/Ff47ey+6YxKoC5Bny903/AIAAP//AQAA//+WlCIAmAMAAA==' --debug
17:52:02 info Exit error: start command: exec: "wrapper": executable file not found in $PATH
17:52:02 debug Connection to SSH Server closed
17:52:02 debug Done creating devcontainer
17:52:02 info start command: exec: "wrapper": executable file not found in $PATH
17:52:02 debug Done executing ssh server helper command
17:52:02 fatal Process exited with status 1
run agent command
github.com/loft-sh/devpod/pkg/devcontainer/sshtunnel.ExecuteCommand.func2
        github.com/loft-sh/devpod/pkg/devcontainer/sshtunnel/sshtunnel.go:129
runtime.goexit
        runtime/asm_amd64.s:170

What did you expect to happen instead?
I will expect it to be ready for development.

How can we reproduce the bug? (as minimally and precisely as possible)

  1. Clean devpod (Remove .devpod) (I do this as i get soft lock)
  2. Add Docker Provider devpod provider add docker
  3. Go to a project with devcontainer
  4. Do devpod up --ide none .
  5. Here the error comes.
    My devcontainer.json:
{
  "name": "MyGreetName",
  "image": "mcr.microsoft.com/devcontainers/go:1.23-bookworm",
}

Local Environment:

  • DevPod Version: v0.6.12
  • Operating System: linux (NixOS WSL)
  • ARCH of the OS: AMD64

DevPod Provider:

  • Local/remote provider: docker

Anything else we need to know?

  • It seems like it try to use a program called wrapper. When trying to find wrapper locally (which wrapper) it just shows that ir does not exist. When running devpod with the same version on arch linux it does use bash. If there is a way to change back to bash. let me know.
  • Here is my config (https://github.com/Ow1Dev/ow1dev.nix/tree/691e5cd7afdd552c227d548f2eca9103e2703e4b)
  • My docker is install on wsl and not the host
@Ow1Dev
Copy link
Author

Ow1Dev commented Feb 19, 2025

There was a previous issue also having problems with devpod on nixos in wsl: #1238

@Ow1Dev
Copy link
Author

Ow1Dev commented Feb 20, 2025

Found a workaround. Nix is setting the absolute path on /etc/passwd and does not add it to $PATH.

$ cat /etc/passwd | grep ow1
ow1:x:1001:100::/home/ow1:/nix/store/l0z6lk17qygyl4nvijkd7b8wyhfrxl8k-wrapped-zsh/wrapper

It will work if i add it to $PATH

PATH="/nix/store/l0z6lk17qygyl4nvijkd7b8wyhfrxl8k-wrapped-zsh:$PATH" devpod up --ide none .

It could be nice to have a environment variable i can override for my config.

This will fix the issue
#1242

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

No branches or pull requests

1 participant