简体   繁体   中英

Cannot activate rust-analyzer: bootstrap error

Starting 2020-12-09, VSCode's Rust Analyzer extension no longer loads for me. On launch, it prints out this error message:

Cannot activate rust-analyzer: bootstrap error. See the logs in "OUTPUT > Rust Analyzer Client" (should open automatically). To enable verbose logs use { "rust-analyzer.trace.extension": true }

Enabling extension tracing produces the following diagnostic just before failing:

 INFO [12/10/2020, 10:03:22 AM]: Using server binary at c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe DEBUG [12/10/2020, 10:03:22 AM]: Checking availability of a binary at c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe DEBUG [12/10/2020, 10:03:22 AM]: c:\Users\<user>\AppData\Roaming\Code\User\globalStorage\matklad.rust-analyzer\rust-analyzer-windows.exe --version: { status: 3221225506, signal: null, output: [ null, '', '' ], pid: 1648, stdout: '', stderr: '' }

where <user> is the name of the user account I use to log into the system 1 .

The status value reported in the error diagnostic (3221225506) translates to 0xC0000022 ( STATUS_ACCESS_DENIED ). Navigating to the binary from within VSCode's integrated terminal and trying to execute rust-analyzer-windows.exe --version doesn't produce any output, which seems to reinstate that running this executable from VSCode is somehow blocked.

It appears that something changed with respect to access rights executing the server binary from within VSCode. In between Rust Analyzer working and Rust Analyzer no longer working I didn't update Rust, nor rustup, nor VSCode, nor any extensions.

I did install 2020-12 Cumulative Update for Windows 10 Version 20H2 for x64-based Systems (KB4592438) , though, and the time Rust Analyzer started failing coincides with the time the update got installed. That could literally just be a coincidence.

What additional steps can I take to get to the root cause of the issue, and how do I get Rust Analyzer working again?


Version information:

  • Rust Analyzer (stable): v0.2.408
  • Windows 10 Pro: Version 10.0.19042 Build 19042
  • VSCode: 1.51.1 (user setup)

1 This is also the user account VSCode runs under, including all of its spawned processes. Navigating to the path from a command prompt running under this account reveals that rust-analyzer-windows.exe is present, and executing rust-analyzer-windows.exe --version prints a version identifier, as expected.

Unfortunately, I didn't quite get to investigate the root cause of this.

A system reboot that was forced upon me appears to have restored World Peace.

Clearing proxy config works for me.

I'm not sure this covered all situation, but it might be related to the network.

win10 example

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM