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

Cannot connect to desktop VSCode, ENAMETOOLONG #1045

Open
m2Giles opened this issue May 1, 2024 · 6 comments
Open

Cannot connect to desktop VSCode, ENAMETOOLONG #1045

m2Giles opened this issue May 1, 2024 · 6 comments

Comments

@m2Giles
Copy link

m2Giles commented May 1, 2024

What happened?
When attempting to connect to desktop vscode, receive an error that ENAMETOOLONG

What did you expect to happen instead?
Connection

How can we reproduce the bug? (as minimally and precisely as possible)
On both docker and podman on a local host. Spin up any devpod. For example https://github.com/ublue-os/bluefin

My devcontainer.json:

{
    "name": "...",
    ...
}

Local Environment:

  • DevPod Version: 0.5.6
  • Operating System: linux
  • ARCH of the OS: AMD64

DevPod Provider:

  • Local/remote provider: docker/podman

Anything else we need to know?
Image:
image

When connecting from vscode instead of launching from devpod, vscode can connect.

@89luca89
Copy link
Member

89luca89 commented May 3, 2024

Hi @m2Giles thanks for reporting

is VSCode installed as rpm or flatpak?
thanks!

@89luca89
Copy link
Member

89luca89 commented May 3, 2024

Just tried with both a flatpak and code installed in distrobox and both worked for me

I'm on OpenSUSE Aeon, not bluefin, but that should not be impactful

@m2Giles
Copy link
Author

m2Giles commented May 3, 2024

It only appears to fail on the first run when it uses the vscode URL. After the fail, I can connect to Devpod from VScode.

Browser vscode always seems to work.

VScode installed via rpm on host. I haven't tried the flatpak yet.

Docker and Podman were both showing the same behavior.

Should I remove ~/.devpod and rebuild?

@89luca89
Copy link
Member

89luca89 commented May 6, 2024

Try with either vscode flatpak and/or code in distrobox and let's see 👍

@Arham4
Copy link

Arham4 commented May 11, 2024

Hey, I don't believe in bluefin it can be uninstalled from rpm easily to then try the flatpack (unless we have both the flatpack and rpm?). It's an OCI limitation. Because of how OCI layers work, everything stays in the image and if it is removed it is basically just dereferenced in later layer in which it is removed.

@Arham4
Copy link

Arham4 commented May 11, 2024

I decided to install the flatpak (so I have both rpm install and flatpak install on my system now). It seems devpod opened in the flatpak version, so that's good. However, upon connecting, rather than getting enametoolong, I just get this:
image

[13:13:27.275] Log Level: 2
[13:13:27.280] VS Code version: 1.89.1
[13:13:27.281] Remote-SSH version: [email protected]
[13:13:27.281] linux x64
[13:13:27.281] SSH Resolver called for "ssh-remote+amal.devpod", attempt 1
[13:13:27.282] "remote.SSH.useLocalServer": true
[13:13:27.282] "remote.SSH.useExecServer": true
[13:13:27.282] "remote.SSH.path": undefined
[13:13:27.282] "remote.SSH.configFile": undefined
[13:13:27.282] "remote.SSH.useFlock": true
[13:13:27.282] "remote.SSH.lockfilesInTmp": false
[13:13:27.282] "remote.SSH.localServerDownload": auto
[13:13:27.282] "remote.SSH.remoteServerListenOnSocket": false
[13:13:27.282] "remote.SSH.showLoginTerminal": false
[13:13:27.282] "remote.SSH.defaultExtensions": []
[13:13:27.282] "remote.SSH.loglevel": 2
[13:13:27.282] "remote.SSH.enableDynamicForwarding": true
[13:13:27.282] "remote.SSH.enableRemoteCommand": false
[13:13:27.282] "remote.SSH.serverPickPortsFromRange": {}
[13:13:27.282] "remote.SSH.serverInstallPath": {}
[13:13:27.286] SSH Resolver called for host: amal.devpod
[13:13:27.286] Setting up SSH remote "amal.devpod"
[13:13:27.288] Acquiring local install lock: /tmp/vscode-remote-ssh-742d61fe-install.lock
[13:13:27.289] Looking for existing server data file at /var/home/arham/.var/app/com.visualstudio.code/config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-742d61fe-dc96b837cf6bb4af9cd736aa3af08cf8279f7685-0.110.1-es/data.json
[13:13:27.289] Using commit id "dc96b837cf6bb4af9cd736aa3af08cf8279f7685" and quality "stable" for server
[13:13:27.290] Install and start server if needed
[13:13:27.292] PATH: /app/bin:/app/bin:/app/bin:/usr/bin:/var/home/arham/.var/app/com.visualstudio.code/data/node_modules/bin
[13:13:27.292] Checking ssh with "ssh -V"
[13:13:27.295] > OpenSSH_9.7p1, OpenSSL 3.1.5 30 Jan 2024

[13:13:27.297] askpass server listening on /run/user/1000/vscode-ssh-askpass-ad32c848ab766dfe95cc53403f3dcac3421b7227.sock
[13:13:27.297] Spawning local server with {"serverId":1,"ipcHandlePath":"/run/user/1000/vscode-ssh-askpass-e7b641daf017fab8c73a213ccdb1df6b212ca982.sock","sshCommand":"ssh","sshArgs":["-v","-T","-D","36105","-o","ConnectTimeout=15","amal.devpod"],"serverDataFolderName":".vscode-server","dataFilePath":"/var/home/arham/.var/app/com.visualstudio.code/config/Code/User/globalStorage/ms-vscode-remote.remote-ssh/vscode-ssh-host-742d61fe-dc96b837cf6bb4af9cd736aa3af08cf8279f7685-0.110.1-es/data.json"}
[13:13:27.297] Local server env: {"SSH_AUTH_SOCK":"/run/flatpak/ssh-auth","SHELL":"/bin/sh","DISPLAY":":0","ELECTRON_RUN_AS_NODE":"1","SSH_ASKPASS":"/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/local-server/askpass.sh","VSCODE_SSH_ASKPASS_NODE":"/app/extra/vscode/code","VSCODE_SSH_ASKPASS_EXTRA_ARGS":"","VSCODE_SSH_ASKPASS_MAIN":"/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/askpass-main.js","VSCODE_SSH_ASKPASS_HANDLE":"/run/user/1000/vscode-ssh-askpass-ad32c848ab766dfe95cc53403f3dcac3421b7227.sock"}
[13:13:27.299] Spawned 230
[13:13:27.365] > local-server-1> Running ssh connection command: ssh -v -T -D 36105 -o ConnectTimeout=15 amal.devpod
[13:13:27.368] > local-server-1> Spawned ssh, pid=239
[13:13:27.369] stderr> OpenSSH_9.7p1, OpenSSL 3.1.5 30 Jan 2024
[13:13:27.370] stderr> /bin/sh: line 1: /usr/bin/devpod-cli: No such file or directory
[13:13:27.370] stderr> kex_exchange_identification: Connection closed by remote host
[13:13:27.370] stderr> Connection closed by UNKNOWN port 65535
[13:13:27.371] > local-server-1> ssh child died, shutting down
[13:13:27.373] Local server exit: 0
[13:13:27.373] Received install output: local-server-1> Running ssh connection command: ssh -v -T -D 36105 -o ConnectTimeout=15 amal.devpod
local-server-1> Spawned ssh, pid=239
OpenSSH_9.7p1, OpenSSL 3.1.5 30 Jan 2024
/bin/sh: line 1: /usr/bin/devpod-cli: No such file or directory
kex_exchange_identification: Connection closed by remote host
Connection closed by UNKNOWN port 65535
local-server-1> ssh child died, shutting down

[13:13:27.374] Failed to parse remote port from server output
[13:13:27.375] Resolver error: Error: 
	at g.Create (/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:499181)
	at t.handleInstallOutput (/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:496503)
	at e (/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:557639)
	at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
	at async /var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:579548
	at async t.withShowDetailsEvent (/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:583207)
	at async /var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:554344
	at async T (/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:552395)
	at async t.resolveWithLocalServer (/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:553884)
	at async k (/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:576765)
	at async t.resolve (/var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:580578)
	at async /var/home/arham/.var/app/com.visualstudio.code/data/vscode/extensions/ms-vscode-remote.remote-ssh-0.110.1/out/extension.js:2:846687
[13:13:27.377] ------

Like the other user mentioned, VSCode on browser works fine.

By the way, this resolves the issue if it helps with debugging possibly, however its needed almost anytime devpod is opened then: ublue-os/bluefin#892 (comment)

@deniseschannon deniseschannon added the Linux label May 13, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants