openhab / openhab-vscode

VS Code extension for openHAB configuration files
https://marketplace.visualstudio.com/items?itemName=openhab.openhab
Eclipse Public License 2.0
159 stars 47 forks source link

Request textDocument/hover failed #295

Open Alexaas opened 1 year ago

Alexaas commented 1 year ago

Hi,

when working on rules with the openhab extension for vscode the following error pops up all the time in the OUTPUT console: [Error - 07:14:27] Request textDocument/hover failed. Message: Internal error. Code: -32603 java.util.concurrent.CompletionException: java.lang.NullPointerException at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:331) at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:346) at java.base/java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:704) at java.base/java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) at java.base/java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:2088) at org.eclipse.xtext.ide.server.concurrent.AbstractRequest.logAndCompleteExceptionally(AbstractRequest.java:73) at org.eclipse.xtext.ide.server.concurrent.ReadRequest.lambda$doRun$0(ReadRequest.java:69) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:829) Caused by: java.lang.NullPointerException at org.eclipse.xtext.ide.server.WorkspaceManager.getDocument(WorkspaceManager.java:455) at org.eclipse.xtext.ide.server.WorkspaceManager.doRead(WorkspaceManager.java:437) at org.eclipse.xtext.ide.server.LanguageServerImpl.hover(LanguageServerImpl.java:718) at org.eclipse.xtext.ide.server.LanguageServerImpl.lambda$hover$30(LanguageServerImpl.java:705) at org.eclipse.xtext.ide.server.concurrent.ReadRequest.lambda$doRun$0(ReadRequest.java:66) ... 5 more

openhab extension version 1.0.0 vscode: 1.69.1 on Windows 10

Confectrician commented 1 year ago

This is an error produced by the lsp server running on the openhab instance self. See #274 or #269 for different other erros that are related with the lsp server.

Nothing we can really do on the client side here. (Except disabling the remote lsp via setting). LSP would need a complete rewrite on both sides.