loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
9.26k stars 340 forks source link

Error opening vscode via cli: couldn't find the code binary [Cursor] #1335

Closed supermavster closed 6 days ago

supermavster commented 2 weeks ago

Hello, I have a problem in my OS (Arch Linux) Linux 6.11.3-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 10 Oct 2024 20:11:06 +0000 x86_64 GNU/Linux.

Error:

10:59:54 info Starting VSCode...
10:59:54 debug Error opening vscode via cli: couldn't find the code binary

Steps:

  1. Create a new Workspace in a folder
  2. Select the Docker provider
  3. Choose Cursor as the default IDE

If not open, click Start with -> Cursor.

Error Log:

? Please select a workspace from the list below test-cursor
10:59:50 debug Skipping provider upgrade check during development
10:59:50 debug Acquire workspace lock...
10:59:50 debug Acquired workspace lock...
10:59:50 info Creating devcontainer...
10:59:50 debug Adding ssh keys to agent, disable via 'devpod context set-options -o SSH_ADD_PRIVATE_KEYS=false'
10:59:50 debug Error adding private keys to ssh-agent: ssh-agent is not started
10:59:50 debug Inject and run command: '/usr/bin/devpod-cli' helper ssh-server --stdio --debug
10:59:50 debug Attempting to create SSH client
10:59:50 debug Execute command locally
10:59:51 debug SSH client created
10:59:51 debug SSH session created
10:59:51 info Execute SSH server command: zsh -c '/usr/bin/devpod-cli' agent workspace up --workspace-info 'XXXXXXXXXXXXX' --debug
10:59:51 info Use /home/supermavster/.devpod/agent/contexts/default/workspaces/test-cursor as workspace dir
10:59:51 debug Created logger
10:59:51 debug Received ping from agent
10:59:51 debug Credentials server started on port 16865...
10:59:52 debug Incoming client connection at /
10:59:52 debug Credentials server started...
10:59:52 debug Workspace Folder already exists /home/supermavster/Desktop/test-cursor
10:59:52 debug Workspace exists, skip downloading
10:59:52 debug Skipping configuring daemon
10:59:52 debug Using docker command 'docker'
10:59:52 debug execute inject script
10:59:52 debug Received line after pong: done
10:59:52 debug done injecting
10:59:52 debug done inject
10:59:52 debug Done InjectAgentAndExecute
10:59:52 debug Injected into container
10:59:52 info Setup container...
10:59:52 debug done exec
10:59:52 debug Attempting to create SSH client
10:59:52 debug Inject and run command: '/usr/local/bin/devpod' helper ssh-server --stdio --debug
10:59:52 debug SSH client created
10:59:52 debug SSH session created
10:59:52 info Execute SSH server command: bash -c '/usr/local/bin/devpod' agent container setup --setup-info 'XXXX' --container-workspace-info 'XXXX' --chown-workspace --inject-git-credentials --debug
10:59:52 debug Created logger
10:59:52 debug Received ping from agent
10:59:52 debug Start setting up container...
10:59:52 debug Credentials server started on port 16896...
10:59:53 debug Incoming client connection at /
10:59:53 debug Credentials server started...
10:59:53 debug Patch etc environment & profile...
10:59:53 debug Run lifecycle hooks commands...
10:59:53 debug running user env probe with shell "bash", probe "loginInteractiveShell", user "vscode" and command "cat /proc/self/environ"
10:59:53 debug Done setting up environment
10:59:53 debug Unset setup system credential helper
10:59:53 debug Connection to SSH Server closed
10:59:53 debug Done setting up container
10:59:53 debug Done executing ssh server helper command
10:59:54 debug Connection to SSH Server closed
10:59:54 debug Done executing ssh server helper command
10:59:54 debug Done creating devcontainer
10:59:54 info Run 'ssh test-cursor.devpod' to ssh into the devcontainer
10:59:54 debug No dotfiles repo specified, skipping
10:59:54 info Starting VSCode...
10:59:54 debug Error opening vscode via cli: couldn't find the code binary

Works Solution:

Steps to open Cursor and connect to a remote workspace

  1. Open Cursor
  2. Open a Remote Window
  3. Select "Connect Current Window to Host"
  4. Choose test-cursor.devpod from the list of available hosts
  5. Select the folder where you work

Not is automatically the process; but at the moment is manual.

bkneis commented 2 weeks ago

@supermavster thanks for reporting your issue! Can you please provide your .devcontainer.json?

bkneis commented 2 weeks ago

@supermavster also just to make sure, you have cursor installed? and in your PATH? i.e. you can launch cursor from the same terminal you use devpod?

bkneis commented 6 days ago

This should be fixed as of 0.5.22