[英]Cannot activate rust-analyzer: bootstrap error
Starting 2020-12-09, VSCode's Rust Analyzer extension no longer loads for me.从 2020 年 12 月 9 日开始,VSCode 的 Rust 分析器扩展不再为我加载。 On launch, it prints out this error message:启动时,它会打印出以下错误消息:
Cannot activate rust-analyzer: bootstrap error.无法激活 rust-analyzer:引导错误。 See the logs in "OUTPUT > Rust Analyzer Client" (should open automatically).查看“OUTPUT > Rust Analyzer Client”中的日志(应该会自动打开)。 To enable verbose logs use { "rust-analyzer.trace.extension": true }要启用详细日志,请使用 { "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 .其中<user>
是我用来登录系统的用户帐户的名称1 。
The status
value reported in the error diagnostic (3221225506) translates to 0xC0000022 ( STATUS_ACCESS_DENIED
).错误诊断 (3221225506) 中报告的status
值转换为 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.从 VSCode 的集成终端导航到二进制文件并尝试执行rust-analyzer-windows.exe --version
不会产生任何 output,这似乎恢复了从 VSCode 运行此可执行文件以某种方式被阻止。
It appears that something changed with respect to access rights executing the server binary from within VSCode.从 VSCode 中执行服务器二进制文件的访问权限似乎发生了一些变化。 In between Rust Analyzer working and Rust Analyzer no longer working I didn't update Rust, nor rustup, nor VSCode, nor any extensions.在 Rust Analyzer 工作和 Rust Analyzer 不再工作之间,我没有更新 Rust、rustup、VSCode 和任何扩展。
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.不过,我确实为基于 x64 的系统 (KB4592438) 安装了 Windows 10 版本 20H2 的 2020-12 累积更新,并且 Rust Analyzer 开始失败的时间与安装更新的时间一致。 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?我可以采取哪些额外步骤来解决问题的根本原因,以及如何让 Rust 分析仪再次工作?
Version information:版本信息:
1 This is also the user account VSCode runs under, including all of its spawned processes. 1这也是运行 VSCode 的用户帐户,包括其所有衍生的进程。 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.从在此帐户下运行的命令提示符导航到路径显示存在rust-analyzer-windows.exe ,执行rust-analyzer-windows.exe --version
会按预期打印版本标识符。
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.我不确定这是否涵盖了所有情况,但它可能与网络有关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.