Closed bdkuhman closed 1 month ago
Is there a proxy involved? http_proxy
or something? I am not sure why wget would work but not code-server. But 503 seems like a weird error if it was a proxy issue.
Also interesting that it hangs even when installing from a .vsix
. I believe when installing from a .vsix
it still makes a request to the marketplace (maybe to check for the latest version).
Is there a proxy involved?
http_proxy
or something? I am not sure why wget would work but not code-server. But 503 seems like a weird error if it was a proxy issue.Also interesting that it hangs even when installing from a
.vsix
. I believe when installing from a.vsix
it still makes a request to the marketplace (maybe to check for the latest version).
I don't have any forward proxies going out of the cluster; I do have two reverse proxies -- HAProxy outside and Traefik inside the cluster; though I can't imagine they'd cause this.
I gave openvscode-server a try, but same issue was happening.
It's possible it's a network/firewall issue but so far it's evaded me.
In the past I've had problems with not being able to get to windows smartscreen, along with failing to download vscode extensions- but that currently hasn't been happening. I've usually solved it with a router restart but I haven't been able to try yet, along with not really being able to determine that cause when it happens.
Edit: Restarting my router didn't change anything.
Yeah I agree a reverse proxy seems unlikely to be related.
What about trying with --disable-telemetry
? Maybe it is trying to make some telemetry call that is being blocked.
Yeah I agree a reverse proxy seems unlikely to be related.
What about trying with
--disable-telemetry
? Maybe it is trying to make some telemetry call that is being blocked.
no dice.
coder@code-server-78944b7c69-45sgq:~$ /usr/bin/code-server --disable-telemetry --verbose --install-extension ms-kubernetes-tools.vscode-kubernetes-tools
[2024-05-03T21:18:52.492Z] debug parsed command line {"args":{"disable-telemetry":true,"verbose":true,"install-extension":["ms-kubernetes-tools.vscode-kubernetes-tools"]}}
[2024-05-03T21:18:52.516Z] debug parsed config {"args":{"bind-addr":"127.0.0.1:8080","auth":"password","password":"<redacted>"}}
[2024-05-03T21:18:52.517Z] debug Found VS Code arguments; spawning VS Code CLI
[2024-05-03T21:18:52.517Z] debug Running Code CLI
Installing extensions...
^C[2024-05-03T21:19:42.371Z] debug parent:4385 disposing {"code":"SIGINT"}
coder@code-server-78944b7c69-45sgq:~$ code-server --verbose --disable-telemetry --install-extension ms-kubernetes-tools.vscode-kubernetes-tools
Ignoring option 'disable-telemetry': not supported for code-server.
{
"type": "extensionManagement",
"install": [
"ms-kubernetes-tools.vscode-kubernetes-tools"
],
"force": false
}
^C
Tried investigating with a tcpdump, so far haven't noticed anything. All the domains it's trying to reach out to resolve successfully.
I tried the (latest) Docker image just in case it was easily reproducible, but unfortunately it all worked. Got to be some network hang somewhere, feels like, but maybe VS Code dropped an exception somewhere and this is a hanging promise.
$ docker run --rm --name code-server codercom/code-server
[2024-05-03T22:38:50.411Z] info Wrote default config file to /home/coder/.config/code-server/config.yaml
[2024-05-03T22:38:50.685Z] info code-server 4.23.1 9a28bc29dbddb6886dfe03dc1c31320249a901ce
[2024-05-03T22:38:50.686Z] info Using user-data-dir /home/coder/.local/share/code-server
[2024-05-03T22:38:50.698Z] info Using config file /home/coder/.config/code-server/config.yaml
[2024-05-03T22:38:50.698Z] info HTTP server listening on http://0.0.0.0:8080/
[2024-05-03T22:38:50.698Z] info - Authentication is enabled
[2024-05-03T22:38:50.698Z] info - Using password from /home/coder/.config/code-server/config.yaml
[2024-05-03T22:38:50.698Z] info - Not serving HTTPS
[2024-05-03T22:38:50.698Z] info Session server listening on /home/coder/.local/share/code-server/code-server-ipc.sock
$ docker exec -it code-server bash
coder@4f8432bc2752:~$ code-server --install-extension ms-kubernetes-tools.vscode-kubernetes-tools
Installing extensions...
Installing extension 'ms-kubernetes-tools.vscode-kubernetes-tools'...
Extension 'redhat.vscode-yaml' v1.14.0 was successfully installed.
Extension 'ms-kubernetes-tools.vscode-kubernetes-tools' v1.3.16 was successfully installed.
Another idea for a test: if you download official VS Code and then use code --install-extension
, does it have the same problem? If so maybe we can leverage that to open an issue upstream where they probably have more ideas.
Another idea for a test: if you download official VS Code and then use
code --install-extension
, does it have the same problem? If so maybe we can leverage that to open an issue upstream where they probably have more ideas.
I went ahead and downloaded the latest (code_1.89.0-1714530869_amd64.deb) vscode on this node,
First test gave me
code --verbose --install-extension redhat.vscode-yaml
...
Installing extensions...
...
TRACE [File Watcher (node.js)] Started watching: '/home/user/.vscode/extensions/extensions.json'
DEBUG ComputeTargetPlatform: linux-x64
TRACE resolveShellEnv(): skipped (VSCODE_CLI is set)
TRACE Scanned user extensions: 0
TRACE [File Watcher (node.js)] >> normalized [ADDED] /home/user/.vscode/extensions/extensions.json.vsctmp
DEBUG User data changed
Error while installing extensions: getaddrinfo EAI_AGAIN marketplace.visualstudio.com
getaddrinfo EAI_AGAIN marketplace.visualstudio.com
which looked promising, though a second test (and others) give me
...
Installing extensions...
...
TRACE Started scanning user extensions c {
...
}
DEBUG ComputeTargetPlatform: linux-x64
TRACE Scanned user extensions: 0
TRACE Scanned user extensions: 0
DEBUG ComputeTargetPlatform: linux-x64
TRACE resolveShellEnv(): skipped (VSCODE_CLI is set)
TRACE resolveShellEnv(): skipped (VSCODE_CLI is set)
TRACE resolveShellEnv(): skipped (VSCODE_CLI is set)
and hangs from there.
I gave the node a reboot, to see if that fixes anything. It seems sluggish, so there might just be some other system issue at play. Though I believe I was having issues even when this pod was scheduled on another node.
I resolved an issue in /etc/hosts on that node, And it seems I can install extensions in vscode through the UI, but the cli just hangs. both methods still hang in code-server
Interesting. I am not sure why that would be, unfortunately.
Maybe setting "extensions.verifySignature": false
will work, although maybe not since I did not see anything about a signature in your logs. Got the idea from https://github.com/microsoft/vscode/issues/175705 and https://github.com/microsoft/vscode-remote-release/issues/9628.
There are some other issues that look like they might be related, but it is hard to tell.
Sure sounds similar.
Reading through the issues, it looks like "extensions.verifySignature": false
needs to be set in .devcontainer/devcontainer.json
and the user settings json won't work.
Is there a way to configure this in code-server?
I can fork if need be, just don't see devcontainer in the source tree.
Ah sorry I missed that, I thought it was a regular setting. Looks like it is unrelated in this case after all, but if you want you could check CPU usage and processes for vsce-sign
to confirm, I think.
Another idea I had is to launch code-server with NODE_DEBUG
. For example:
NODE_DEBUG=http,https code-server --disable-telemetry --install-extension <ext>
Maybe something will stand out in the output.
Here is what I get as far as host names, interesting there is a windows.net domain in there, maybe Azure or something.
$ NODE_DEBUG=http,https code-server --disable-telemetry --install-extension vscodevim.vim 2>&1 | grep hostname | sort | uniq
hostname: 'open-vsx.org',
hostname: 'openvsxorg.blob.core.windows.net',
I think it's my firewall, Specifically Suricata/IPS. After disabling it, extensions work. Don't know why it's causing problems when other things work. I'm not getting any alerts or anything in the logs that indicate something's getting blocked, but I guess there's something going on there.
Is there an existing issue for this?
OS/Web Information
code-server --version
:Steps to Reproduce
Expected
Extension installs
Actual
Install hangs indefinitely
Logs
Tried installing through vsix, but also does not work (both cli and UI). first try with verbose on and using the direct path got 503, but second try just hangs.
Screenshot/Video
No response
Does this bug reproduce in native VS Code?
I did not test native VS Code
Does this bug reproduce in GitHub Codespaces?
I did not test GitHub Codespaces
Are you accessing code-server over a secure context?
Notes
It seems that browser extensions do install. (
k--kato.intellij-idea-keybindings
works) but only by clicking install, not through the command line.