-
Notifications
You must be signed in to change notification settings - Fork 286
Language server crashes on startup #533
Comments
Does this happen to be a remote environment? |
Hello, Thank you very much for the quick reply and your support. No, this happens on my local machine, however I am connected to a VPN network. After disconnecting from the VPN, the problem doesn't happen anymore. Could you share what seems to cause this problem? |
I'm not sure. I've seen similar errors happen when users are using VSCode's remote environment support. I'm currently working on extension updates to support that. When you connect to your VPN, do you route all traffic (including DNS) through the VPN? Also, is this a corporate VPN or a public one? |
It is a corporate VPN. I'm note sure about the DNS, but I suppose so. Thank you very much for your quick help! |
Hi, Thanks. I'm going to reopen the issue so that I remember to check on it while I do the work for the remote environment. Thanks! |
It's good, that you reopened this issue, because the problem also happens when I'm not connected to the VPN :( |
What's the name of the file you are opening? |
Nope, my bad, I was still having a running process, which had a port forwarded. After killing the process and restarting, the Language server started normally. |
Hi, I encounter that same issue but I do not have specific network configuration. Our company has a VPN but it is at the level of our router. Nothing is installed or configured on my computer. There is no forwarded port, or anything.
|
I'm facing the same issue but I don't think my org uses VPN.
|
I can reproduce this (no VPN) in two steps:
I'm guessing it's related to the file being unsaved? Once I do this, re-opening VS Code causes the problem on start-up (presumably because VS Code restores the unsaved Ruby tab).
Error: [UriError]: Scheme is missing: {scheme: "", authority: "", path: "undefined", query: "", fragment: ""}
|
Same here. No VPN, same error. As we have multiple people - should we try to find similarities? Installed extensions, asdf, rvm, rbenv, ...? |
Seems like "new file" is causing it.
This results language server to crash multiple times, and then stop restarting. Because language server is stopped, checks are not performed on existing ruby files anymore. PS: vscode-ruby version: 0.26.0, but I think I saw it in 0.25.3 too. |
Thanks @jcw- and @e1senh0rn, that gave me reproduction steps. I think I know where this is happening |
Ok here's what's happening: The language server is attempting to get the configuration from VSCode for the new file's workspace. But, this file doesn't exist anywhere except in VSCode's memory. VSCode is falling back to just returning the global configuration for the The problem manifests if that global configuration specifies linter or format settings. Those tools need to have a working directory in order to execute so that they can pick up artifacts like I'm significantly out of date on So for a general question for the group: when you create a new, unsaved file in VSCode, are you expecting linting and formatting with tooling like RuboCop to work? If yes, in what directory would you expect those tools to source their configuration? |
Personally I would not care about new files, but as it is happening when starting the editor for existing projects/files (for me) I uninstalled it and I'm using ruby-rubocop. Has problems when starting via bookmarks extension, but is working great when starting with |
How are you opening the editor? |
Out of curiosity I checked how ESLint does work. For untitled files it just says
When you try to save "untitled" file in multi-root workspace, it suggests the folder of last opened file. For my case I have no multi-root workspaces at all. Simples solution seems like to skip liniting in multi-root workspace. |
What I think I'm going to do is fall back to the first workspace folder that's available. The VSCode docs say that corresponds to the legacy workspace root thing. From there, if no runtime directory can be determined, I may just do what ESLint does |
@wingrunr21 Will this be released any time soon? |
This is already released in version 0.26.0 if I'm not mistaken. |
@jaime-rave-conichi I'm on 0.26.0 and still have this issue. And besides the commit a888116 is after the 0.26.0 release on the master branch, I checked that as well 🙂 |
I am still having this problem on 0.26.0. I attempted to install this extension from the master branch but the build process wasn't immediately obvious (I am new to vscode) so I haven't checked that, sorry. |
@wingrunr21 Could you make a release with this fix included? |
Your environment
vscode-ruby
version: 0.25.3useLanguageServer
is true?)With all extentions disabled and only vscode-ruby enabled, when I open VS Code:
Expected behavior
I expect the language server to start.
Actual behavior
The language server crashes 3 times:
This and the next section should include screenshots, code samples, console output, etc. The more information we have to reproduce the better!
The text was updated successfully, but these errors were encountered: