rust-lang / rust-analyzer

A Rust compiler front-end for IDEs
https://rust-analyzer.github.io/
Apache License 2.0
14.3k stars 1.61k forks source link

Extension doesn't work from within WSL2 #18182

Open ChaseLewis opened 1 month ago

ChaseLewis commented 1 month ago
2024-09-25 03:40:38.040 [error] Bootstrap error Error: `config.server.path` or `config.serverPath` has been set explicitly.            Consider removing this config or making a valid server binary available at that path.
    at Yy (/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2121-linux-x64/out/main.js:343:3365)
    at async Na.getOrCreateClient (/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2121-linux-x64/out/main.js:357:2689)
    at async Na.start (/root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2121-linux-x64/out/main.js:357:3952)
    at async /root/.vscode-server/extensions/rust-lang.rust-analyzer-0.3.2121-linux-x64/out/main.js:378:174
    at async h (/root/.vscode-server/bin/38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40/out/vs/workbench/api/node/extensionHostProcess.js:161:210546)

When installing within a remote server inside WSL2 the extension fails to work after you restart the window for some reason. Not sure how to resolve this error.

rust-analyzer v0.3.2121

ChayimFriedman2 commented 1 month ago

Did you modify config.server.path explicitly?

The-Adam-The commented 1 month ago

I'm also having a similar issue, but it's occurring on Windows 10. I have not amended the config.server.path or config.serverPath, (not knowingly). I just installed it using the VSCode Extensions tab.

The only thing that makes may installation unusual is that I have custom installation setup for Rust due to work rules. Not sure if this is relevant to the rust-analyzer serverPath though.

24-10-01 11:05:26.070 [error] Bootstrap error Error: `config.server.path` or `config.serverPath` has been set explicitly.            Consider removing this config or making a valid server binary available at that path.
    at eC (c:\Users\jimmysmits\.vscode\extensions\rust-lang.rust-analyzer-0.3.2129-win32-x64\out\main.js:343:3365)
    at Ma.getOrCreateClient (c:\Users\jimmysmits\.vscode\extensions\rust-lang.rust-analyzer-0.3.2129-win32-x64\out\main.js:357:2689)
    at Ma.start (c:\Users\jimmysmits\.vscode\extensions\rust-lang.rust-analyzer-0.3.2129-win32-x64\out\main.js:357:3952)
    at Rx (c:\Users\jimmysmits\.vscode\extensions\rust-lang.rust-analyzer-0.3.2129-win32-x64\out\main.js:377:1609)
    at Tx (c:\Users\jimmysmits\.vscode\extensions\rust-lang.rust-analyzer-0.3.2129-win32-x64\out\main.js:377:383)
    at m.n (c:\Users\jimmysmits\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:6409)
    at m (c:\Users\jimmysmits\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:6372)
    at m.l (c:\Users\jimmysmits\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:151:5829)
Veykril commented 1 month ago

The error message is bugged so it always reports the config as being set -> https://github.com/rust-lang/rust-analyzer/pull/18219

Once that is merged please try again with a new version with that PR in it, it should mention the path it is trying to execute

The-Adam-The commented 1 month ago

Fantastic, thanks for letting me know.

The-Adam-The commented 1 month ago

Found the issue, work restrictions were stopping the node process.