This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-02-10
Channels
- # beginners (7)
- # calva (1)
- # cider (8)
- # clojure (21)
- # clojure-austin (5)
- # clojure-dev (26)
- # clojure-europe (7)
- # clojuredesign-podcast (4)
- # clojurescript (2)
- # code-reviews (4)
- # community-development (4)
- # datomic (1)
- # emacs (14)
- # lsp (21)
- # pedestal (8)
- # polylith (16)
- # reitit (6)
- # releases (2)
- # vim (14)
- # xtdb (5)
Hi, I'm using vscode and Calva and I'm getting the following error: [Error - 3:57:02 PM] Connection to server got closed. Server will not be restarted. When I start vscode with my project I see that clojure-lsp starts to work fine but after a few seconds I get the above error. I see the following in the in clojure-lsp.out
2024-02-10T14:52:00.847Z INFO [clojure-lsp.handlers:503] - :semantic-tokens-full 0ms
2024-02-10T14:52:00.847Z DEBUG [clojure-lsp.server:55] - [Trace - 2024-02-10T14:52:00.847Z] Sending response 'textDocument/semanticTokens/full - (6)'. Request took 0ms.
Result: {
"data" : [ 0, 4, 8, 0, 0, 1, 4, 9, 4, 0, 2, 1, 4, 3, 0, 0, 5, 5, 2, 1, 2, 5, 4, 6, 0, 1, 3, 7, 2, 0 ]
}
2024-02-10T14:52:01.264Z INFO [clojure-lsp.feature.clojuredocs:23] - [Clojuredocs] Refreshing clojuredocs cache took 895ms.
2024-02-10T14:52:03.278Z INFO [clojure-lsp.db:77] - [DB] Reading transit analysis cache from C:\Users\eric_\.cache\clojure-lsp\db.transit.json db took 2006ms
2024-02-10T14:52:03.278Z INFO [clojure-lsp.feature.java-interop:271] - [Java] JDK source already present on global LSP cache dir.
2024-02-10T14:52:03.299Z INFO [clojure-lsp.dep-graph:269] - :maintain-dep-graph 21ms
2024-02-10T14:52:03.307Z INFO [clojure-lsp.feature.java-interop:312] - [Java] JDK source analysis cache loaded successfully.
2024-02-10T14:52:05.462Z INFO [clojure-lsp.server:55] - Liveness probe - Parent process 3160 is not running - exiting server
2024-02-10T14:52:05.462Z INFO [clojure-lsp.server:496] - Exiting...
I have already tried the following:
• Reinstalled Calva
• Installed an older version of Calva
• Disabled all vscode extension apart from Calva
• Installed an older version of VSCode
• Installed an older version of Clojure-lsp
• Tried it on a new basic Clojure project
• Read the relevant Calva doc
• Read the relevant Clojure-lsp doc (well, at least the parts I think could be relevant)
• Tried it on another notebook -> there it works fine with same version of Calva etc.
• Etc.
Would really appreciate some help,
Version: 1.86.1 (user setup)
Commit: 31c37ee8f63491495ac49e43b8544550fbae4533
Date: 2024-02-07T09:08:20.941Z
Electron: 27.2.3
ElectronBuildId: 26495564
Chromium: 118.0.5993.159
Node.js: 18.17.1
V8: 11.8.172.18-electron.0
OS: Windows_NT x64 10.0.19045
Calva version used: v2.0.411
clojure-lsp version used: 2023.01.26-11.08.16
clj-kondo version used: 2023.01.20 (edited)we have a logic at clojure-lsp that probes the process and if the process is not live for 5s we kill server process
Is there anything I can do about that?
I also tried an older version on Calva and still had the same problem
And the same version on another notebook works ok
That's weird, something only on your system, is that a different Linux or something?
It windows 10
I have the whole clojure-lsp log if you want it, There is an warning with lots of data in it but after that warning the server still seem to receive and send message but I guess it is the parent process of the server that is the issue but I don;t know how to check that
Aha, I can look for that///
Is this what you are looking for?
[Trace - 4:28:04 PM] Sending request 'initialize - (0)'.
Params: {
"processId": 31660,
"clientInfo": {
"name": "Visual Studio Code",
"version": "1.86.1"
},
"locale": "en-us",
"rootPath": "c:\\Users\\eric_\\OneDrive - Raboweb\\Clojure\\okr-genie-lum1",
"rootUri": "file:///c%3A/Users/eric_/OneDrive%20-%20Raboweb/Clojure/okr-genie-lum1",
"capabilities": {
"workspace": {
"applyEdit": true,
"workspaceEdit": {
"documentChanges": true,
Yes, now you need to check if that processId is really running in your machine and not being killed for anything
Thanks ericdallo, that clue really helps, I've narrowed it down to the tasklist shell command that gives:
ERROR: Invalid class
on the system with the issue and work fine on the other system. I'll investigate this further and let you know when I find the root cause.Fixed 😄 by fixing the tasklist error by following the instructions in https://learn.microsoft.com/en-us/answers/questions/203461/tasklist-error-in-windows-10-pro No clue what caused this issue (as recently everything was working fine) but clojure-lsp is not to blame! Again thanks for your marvelous support, you keep amazing me and you made my day 🙂.
Happy you got it working! Now at least we are aware of that this task list issue is a thing.
@U0ETXRFEW @UKFSJSM38 Just fyi, I just had another issue with clojure-lsp disconnecting from the server. Again it was due to the tasklist command failing but this time it had a different cause: I stopped the 'Windows Management Instrumentation' service (for a unrelated reason) and as it turns out, the tasklist command requires this service to be running. Just for the record if anyone else will run into this issue.