code-server --version: 3.4.1 48f7c2724827e526eeaa6c2c151c520f48a61259

I waiting for 2 hours, no response, no log.
Does it work for you with local VS Code?
Does it work for you with local VS Code?
Yes it works.
I just installed VSCode and tested it.
I had previously worked around this by setting the rust-analyzer.serverPath to the location that code-server stores the binary in, but it seems that either upgrading from 3.0.2 to 3.4.1 broke it or something in the rust-analyzer extension changed.
json
// In your settings.json
"rust-analyzer.serverPath": "/home/tehnix/.local/share/code-server/User/globalStorage/matklad.rust-analyzer/ rust-analyzer-linux"
Previously it would be stuck at 100% without this setting, and work with it. Now it's stuck regardless. Can also confirm local VS Code installations work (on macOS and Ubuntu).
cc @cmoog
I'm also getting this issue in code-server.
Is https://github.com/vadimcn/vscode-lldb/issues/314 relevant? There were issues from code-server caching the wrong version of vscode-lldb.
@ocornoc The latest version of vscode-lldb has been properly available in the code-server marketplace. This leads me to think this is most likely a problem specific to `rust-analyzer.
@Tehnix @B4TT3RY I haven't been able to replicate with the most recent version of rust-analyzer published 4 days ago. Can you please update and check if the issue persists?
@ocornoc The latest version of
vscode-lldbhas been properly available in the code-server marketplace. This leads me to think this is most likely a problem specific to `rust-analyzer.@Tehnix @B4TT3RY I haven't been able to replicate with the most recent version of
rust-analyzerpublished 4 days ago. Can you please update and check if the issue persists?

i waited 10 minutes.
fwiw I just tried version 0.2.216 of the extension and the server downloaded without any issues.
Still an issue with Rust-Analuzer version 0.2.224. I'm wondering if it's more of a permission issue then? I'm running 3.4.1 on Ubuntu using the systemctl --user enable --now code-server command.
There should be a ~/.local/share/code-server/User/globalStorage directory. Do you have a matklad.rust-analyzer directory inside of that? That's where they try to download the server.
Ahhh nevermind I was able to replicate on Node 14 which is what we ship with code-server. I was running with Node 12. It looks like the extension has a workaround for a bug in Node 12 but the bug is fixed in Node 13+ and the workaround ends up causing this bug instead. They have a note to remove the workaround once VS Code updates their Node version.
@nhooyr maybe we'll need to target the same Node version VS Code uses after all. :(
In the meantime, it looks like the file does download, the bug is just that the promise doesn't resolve.
So one workaround would be to rename the temporary file in that directory I mentioned to rust-analyzer-linux. When I did that it asked again to install the server but this time skipped the download since the file was already there and now it seems to work.
Another workaround would be to modify code-server to run with Node 12 instead, for example by editing or overriding the systemd service.
Seeing same issue both with rust-analyzer, but also with rust-lang.rust when setting client to rust-analyzer (it tries downloading to ~/.local/bin/rust-analyzer-linux
I tried renaming the file to rust-analyzer-linux but the extension still tries to download again and get's stuck :(
Possible workaround is available in https://github.com/rust-analyzer/rust-analyzer/issues/3167
Hi, guys, the author of the workaround in rust-analyzer here :D
I'll just add a small check for 13+ version of node before applying it. I didn't know that the workaround does break the extension on newer versions (since vscode still uses v12)
Most helpful comment
Hi, guys, the author of the workaround in rust-analyzer here :D
I'll just add a small check for 13+ version of node before applying it. I didn't know that the workaround does break the extension on newer versions (since vscode still uses v12)