Skip to content

[Extension] Download rust-analyzer server stuck 100% #1810

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

Closed
B4TT3RY opened this issue Jun 15, 2020 · 16 comments · Fixed by #1998
Closed

[Extension] Download rust-analyzer server stuck 100% #1810

B4TT3RY opened this issue Jun 15, 2020 · 16 comments · Fixed by #1998
Labels
extension The issue needs to be fixed in the extension waiting-for-info Waiting for more information from submitter

Comments

@B4TT3RY
Copy link

B4TT3RY commented Jun 15, 2020

  • Web Browser: Chrome 83.0.4103.97
  • Local OS: Windows 10 2004
  • Remote OS: Ubuntu 20.04 LTS
  • Remote Architecture: amd64
  • code-server --version: 3.4.1 48f7c27

image
image

I waiting for 2 hours, no response, no log.

@nhooyr
Copy link
Contributor

nhooyr commented Jun 16, 2020

Does it work for you with local VS Code?

@nhooyr nhooyr added the waiting-for-info Waiting for more information from submitter label Jun 16, 2020
@B4TT3RY
Copy link
Author

B4TT3RY commented Jun 16, 2020

Does it work for you with local VS Code?

Yes it works.
I just installed VSCode and tested it.

@Tehnix
Copy link

Tehnix commented Jun 21, 2020

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.

    // 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).

@nhooyr
Copy link
Contributor

nhooyr commented Jun 22, 2020

cc @cmoog

@nhooyr nhooyr added extension The issue needs to be fixed in the extension and removed waiting-for-info Waiting for more information from submitter labels Jun 22, 2020
@ocornoc
Copy link

ocornoc commented Jun 24, 2020

I'm also getting this issue in code-server.
Is vadimcn/codelldb#314 relevant? There were issues from code-server caching the wrong version of vscode-lldb.

@cmoog
Copy link
Contributor

cmoog commented Jun 28, 2020

@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?

@cmoog cmoog added the waiting-for-info Waiting for more information from submitter label Jun 28, 2020
@B4TT3RY
Copy link
Author

B4TT3RY commented Jun 28, 2020

@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?

image
i waited 10 minutes.

@code-asher
Copy link
Member

fwiw I just tried version 0.2.216 of the extension and the server downloaded without any issues.

@Tehnix
Copy link

Tehnix commented Jun 30, 2020

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.

@code-asher
Copy link
Member

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.

@code-asher
Copy link
Member

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. :(

@code-asher
Copy link
Member

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.

@pjoe
Copy link

pjoe commented Jul 6, 2020

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

@pjoe
Copy link

pjoe commented Jul 6, 2020

I tried renaming the file to rust-analyzer-linux but the extension still tries to download again and get's stuck :(

nhooyr added a commit that referenced this issue Jul 22, 2020
Closes #1894
Closes #1892
Closes #1810
code-asher pushed a commit that referenced this issue Aug 19, 2020
Closes #1894
Closes #1892
Closes #1810
@hjfreyer
Copy link

Possible workaround is available in rust-lang/rust-analyzer#3167

@Veetaha
Copy link

Veetaha commented Aug 21, 2020

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)

bors bot added a commit to rust-lang/rust-analyzer that referenced this issue Aug 24, 2020
5841: Gate stream.pipeline workaround on fixed versions of node r=matklad a=Veetaha

Fixes the symptom of coder/code-server#1810
Original report here: #3167 (comment)
Thanks to @hjfreyer for precise investigation :D

Co-authored-by: Veetaha <[email protected]>
nhooyr added a commit that referenced this issue Aug 25, 2020
Closes #1894
Closes #1892
Closes #1810
nhooyr added a commit that referenced this issue Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
extension The issue needs to be fixed in the extension waiting-for-info Waiting for more information from submitter
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants