Giter Site home page Giter Site logo

vscode-coder's Introduction

Coder Remote

Visual Studio Marketplace "Join us on Discord"

The Coder Remote VS Code extension lets you open Coder workspaces with a single click.

  • Open workspaces from the dashboard in a single click.
  • Automatically start workspaces when opened.
  • No command-line or local dependencies required - just install VS Code!
  • Works in air-gapped or restricted networks. Just connect to your Coder deployment!

Demo

Getting Started

Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.

ext install coder.coder-remote

Alternatively, manually install the VSIX from the latest release.

Variables Reference

Coder uses ${userHome} from VS Code's variables reference. Use this when formatting paths in the Coder extension settings rather than ~ or $HOME.

Example: ${userHome}/foo/bar.baz

vscode-coder's People

Contributors

code-asher avatar kylecarbs avatar dependabot[bot] avatar rodrimaia avatar jsjoeio avatar emyrk avatar coryb avatar davo-canva avatar coadler avatar bcpeinhardt avatar brunoquaresma avatar joshvee avatar kira-pilot avatar mafredri avatar stirby avatar ryousukeuchino avatar ytcheng avatar

Stargazers

 avatar  avatar Matt Vollmer avatar  avatar  avatar Parham Mohammadi avatar Matyas Danter avatar Alex Lee avatar  avatar  avatar  avatar Samuel Dion avatar haosdent avatar Edward Xie avatar Peter Abbasi avatar  avatar Raghav jha avatar  avatar  avatar Andre Sa avatar Ika Key avatar  avatar icanfly520 avatar Vojtěch Mareš avatar jason avatar Eric Paulsen avatar 小辉辉 avatar  avatar Rohan Sharma avatar  avatar Franck Chan avatar John Buhay avatar haigeno1 avatar George Kontridze avatar Mike Sun avatar Nicki Fisher avatar BJ McCotter avatar Leon Hausdorf avatar N.S.Devaraj avatar Gary Wang avatar Jan Losinski avatar Christopher Zinda avatar  avatar wmingjian avatar Alliuirin avatar Bill avatar Fabián Díaz avatar Stéphane Este-Gracias avatar cedricfarinazzo avatar Muhammad Atif Ali avatar  avatar Timo avatar Dimitrij Klesev avatar Ammar Bandukwala avatar Noel Towa avatar YoungHyun Cho avatar  avatar  avatar

Watchers

 avatar Presley Pizzo avatar Jaayden Halko avatar Scott avatar Timo avatar  avatar Dean Sheather avatar  avatar  avatar

vscode-coder's Issues

Invalid session token! (Error: certificate has expired)

Hi,

Got this error when trying to connect to my coder server.
image

I'm currently using Traefik ingress to publish coder and the certificate it's been issued by let's encrypt. Coder CLI can connect without issues using the same token, Any idea to find more info? or debug what certificate is expired?

Error: ENOENT: no such file or directory, scandir

Got this one while trying to connect to my workspace, extension was installed normally, but when I try to connect it show me this error

Error: ENOENT: no such file or directory, scandir 'c:\Users\name\AppData\Roaming\Code\User\globalStorage\coder.coder-remote\bin'

when I navigate to coder.coder-remote, there isn't any bin dir

Browser Workspace Button Missing

After installing the extension and looking at the demo GIF, I am not seeing the dashboard button. I have looked through the docs and have not see anything to add to my templates to enable either. I have an imperfect solution below, but curious what the steps are for this to properly work as depicted.

Thanks

main.tf

resource "coder_app" "vscode-desktop" {
  agent_id     = coder_agent.dev.id
  url          = "vscode://coder.coder-remote/open?owner=${data.coder_workspace.me.owner}&workspace=${data.coder_workspace.me.name}"
  external     = true
  slug         = "vscode-desktop"
  icon         = "/icon/code.svg"
  display_name = "VS Code Desktop"
}

Hostname changes occasionally

When I'm connected, my hostname looks like this:

Screenshot 2023-01-19 at 22 11 55

However, occasionally it regresses to match the SSH config:

Screenshot 2023-01-19 at 22 11 42

Note CODER: -> SSH: and mafredri/hel -> whatever that is. 😄

A simple way to reproduce:

  1. Connect to workspace
  2. Restart workspace (stop / start), don't touch VSCode (it will show an error)
  3. Once workspace is up and running again, dismiss the error in VS Code and let it reconnect
  4. Observe hostname change

Can't login when using self signed cert for coder server

Description

When trying to login on Windows to a coder server that is using a self signed cert by a private CA the login does not work and errors with:
image

Desired solution

It should be possible to tell the extension to accept the cert from the private CA.

Windows Firewall prompt on every new binary

Every time there's a new version on the server (which is multiple times per day in dev.coder.com) the extension will download a new binary and Windows firewall will prompt to allow network access.

We should figure out a way to prevent the windows firewall thing from popping up (we only need to access over localhost anyways).

CRUD workspaces from inside extension

Support creating, updating, and deleting workspaces from the VS Code extension, with full parameter support.

VS Code supports WebViews, should it be done via this? Or native inputs?

add Coder logo + panel something to the sidebar

Although I prefer to use the command pallette, we should add a Coder panel to the sidebar to help users log in and connect to workspaces. When I installed the extension, I had to poke around in order to figure out how to get started.

Version compatibility

If someone is using an old version of the extension, it should still work with any (relatively new) version of Coder CLI.

Notify users when their workspace has an update available

Many developers may only connect through VS Code Remote and infrequently use the dashboard. If their workspace has an update available, it'd be awesome to notify via the extension and give users the ability to update.

Additionally, I think we are adding a commit message as well as the (existing) version name. It'd be neat to show this too :)

Updating of SSH config

I noticed the extension adds it's own Host coder-vscode--* entry to SSH config, or more specifically. The file defined by:

	"remote.SSH.configFile": "/Users/maf/.ssh/coder"

I'm wondering it we should do one of two things:

  1. Make sure we use a managed block, like we do with coder (# ------------{START,END}-CODER------------)
  2. See if we can override remote.SSH.configFile when connecting

If it works, 2) would allow us to fully manage the file and not make changes in the users files, a very clean approach.

Alternatively 1) would be an improvement from current since we won't know if/when we'll need to make changes to the host configuration, and doing so automatically without a block is dangerous.

Option to install `coder` CLI on PATH

People who use the VS Code extension may want to use the coder CLI outside of VS Code, but want to leverage VS Code for installing it and keeping it up-to-date.

We might want to make this configurable as a deployment-wide flag, but could also leave it up to the user to disable this behavior (perhaps as a VS Code setting).

Support different VSCode channels

2023-02-17.22-07-24.mp4

It's trying to open C:\Users\Phorcys\AppData\Roaming\Code\User\settings.json
but my folder is actually C:\Users\Phorcys\AppData\Roaming\Code - Insiders\User\settings.json because my channel isn't stable.

I think there could be a VSCode API to get the config folder directly rather than having to test for channel and then use a relation table but I couldn't find it.

Default to user `$HOME` when opening a workspace

I think starting in $HOME would be a simple improvement vs starting in /.

Ultimately I'd like to be able to start in any folder I like by typing it in. Even better if there's a form of autocomplete/list of suggestions. (To be clear, this is not about recent folders.)

display agent metadata

we would like to display agent metadata on vscode extension, possibly on the Status Bar ( bottom bar)

Error launching workspace locall: Can't resolve hostname to Coder workspace container

Summary

Coder Remote VSCode extension throws error while attempting to connect to remote development environment.
In the VSCode logs, you can see that Coder is attempting to connect to a hostname that doesn't actually exist.

Repro Steps

  1. Run Coder v2 as Docker Container
  2. Use Cloudflare Tunnels to forward a public hostname ie. editor.mydomain.com to Coder container
  3. Connect to Coder web interface and create first user
  4. Create a workspace template and workspace
  5. Attempt to open the workspace in local VSCode
  6. Observe error details below

NOTE: Connecting to the Coder workspace, using the web-based environment, works perfectly fine.

Server Environment

  • Ubuntu 22.04 LTS
  • Docker Engine version:latest
  • Coder container v0.19.2+7eb2c2f

Run your Coder server container with this command from the documentation.

export DOCKER_GROUP=$(getent group docker | cut -d: -f3)
docker run --detach --interactive --tty --env CODER_ACCESS_URL="https://editor.mydomain.com" --env CODER_HTTP_ADDRESS=0.0.0.0:3925 --volume /var/run/docker.sock:/var/run/docker.sock --net=host --group-add $DOCKER_GROUP ghcr.io/coder/coder:latest

Client Environment

  • MacOS Ventura
  • VSCode 1.76.1
  • Coder v0.1.13

Expected Results

VSCode successfully opens Coder workspace locally.

Actual Results

Screenshot 2023-03-19 at 8 21 46 PM

Screenshot 2023-03-19 at 8 21 53 PM

[20:21:41.980] Log Level: 2
[20:21:41.984] VS Code version: 1.76.1
[20:21:41.984] Remote-SSH version: [email protected]
[20:21:41.984] darwin x64
[20:21:47.448] SSH Resolver called for "ssh-remote+coder-vscode--trevor--trevor01", attempt 1
[20:21:47.448] "remote.SSH.useLocalServer": true
[20:21:47.448] "remote.SSH.path": undefined
[20:21:47.449] "remote.SSH.configFile": ~/.ssh/vscode-config
[20:21:47.449] "remote.SSH.useFlock": true
[20:21:47.449] "remote.SSH.lockfilesInTmp": false
[20:21:47.449] "remote.SSH.localServerDownload": auto
[20:21:47.450] "remote.SSH.remoteServerListenOnSocket": false
[20:21:47.450] "remote.SSH.showLoginTerminal": false
[20:21:47.450] "remote.SSH.defaultExtensions": ["gitpod.gitpod-remote-ssh"]
[20:21:47.450] "remote.SSH.loglevel": 2
[20:21:47.450] "remote.SSH.enableDynamicForwarding": true
[20:21:47.451] "remote.SSH.enableRemoteCommand": false
[20:21:47.451] "remote.SSH.serverPickPortsFromRange": {}
[20:21:47.451] "remote.SSH.serverInstallPath": {}
[20:21:47.454] SSH Resolver called for host: coder-vscode--trevor--trevor01
[20:21:47.455] Setting up SSH remote "coder-vscode--trevor--trevor01"
[20:21:47.458] Acquiring local install lock: /var/folders/bw/yc3krqjs11bdctkqj_clqf4c0000gn/T/vscode-remote-ssh-5514b554-install.lock
[20:21:47.459] Looking for existing server data file at /Users/trevor/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-5514b554-5e805b79fcb6ba4c2d23712967df89a089da575b-0.98.0/data.json
[20:21:47.460] Using commit id "5e805b79fcb6ba4c2d23712967df89a089da575b" and quality "stable" for server
[20:21:47.465] Install and start server if needed
[20:21:47.469] PATH: /usr/local/microsoft/powershell/7:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Library/Apple/usr/bin
[20:21:47.469] Checking ssh with "ssh -V"
[20:21:47.475] > OpenSSH_9.0p1, LibreSSL 3.3.6

[20:21:47.477] Using SSH config file "/Users/trevor/.ssh/vscode-config"
[20:21:47.477] askpass server listening on /var/folders/bw/yc3krqjs11bdctkqj_clqf4c0000gn/T/vscode-ssh-askpass-8590af0b0811d93cba6cf619a91f4db8265d4eb3.sock
[20:21:47.478] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/bw/yc3krqjs11bdctkqj_clqf4c0000gn/T/vscode-ssh-askpass-ad9ca0ed08af24442e5d3863267cc3a984a1ebbd.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","52506","-o","ConnectTimeout=15","-F","/Users/trevor/.ssh/vscode-config","coder-vscode--trevor--trevor01","bash"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/trevor/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-5514b554-5e805b79fcb6ba4c2d23712967df89a089da575b-0.98.0/data.json"}
[20:21:47.478] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.9s5lZKgmdO/Listeners","SHELL":"/usr/local/bin/pwsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/bw/yc3krqjs11bdctkqj_clqf4c0000gn/T/vscode-ssh-askpass-8590af0b0811d93cba6cf619a91f4db8265d4eb3.sock"}
[20:21:47.479] Spawned 99503
[20:21:47.624] > local-server-1> Running ssh connection command: "-v -T -D 52506 -o ConnectTimeout=15 -F /Users/trevor/.ssh/vscode-config coder-vscode--trevor--trevor01 bash"
[20:21:47.626] > local-server-1> Spawned ssh, pid=99507
[20:21:47.631] stderr> OpenSSH_9.0p1, LibreSSL 3.3.6
[20:21:47.634] stderr> ssh: Could not resolve hostname coder-vscode--trevor--trevor01: nodename nor servname provided, or not known
[20:21:47.635] > local-server-1> ssh child died, shutting down
[20:21:47.639] Local server exit: 0
[20:21:47.639] Received install output: local-server-1> Running ssh connection command: "-v -T -D 52506 -o ConnectTimeout=15 -F /Users/trevor/.ssh/vscode-config coder-vscode--trevor--trevor01 bash"
local-server-1> Spawned ssh, pid=99507
OpenSSH_9.0p1, LibreSSL 3.3.6
ssh: Could not resolve hostname coder-vscode--trevor--trevor01: nodename nor servname provided, or not known
local-server-1> ssh child died, shutting down

[20:21:47.642] Resolver error: Error: Could not resolve hostname
	at m.Offline (/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:584439)
	at /Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:581669
	at t.handleInstallOutput (/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:582037)
	at Object.e [as tryInstallWithLocalServer] (/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:623670)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async /Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:643639
	at async t.withShowDetailsEvent (/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:647359)
	at async /Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:622142
	at async C (/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:618648)
	at async t.resolveWithLocalServer (/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:621757)
	at async t.resolve (/Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:644967)
	at async /Users/trevor/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:720839
[20:21:47.644] ------

Carry over code-server settings when connecting

Problem

Currently when using the vscode remote connect tool, VSCode does not share the settings with code-server, this means users have to keep both tools in sync, which produces overhead.

Desired solution

The settings users configured on code-server should be applied automatically when using the extension in the local vscode for the workspace.

Removes first matching Host block from ~/.ssh/config

If there is a Host block in ~/.ssh/config that matches the name used for the remote connection (for example Host *), this gets removed from the file when attempting to connect to a workspace.

I suspect this is caused by:

parsedConfig.remove({ Host: computedHost.Host })

computedHost.Host would evaluate to the Host value from the first block that matched (* in my example). It would be safer to pass an explicit value to remove.

Detect extensions installed in code-server and offer to install them

Problem

Currently when using the vscode remote connect tool, VSCode does not share the extensions with code-server, this means users have to keep both tools in sync, which produces overhead.

Desired solution

The extensions installed on code-server in the workspace should be detected and automatically be installed when using VSCode Remotely with the extension.

No web browser window opens for copying API key when logging in to server without "https://" prefix

On version v0.1.5 of the extension, I tried logging into my Coder deployment by providing the URL but I didn't include the "https://" prefix. I was then prompted to paste the API key from the Coder website that the extension said should have been launched in a web browser window, but no web browser window was ever launched.

I tried once more but this time provided the "https://" prefix and then VS Code prompted me to allow it to open the Coder website in a web browser window, and from there I was able to login successfully.

Negative space in the coder sidebar

There's lots of negative space in the sidebar added by the extension. Could we perhaps list workspaces that match owner:me, refreshing every minute or something (with a refresh button to refresh now)? This would help avoid having to click "Open Workspace" if users are only using their own workspaces.

image

Sophos Endpoint Protection sometimes blocks the request

Seems like sometimes the sophos endpoint protection is blocking something when trying to connect to a workspace. The connection fails then:

image

Malicious behavior ('Lockdown') blocked in coder-windows-amd64-v0.14.3+67952cf.exe

But it's not always the case.

Use compression when downloading coder binary from server

Easy win (52s vs 23s):

wget https://dev.coder.com/bin/coder-darwin-arm64  0.24s user 1.27s system 2% cpu 52.364 total

vs

wget --compression=gzip https://dev.coder.com/bin/coder-darwin-arm64  0.57s user 0.62s system 5% cpu 23.024 total

I believe server does support zstd as well, if that can be utilized in the extension.

I timed the extensions download speed and it was around 50s so I assume it's uncompressed, did not verify in code.

If server binary download fails, the broken file will be cached

During download of the binary on the server (in linux via install.sh, untested on other platforms), the download is made directly to the destination file which may result in an incomplete download being left behind.

curl -sSL "$INSTALL_URL" -o $INSTALL_DIR/code-server
elif command_exists wget; then
wget -qO $INSTALL_DIR/code-server "$INSTALL_URL"

Recommendations:

  1. Download to a temp file in the same dir (such as .filename.temp1234 and then move the file to the destination once the download succeeds.
  2. Check the checksum of the downloaded file with the server. We have SHA1 checksums serverside (idk if we expose them as a file in the bin dir but we could start doing that).

Failing to connect when I open another folder

Logs. ssh coder.dev works fine. I had to restart my workspace to connect

[12:21:23.389] Log Level: 2
[12:21:23.441] VS Code version: 1.76.2
[12:21:23.441] Remote-SSH version: [email protected]
[12:21:23.441] darwin x64
[12:21:26.776] SSH Resolver called for "ssh-remote+coder-vscode--bpmct--dev", attempt 1
[12:21:26.777] "remote.SSH.useLocalServer": true
[12:21:26.777] "remote.SSH.path": undefined
[12:21:26.777] "remote.SSH.configFile": undefined
[12:21:26.778] "remote.SSH.useFlock": true
[12:21:26.778] "remote.SSH.lockfilesInTmp": false
[12:21:26.778] "remote.SSH.localServerDownload": auto
[12:21:26.778] "remote.SSH.remoteServerListenOnSocket": false
[12:21:26.778] "remote.SSH.showLoginTerminal": false
[12:21:26.779] "remote.SSH.defaultExtensions": []
[12:21:26.779] "remote.SSH.loglevel": 2
[12:21:26.779] "remote.SSH.enableDynamicForwarding": true
[12:21:26.779] "remote.SSH.enableRemoteCommand": false
[12:21:26.779] "remote.SSH.serverPickPortsFromRange": {}
[12:21:26.779] "remote.SSH.serverInstallPath": {}
[12:21:26.788] SSH Resolver called for host: coder-vscode--bpmct--dev
[12:21:26.788] Setting up SSH remote "coder-vscode--bpmct--dev"
[12:21:26.792] Acquiring local install lock: /var/folders/wz/rb67ppvj0rz0zmsrvmscdp6r0000gn/T/vscode-remote-ssh-d7dc8702-install.lock
[12:21:26.793] Looking for existing server data file at /Users/benpotter/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d7dc8702-ee2b180d582a7f601fa6ecfdad8d9fd269ab1884-0.98.0/data.json
[12:21:26.793] Using commit id "ee2b180d582a7f601fa6ecfdad8d9fd269ab1884" and quality "stable" for server
[12:21:26.797] Install and start server if needed
[12:21:26.803] PATH: /Users/benpotter/.deno/bin:/Users/benpotter/.nvm/versions/node/v14.19.3/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:/Library/Apple/usr/bin:/usr/local/bin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/usr/local/sbin/:/Users/benpotter/go/bin
[12:21:26.803] Checking ssh with "ssh -V"
[12:21:26.810] > OpenSSH_9.0p1, LibreSSL 3.3.6

[12:21:26.814] askpass server listening on /var/folders/wz/rb67ppvj0rz0zmsrvmscdp6r0000gn/T/vscode-ssh-askpass-5d5f6d03c30335269acc63c15c379bfdbb94f0ab.sock
[12:21:26.814] Spawning local server with {"serverId":1,"ipcHandlePath":"/var/folders/wz/rb67ppvj0rz0zmsrvmscdp6r0000gn/T/vscode-ssh-askpass-0b61af1e01a08f0f5d43d502e4cd02d5b9c4c3d7.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","56162","-o","ConnectTimeout=15","coder-vscode--bpmct--dev","bash"],"serverDataFolderName":".vscode-server","dataFilePath":"/Users/benpotter/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-d7dc8702-ee2b180d582a7f601fa6ecfdad8d9fd269ab1884-0.98.0/data.json"}
[12:21:26.814] Local server env: {"SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.jmVGwd3a0M/Listeners","SHELL":"/bin/zsh","DISPLAY":"1","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/Applications/Visual Studio Code.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin)","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"--ms-enable-electron-run-as-node","VSCODE_SSH_ASKPASS_MAIN":"/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/var/folders/wz/rb67ppvj0rz0zmsrvmscdp6r0000gn/T/vscode-ssh-askpass-5d5f6d03c30335269acc63c15c379bfdbb94f0ab.sock"}
[12:21:26.815] Spawned 60079
[12:21:26.929] > local-server-1> Running ssh connection command: "-v -T -D 56162 -o ConnectTimeout=15 coder-vscode--bpmct--dev bash"
[12:21:26.931] > local-server-1> Spawned ssh, pid=60084
[12:21:26.935] stderr> OpenSSH_9.0p1, LibreSSL 3.3.6
[12:21:41.941] stderr> Connection timed out during banner exchange
[12:21:41.942] stderr> Connection to UNKNOWN port 65535 timed out
[12:21:41.942] > local-server-1> ssh child died, shutting down
[12:21:41.946] Local server exit: 0
[12:21:41.946] Received install output: local-server-1> Running ssh connection command: "-v -T -D 56162 -o ConnectTimeout=15 coder-vscode--bpmct--dev bash"
local-server-1> Spawned ssh, pid=60084
OpenSSH_9.0p1, LibreSSL 3.3.6
Connection timed out during banner exchange
Connection to UNKNOWN port 65535 timed out
local-server-1> ssh child died, shutting down

[12:21:41.949] Resolver error: Error: The connection timed out
	at m.Offline (/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:584439)
	at /Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:581823
	at t.handleInstallOutput (/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:582037)
	at Object.e [as tryInstallWithLocalServer] (/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:623670)
	at process.processTicksAndRejections (node:internal/process/task_queues:96:5)
	at async /Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:643639
	at async t.withShowDetailsEvent (/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:647359)
	at async /Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:622142
	at async C (/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:618648)
	at async t.resolveWithLocalServer (/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:621757)
	at async t.resolve (/Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:644967)
	at async /Users/benpotter/.vscode/extensions/ms-vscode-remote.remote-ssh-0.98.0/out/extension.js:1:720839
[12:21:41.961] ------

Hung on "opening remote" after first start

On Windows 10, VSCode stable

The plugin was installed via settings sync as I have installed it on my laptop.

  1. Sign into https://dev.coder.com through the extension tab
  2. Click open workspaces
  3. Click on a running workspace
  4. The binary starts downloading locally
  5. Once the binary finished downloading, the ping shows up as Direct (41.02ms) but the editor hangs on "Opening Remote..."

image

Coder extension logs
Checking for cached binary: Error: ENOENT: no such file or directory, stat 'c:\Users\dean\AppData\Roaming\Code\User\globalStorage\coder.coder-remote\bin\coder-windows-amd64-v0.13.6-devel+5e540e34.exe'
Started watching workspace
Downloaded binary: c:\Users\dean\AppData\Roaming\Code\User\globalStorage\coder.coder-remote\bin\coder-windows-amd64-v0.13.6-devel+5e540e34.exe
Using cached binary: c:\Users\dean\AppData\Roaming\Code\User\globalStorage\coder.coder-remote\bin\coder-windows-amd64-v0.13.6-devel+5e540e34.exe
Started watching workspace
+ INSTALL_ARCH=x86_64
+ INSTALL_TARGET=unknown-linux-gnu
+ MIN_GLIBC_VERSION=2.18

+ ldd --version

+ LDD=ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

+ uname

+ [ Linux = Darwin ]


+ 
echo ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
+ grep -q musl

+ 
echo ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.


+ grep
glibc version is 2.31
is min? 1

 -o GLIBC [0-9]\+\.[0-9]\+
+ head -n 1
+ tr -d GLIBC 
+ GLIBC_VERSION=2.31
+ echo glibc version is 2.31
+ awk BEGIN{ print "2.18"<="2.31" }
+ IS_MIN_GLIBC_VERSION=1
+ echo is min? 1
+ [ 1 = 0 ]
+ uname
Failed to get network status: Error: read ECONNRESET
Using cached binary: c:\Users\dean\AppData\Roaming\Code\User\globalStorage\coder.coder-remote\bin\coder-windows-amd64-v0.13.6-devel+5e540e34.exe
Started watching workspace
+ INSTALL_ARCH=x86_64
+ INSTALL_TARGET=unknown-linux-gnu
+ MIN_GLIBC_VERSION=2.18
+ ldd --version

+ LDD=ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
+ uname

+ [ Linux = Darwin ]

+ echo ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
+ 
grep -q musl

+ echo ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

+ grep -o GLIBC [0-9]\+\.[0-9]\+
+ head -n 1
+ 
glibc version is 2.31

tr -d GLIBC 
+ GLIBC_VERSION=2.31
+ echo glibc version is 2.31

Failed to get network status: Error: read ECONNRESET
Using cached binary: c:\Users\dean\AppData\Roaming\Code\User\globalStorage\coder.coder-remote\bin\coder-windows-amd64-v0.13.6-devel+5e540e34.exe
Started watching workspace
+ INSTALL_ARCH=x86_64
+ INSTALL_TARGET=unknown-linux-gnu
+ MIN_GLIBC_VERSION=2.18
+ ldd --version

+ LDD=ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
+ uname

+ [ Linux = Darwin ]

+ echo ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
+ grep -q musl

+ echo ldd (Ubuntu GLIBC 2.31-0ubuntu9.9) 2.31
Copyright (C) 2020 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
+ 
grep -o GLIBC [0-9]\+\.[0-9]\+
+ head -n 1
+ tr
glibc version is 2.31
is min? 1

 -d GLIBC 
+ GLIBC_VERSION=2.31
+ echo glibc version is 2.31
+ awk BEGIN{ print "2.18"<="2.31" }
+ IS_MIN_GLIBC_VERSION=1
+ echo is min? 1
+ [ 1 = 0 ]
+ uname -m
+ ARCH=x86_64
+ [ x86_64 = aarch64 ]
+ [ x86_64 = arm64 ]
+ INSTALL_URL=https://aka.ms/vscode-server-launcher/x86_64-unknown-linux-gnu
+ echo Installing from https://aka.ms/vscode-server-launcher/x86_64-unknown-linux-gnu
+ INSTALL_DIR=/home/coder/.vscode-remote/bin
+ 

Logging out of coder invalidates token and is not propagated to extension, open workspace hangs

Steps to reproduce:

  1. Log in to VSCode Coder extension
  2. Go to http(s)://coder and logout
  3. Observe, VSCode extension says: "You're logged in"
  4. Observe, click open workspace works
  5. Observe, after selecting a workspace (cached?) "Opening remote..." hangs forever

Partially related: coder/coder#2937

EDIT: I probably made the wrong conclusion here:

From the extensions log:

Found existing server running on port: 37547

So not sure why it hangs on opening remote.

This I found in ~/.vscode-server/data/logs/20230109T104734/remoteagent.log (deleted all logs before attempting to connect):

2023-01-09 12:54:35.375 [error] Error: write EPIPE
    at afterWriteDispatched (node:internal/stream_base_commons:160:15)
    at writeGeneric (node:internal/stream_base_commons:151:3)
    at Socket._writeGeneric (node:net:795:11)
    at Socket._write (node:net:807:8)
    at writeOrBuffer (node:internal/streams/writable:389:12)
    at _write (node:internal/streams/writable:330:10)
    at Socket.Writable.write (node:internal/streams/writable:334:10)
    at console.value (node:internal/console/constructor:286:16)
    at console.warn (node:internal/console/constructor:365:26)
    at Ve.error (/home/mafredri/.vscode-cli/server-stable-web/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/out/vs/server/node/server.main.js:153:5012)
    at v.error (/home/mafredri/.vscode-cli/server-stable-web/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/out/vs/server/node/server.main.js:90:5984)
    at b.a (/home/mafredri/.vscode-cli/server-stable-web/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/out/vs/server/node/server.main.js:156:6380)
    at b.onUnexpectedError (/home/mafredri/.vscode-cli/server-stable-web/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/out/vs/server/node/server.main.js:10:249)
    at k (/home/mafredri/.vscode-cli/server-stable-web/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/out/vs/server/node/server.main.js:10:465)
    at process.<anonymous> (/home/mafredri/.vscode-cli/server-stable-web/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/out/vs/server/node/server.main.js:130:3289)
    at process.emit (node:events:526:28)
    at process._fatalException (node:internal/process/execution:167:25)
2023-01-09 12:54:35.375 [error] Error: Unexpected SIGPIPE
    at process.<anonymous> (/home/mafredri/.vscode-cli/server-stable-web/bin/e8a3071ea4344d9d48ef8a4df2c097372b0c5161/out/vs/server/node/server.main.js:156:6442)
    at process.emit (node:events:526:28)

[repeats infinitely...]

Add another action to sidebar to log in to another deployment

Might make sense to allow being logged into multiple deployments.

But at the very least, being able to log into another deployment without having to log out would be nice (since logging out deletes the session token and url which you might want to keep around).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.