Three things got updated and RLS, which was installed and working before, was gone and the plugin prompted to install it again, and failed.
rustup update which removed some components. I don't have the output of that unfortunately...The plugin tried to install the right components again (but I never uninstalled it, so maybe rustup update deleted it?):

And that's what happens when I choose _yes_ to install RLS:

I'm running stable Rust, but I also have nightly installed.
This also happened to me on macOS High Sierra. rustup update basically removed (all?) components and now RLS is not working.
The RLS definitely worked after the macOS security patch. However, I think it was the rustup update which broke the RLS. The same messages appear when I start VSCode and try to edit any .rs file.
I tried to reinstall the nightly-2017-11-28-x86_64-apple-darwin toolchain, but it still doesn't work, even when I change the VSCode settings into the snippet below:
"rust.rustup": {
"toolchain": "stable-x86_64-apple-darwin",
"nightlyToolchain": "nightly-2017-11-28-x86_64-apple-darwin"
},
Same on (arch) Linux.
Here the logs from code --verbose:
$ code --verbose
[main 17:51:10] Starting VS Code in verbose mode
[main 17:51:10] from: /opt/visual-studio-code/resources/app
[main 17:51:10] args: { _: [],
help: false,
h: false,
version: false,
v: false,
wait: false,
w: false,
diff: false,
d: false,
add: false,
a: false,
goto: false,
g: false,
'new-window': false,
n: false,
'unity-launch': false,
'reuse-window': false,
r: false,
performance: false,
p: false,
'prof-startup': false,
verbose: true,
logExtensionHostCommunication: false,
'disable-extensions': false,
disableExtensions: false,
'list-extensions': false,
'show-versions': false,
nolazy: false,
'skip-getting-started': false,
'sticky-quickopen': false,
'disable-telemetry': false,
'disable-updates': false,
'disable-crash-reporter': false }
[main 17:51:11] Unable to read folders in /home/USERNAME/.config/Code/Workspaces (Error: ENOENT: no such file or directory, scandir '/home/USERNAME/.config/Code/Workspaces').
[main 17:51:13] IPC#vscode-machineId
[main 17:51:15] IPC#vscode-workbenchLoaded
[13006:1202/175116.831959:INFO:CONSOLE(9)] "%c[Extension Host] %cSetting sysroot to", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175116.833100:INFO:CONSOLE(9)] "%c[Extension Host] %crunning with rustup %c(at makeRlsProcess (/home/USERNAME/.vscode/extensions/rust-lang.rust-0.3.2/out/src/extension.js:88:17))", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
## Click on „install RLS“ in vscode at this moment
[13006:1202/175128.659697:INFO:CONSOLE(9)] "%c[Extension Host] %c %c(at /home/USERNAME/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:146:25)", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175128.659816:INFO:CONSOLE(9)] "%c[Extension Host] %cinfo: component 'rust-analysis' for target 'x86_64-unknown-linux-gnu' is up to date
%c(at /home/USERNAME/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:147:25)", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175128.775451:INFO:CONSOLE(9)] "%c[Extension Host] %c %c(at /home/USERNAME/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:146:25)", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175128.776180:INFO:CONSOLE(9)] "%c[Extension Host] %cinfo: component 'rust-src' is up to date
%c(at /home/USERNAME/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:147:25)", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175128.777113:INFO:CONSOLE(9)] "%c[Extension Host] %cinstall rls %c(at /home/USERNAME/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:170:17)", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175128.853616:INFO:CONSOLE(9)] "Could not install RLS component (rls-preview)", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175128.867691:INFO:CONSOLE(9)] "Couldn't start client Rust Language Server", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175129.862793:INFO:CONSOLE(9)] "%c[Extension Host] %crejected promise not handled within 1 second %c(at Timeout._onTimeout (/opt/visual-studio-code/resources/app/out/vs/workbench/node/extensionHostProcess.js:4:526604))", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175129.866689:INFO:CONSOLE(9)] "%c[Extension Host] %crejected promise not handled within 1 second %c(at Timeout._onTimeout (/opt/visual-studio-code/resources/app/out/vs/workbench/node/extensionHostProcess.js:4:526604))", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (9)
[13006:1202/175129.867983:INFO:CONSOLE(10)] "[rust-lang.rust] installing rls-preview failed: Error: installing rls-preview failed
at /home/USERNAME/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:152:29
at Generator.throw (<anonymous>)
at rejected (/home/USERNAME/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:14:65)
at <anonymous>", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (10)
[13006:1202/175129.874524:INFO:CONSOLE(10)] "Cannot read property '$isError' of null: TypeError: Cannot read property '$isError' of null
at e.$onUnexpectedError (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:2840390)
at t.e.invoke (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:2876809)
at e._invokeHandler (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:2440566)
at e._receiveOneMessage (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:2440256)
at file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:2439283
at file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:2441202
at e.invoke (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:82095)
at e.fire (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:83819)
at Socket.<anonymous> (file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js:9:221675)
at emitOne (events.js:96:13)", source: file:///opt/visual-studio-code/resources/app/out/vs/workbench/workbench.main.js (10)
## VSCode install failed. Press exit button of VSCode.
[main 17:51:41] Lifecycle#window-before-close 1
[main 17:51:41] Lifecycle#unload() 1
[main 17:51:41] Lifecycle#window-before-close 1
[main 17:51:41] Lifecycle#window-close 1
[main 17:51:41] Lifecycle#window-all-closed
[main 17:51:41] Lifecycle#before-quit
[main 17:51:41] App#will-quit: disposing resources
$ code --version
1.18.1
929bacba01ef658b873545e26034d1a8067445e9
md5-0163e1702648195b0ae36a1515ba5918
$ rustup show
Default host: x86_64-unknown-linux-gnu
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (default)
nightly-x86_64-unknown-linux-gnu
installed targets for active toolchain
--------------------------------------
wasm32-unknown-emscripten
x86_64-unknown-linux-gnu
active toolchain
----------------
stable-x86_64-unknown-linux-gnu (default)
rustc 1.22.1 (05e2e1c41 2017-11-22)

Same issue here, on macOS 10.13.1
$ code --verbose command_parsers/
[main 9:42:55 AM] Starting VS Code in verbose mode
[main 9:42:55 AM] from: /Applications/Visual Studio Code.app/Contents/Resources/app
[main 9:42:55 AM] args: { _: [ '/Users/jehan/work/src/github.com/althea-mesh/command_parsers' ],
help: false,
h: false,
version: false,
v: false,
wait: false,
w: false,
diff: false,
d: false,
add: false,
a: false,
goto: false,
g: false,
'new-window': false,
n: false,
'unity-launch': false,
'reuse-window': false,
r: false,
performance: false,
p: false,
'prof-startup': false,
verbose: true,
logExtensionHostCommunication: false,
'disable-extensions': false,
disableExtensions: false,
'list-extensions': false,
'show-versions': false,
nolazy: false,
'skip-getting-started': false,
'sticky-quickopen': false,
'disable-telemetry': false,
'disable-updates': false,
'disable-crash-reporter': false }
[main 9:42:55 AM] Unable to read folders in /Users/jehan/Library/Application Support/Code/Workspaces (Error: ENOENT: no such file or directory, scandir '/Users/jehan/Library/Application Support/Code/Workspaces').
[main 9:42:57 AM] IPC#vscode-machineId
[1688:1202/094258.559789:INFO:CONSOLE(9)] "[/Users/jehan/.vscode/extensions/ms-vscode.cpptools-0.14.3]: Command `workbench.action.gotoSymbol` appears multiple times in the `commands` section.", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094258.560611:INFO:CONSOLE(9)] "[/Users/jehan/.vscode/extensions/ms-vscode.cpptools-0.14.3]: Command `workbench.action.showAllSymbols` appears multiple times in the `commands` section.", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[main 9:42:59 AM] IPC#vscode-workbenchLoaded
[1688:1202/094303.050351:INFO:CONSOLE(9)] "%c[Extension Host] %cSetting sysroot to", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094303.050619:INFO:CONSOLE(9)] "%c[Extension Host] %crunning with rustup %c(at makeRlsProcess (/Users/jehan/.vscode/extensions/rust-lang.rust-0.3.2/out/src/extension.js:88:17))", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094323.393840:INFO:CONSOLE(9)] "%c[IPC Library: Watcher] %c[CHANGED]", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094323.447045:INFO:CONSOLE(9)] "%c[IPC Library: Watcher] %c >> normalized", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094324.159745:INFO:CONSOLE(9)] "%c[Extension Host] %c %c(at /Users/jehan/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:146:25)", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094324.159942:INFO:CONSOLE(9)] "%c[Extension Host] %cinfo: component 'rust-analysis' for target 'x86_64-apple-darwin' is up to date
%c(at /Users/jehan/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:147:25)", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094324.253515:INFO:CONSOLE(9)] "%c[Extension Host] %c %c(at /Users/jehan/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:146:25)", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094324.253606:INFO:CONSOLE(9)] "%c[Extension Host] %cinfo: component 'rust-src' is up to date
%c(at /Users/jehan/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:147:25)", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094324.253830:INFO:CONSOLE(9)] "%c[Extension Host] %cinstall rls %c(at /Users/jehan/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:170:17)", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094324.279088:INFO:CONSOLE(9)] "Could not install RLS component (rls-preview)", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094324.280830:INFO:CONSOLE(9)] "Couldn't start client Rust Language Server", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094325.282499:INFO:CONSOLE(9)] "%c[Extension Host] %crejected promise not handled within 1 second %c(at Timeout._onTimeout (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:4:526604))", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094325.283280:INFO:CONSOLE(9)] "%c[Extension Host] %crejected promise not handled within 1 second %c(at Timeout._onTimeout (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/node/extensionHostProcess.js:4:526604))", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (9)
[1688:1202/094325.284015:INFO:CONSOLE(10)] "[rust-lang.rust] installing rls-preview failed: Error: installing rls-preview failed
at /Users/jehan/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:152:29
at Generator.throw (<anonymous>)
at rejected (/Users/jehan/.vscode/extensions/rust-lang.rust-0.3.2/out/src/rustup.js:14:65)
at <anonymous>", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (10)
[1688:1202/094325.286890:INFO:CONSOLE(10)] "Cannot read property '$isError' of null: TypeError: Cannot read property '$isError' of null
at e.$onUnexpectedError (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:2840390)
at t.e.invoke (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:2876809)
at e._invokeHandler (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:2440566)
at e._receiveOneMessage (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:2440256)
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:2439283
at file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:2441202
at e.invoke (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:82095)
at e.fire (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:83819)
at Socket.<anonymous> (file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js:9:221675)
at emitOne (events.js:96:13)", source: file:///Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/workbench.main.js (10)
$ code --version
1.18.1
929bacba01ef658b873545e26034d1a8067445e9
$ rustup show
Default host: x86_64-apple-darwin
installed toolchains
--------------------
stable-x86_64-apple-darwin
nightly-x86_64-apple-darwin (default)
active toolchain
----------------
nightly-x86_64-apple-darwin (default)
rustc 1.24.0-nightly (bb42071f6 2017-12-01)
This appears to be a problem with RLS itself: https://github.com/rust-lang-nursery/rls/issues/611
It sounds like the core problem is that RLS hasn't been building correctly for the last few days, and so it isn't available in the nightly build.
I was able to get the errors to go away by following the instructions in this comment: https://github.com/rust-lang-nursery/rls/issues/611#issuecomment-348731464
This can happen when the rls-preview build fails for some reason. 2017-11-30 still has it:
rustup install nightly-2017-11-30
rustup component add rls-preview --toolchain nightly-2017-11-30
rustup component add rust-analysis --toolchain nightly-2017-11-30
rustup component add rust-src --toolchain nightly-2017-11-30Then you can set the version of Rust you want RLS to use in VS Code preferences. (I added "rust-client.channel": "nightly-2017-11-30" to my user preferences.
I don't get any errors about being unable to install or initialize RLS now, but it can't figure out trivial "go to definition" tasks. If I right click a local variable to a function and select go to definition, it says it can't find the definition, etc. So i think it's still silently failing somewhere, but it could be an unrelated issue to installation.
Edit: After figuring out how to open up the RLS output log, the "silently failing" issue I mentioned before appears to be this: https://github.com/rust-lang-nursery/rls-vscode/issues/188
Update: I got it working by using the 12-01 nightly:
rustup install nightly-2017-12-01
rustup component add rls-preview --toolchain nightly-2017-12-01
rustup component add rust-analysis --toolchain nightly-2017-12-01
rustup component add rust-src --toolchain nightly-2017-12-01
Then set "rust-client.channel": "nightly-2017-12-01" in your user preferences.
Worked for me
We know that this is a upstream "bug" & have a workaround. So it seems that this issue can be closed.
I agree. With the bug being on RLS and not on the plugin. I'll be closing this.
Thank you all.
May be should mention this problem in the README.md
Thanks!
I'm getting the "Could not install RLS component (rls-preview)" myself and I'm using stable rust (i.e. rustup's default toolchain is stable 1.22.1), so I'm not sure why the nightly problems would be affecting me.
Is this extension supposed to work on Stable rust? If not, the README should probably state that.
Most helpful comment
Update: I got it working by using the 12-01 nightly:
Then set
"rust-client.channel": "nightly-2017-12-01"in your user preferences.