rust-analyzer: Cannot Update/Bootstrap `rust-analyzer` in Visual Studio Code
Updating the rust-analyzer nightly distribution currently does not work in the Visual Studio Code Rust Analyzer Extension.
From the OUTPUT tab:
ERROR [15/06/2021, 15:42:43]: Bootstrap error [TypeError: Only absolute URLs are supported
at getNodeRequestOptions (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:20682:9)
at c:\Users\harry\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:20787:19
at new Promise (<anonymous>)
at Object.fetch (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:20784:9)
at c:\Users\harry\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:22713:36
at downloadFile (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:22714:7)
at c:\Users\harry\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:22693:15
at C._withProgress (<path redacted>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:84:44110)
at C.withProgress (<path redacted>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:84:43864)
at Object.withProgress (<path redacted>\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:93:30045)
at Object.download (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:22687:45)
at <path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:23057:19
at downloadWithRetryDialog (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:23095:26)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
at async getServer (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:23056:5)
at async bootstrapServer (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:22957:18)
at async bootstrap (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:22893:18)
at async tryActivate (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:22778:24)
at async activate (<path redacted>\.vscode\extensions\matklad.rust-analyzer-0.3.638\out\src\main.js:22769:5)]
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 24 (15 by maintainers)
I updated the extension and now I am getting this error:
Bootstrap error [Error: ENOENT: no such file or directory, open 'C:\C:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-x86_64-pc-windows-msvc6e0f2e9b82']🤔Ah, I think I’ve got it, actually. Looks like another regression from #8956 😕.
Uri.pathis used in many places whereUri.fsPathshould be. (Why isvscode.Uriso confusing?) I need to test to confirm such a Ctrl+R job would resolve this particular error.I’ll draft a PR for this issue along with another bugfix in #8956.
Works for me on mac too, thank you!
HTG-YT is on Windows judging from the error trace, so looks like we have both forms of path URLs tested and can safely close this issue.
Feel free to comment if any related issues occur.
@wxb1ank the plugin I installed from the
.vsixis marked as version0.3.640, in which it did work correctly. Thanks!It gives the
C:\C:\...error to me. I’m not sure if I installed it properly, I have never used a VSIX before now.Yes, I am indeed on Windows. It’s great to see this issue fixed! Thanks all of you for your precious time and hard work.
No worries, I have not spotted that indeed there’s a different plugin version after the update. Alas, the server binary functionality is still not working for me:
I don’t think so, at least custom r-a commands are not registered in VSCode by that time, I also don’t see any
rust-analyzerstatus in the VSCode footer:Nothing in the
psoutput too.I only start r-a when it happens. First, it notices the client update and downloads it (the very first start, no updates on consequent restarts ofc) and then tries to download (that works) and update the server binary (that fails).
Before the recent client changes, it was able to do so and start the server, but not now.