Exception on workspace/didChangeConfiguration messages
tdcook opened this issue · comments
Describe the bug
The server throws an exception java.lang.Exception: Unable to resolve spec: :lsp4clj.coercer/change-configration-of-error
when receiving a workspace/didChangeConfiguration
message. This causes the server to crash and eglot to get stuck in an infinite reconnection loop.
To Reproduce
Steps to reproduce the behavior:
- Open a project using emacs + eglot
- Run clojure-lsp
- See error
Expected behavior
No exception is thrown and the server handles the message properly.
clojure-lsp output
2024-03-03T01:04:49.399Z ERROR [clojure-lsp.server:410] - Conformation exception :lsp4clj.coercer/change-configration-of-error com.oracle.svm.core.posix.thread.PosixPlatformThreads.pthreadStartRoutine PosixPlatformThreads.java: 211 com.oracle.svm.core.thread.PlatformThreads.threadStartRoutine PlatformThreads.java: 833 java.lang.Thread.run Thread.java: 1583 java.lang.Thread.runWith Thread.java: 1596 java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 642 java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1144 java.util.concurrent.CompletableFuture$AsyncSupply.run CompletableFuture.java: 1768 promesa.util.Supplier/get util.cljc: 34 promesa.exec/wrap-bindings/fn exec.cljc: 163 clojure-lsp.server/fn/fn server.clj: 410 lsp4clj.coercer/conform-or-log coercer.clj: 491 clojure.spec.alpha/conform alpha.clj: 171 clojure.spec.alpha/specize alpha.clj: 159 clojure.spec.alpha/fn/G alpha.clj: 128 clojure.spec.alpha/fn alpha.clj: 139 clojure.spec.alpha/reg-resolve! alpha.clj: 76 java.lang.Exception: Unable to resolve spec: :lsp4clj.coercer/change-configration-of-error2024-03-03T01:04:54.095Z INFO [clojure-lsp.server:55] - Liveness probe - Parent process 2 is not running - exiting server
2024-03-03T01:04:54.095Z INFO [clojure-lsp.server:496] - Exiting...
User details (please complete the following information):
- OS: Fedora Linux 39 + Emacs 29.1 + eglot
- Version: clojure-lsp 2024.03.01-11.37.51
Additional context
It seems that the change-configration-of-error
does not exist in lsp4clj.coercer.
@tdcook Fixed on master/nightly build, but I'd say this should not crash the server or affect client as this is a async notification handled by server, could you test with eglot later ?
@ericdallo That did resolve the exception. I'm still seeing the server crashing, but I don't see any error in the logs that would explain it. It might be an issue with my setup. I'll do more investigation.
I figured out the problem. The liveness probe was being given the incorrect process id since I am running in containers. I had to set eglot-withhold-process-id
.