-
Notifications
You must be signed in to change notification settings - Fork 43
Uncaught Error: Header must provide a Content-Length property. #66
Comments
This error happens when jsonrpc lib fails to parse a message coming from Rls stdout. It usually means something is printing to stdout, which is fairly easy to do but is deadly to the LSP over stdout. vscode-jsonrpc does not seem able to recover, so as you say you need to restart the language server. In order to trace what is causing the parse failure, we'd need to know the stdout that caused the failure. Unfortunately the error from jsonrpc does not include this. If you can reproduce it fairly reliably we can probably trace the issue. Are you getting it on particular projects? |
I have not been able to reliably reproduce this issue. |
Yes I was afraid of that, the stdout comms is quite fragile. Anything Rls-side printing can cause this. As most usage is tested, it should only be edge-cases printing and slipping through the test-net. I'll try to find a way to get the offending stdout into the atom console, that way when it happens we can open the console to see the cause. |
I just pushed 28e96f8 to try an log an error when dodgy stdout gets pushed down the pipe. So by the next release opening the console should point us in the right direction for these sorts of errors. |
I just hit one of these caused by rustc printing help output to stdout after a compiler panic. I've raised rust-lang/rust#48816 to see if this can be improved. Also serves as an example of how the console may look after stdout abuse, logging it as suspicious stdout |
The instance of this I reproduced will be fixed by rust-lang/rust#48993, which should be in the next nightly release. I'll close this once that's available. |
This morning nightly 2018-03-14 is available (rust-lang/rust@521d91c), so this issue is addressed until the next time rls prints to stdout ... |
I am not sure how to reproduce this, this seems to happen seemingly randomly when I'm working on code.
When this happens this error will keep repeating until I re-open atom.
Atom: 1.24.0 ia32
Electron: 1.6.16
OS: Microsoft Windows 10 Pro
Thrown From: ide-rust package 0.14.0
Stack Trace
Uncaught Error: Header must provide a Content-Length property.
Commands
Non-Core Packages
The text was updated successfully, but these errors were encountered: