redhat-developer / lsp4ij

LSP Client for IntelliJ
Eclipse Public License 2.0
107 stars 23 forks source link

`window/showMessage` no longer showing popups in 0.4.0? #457

Closed bzoracler closed 3 months ago

bzoracler commented 3 months ago

I installed the nightly build (https://plugins.jetbrains.com/plugin/23257-lsp4ij/versions/nightly/588005), and PyCharm is no longer popping up with notification balloons for window/showMessage.

The trace is still there:

[Trace - 16:48:24] Received notification 'window/showMessage'
Params: {
  "type": 1,
  "message": "HELLO!"
}

Downgrading to v0.3.0 from the JetBrains Market Place works as expected:

image


Operating System: Windows 11 Home IDE: PyCharm 2024.2 Professional Edition, Build #PY-242.20224.347

I only installed instrumented-lsp4ij-0.4.0-20240815-013110.jar, not any of the others in the nightly build:

annotations-24.0.1.jar
autolink-0.6.0.jar
flexmark-0.64.8.jar
flexmark-ext-autolink-0.64.8.jar
flexmark-ext-gfm-strikethrough-0.64.8.jar
flexmark-ext-tables-0.64.8.jar
flexmark-util-0.64.8.jar
flexmark-util-ast-0.64.8.jar
flexmark-util-builder-0.64.8.jar
flexmark-util-collection-0.64.8.jar
flexmark-util-data-0.64.8.jar
flexmark-util-dependency-0.64.8.jar
flexmark-util-format-0.64.8.jar
flexmark-util-html-0.64.8.jar
flexmark-util-misc-0.64.8.jar
flexmark-util-options-0.64.8.jar
flexmark-util-sequence-0.64.8.jar
flexmark-util-visitor-0.64.8.jar
gson-2.10.1.jar
jsoup-1.17.1.jar
org.eclipse.lsp4j-0.21.1.jar
org.eclipse.lsp4j.jsonrpc-0.21.1.jar
searchableOptions-0.4.0-20240815-013110.jar
zt-zip-1.14.jar
bzoracler commented 3 months ago

IntelliJ logs show this on the nightly build:

2024-08-15 16:29:35,840 [ 838709]   WARN - org.eclipse.lsp4j.jsonrpc.RemoteEndpoint - Notification threw an exception: {
  "jsonrpc": "2.0",
  "method": "window/showMessage",
  "params": {
    "type": 1,
    "message": "HELLO!"
  }
}
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:67)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.notify(GenericEndpoint.java:152)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.handleNotification(RemoteEndpoint.java:220)
    at org.eclipse.lsp4j.jsonrpc.RemoteEndpoint.consume(RemoteEndpoint.java:187)
    at com.redhat.devtools.lsp4ij.LanguageServerWrapper.lambda$start$1(LanguageServerWrapper.java:260)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)
    at java.base/java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796)
    at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:507)
    at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1491)
    at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:2073)
    at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2035)
    at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
    at java.base/java.lang.reflect.Method.invoke(Method.java:580)
    at org.eclipse.lsp4j.jsonrpc.services.GenericEndpoint.lambda$recursiveFindRpcMethods$0(GenericEndpoint.java:65)
    ... 11 more
Caused by: java.lang.NoClassDefFoundError: com/vladsch/flexmark/util/data/DataHolder
    at com.redhat.devtools.lsp4ij.ServerMessageHandler.showMessage(ServerMessageHandler.java:89)
    at com.redhat.devtools.lsp4ij.client.LanguageClientImpl.showMessage(LanguageClientImpl.java:91)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
    ... 13 more
Caused by: java.lang.ClassNotFoundException: com.vladsch.flexmark.util.data.DataHolder PluginClassLoader(plugin=PluginDescriptor(name=LSP4IJ, id=com.redhat.devtools.lsp4ij, descriptorPath=plugin.xml, path=~\AppData\Roaming\JetBrains\PyCharm2024.2\plugins\instrumented-lsp4ij-0.4.0-20240815-013110.jar, version=0.4.0-20240815-013110, package=null, isBundled=false), packagePrefix=null, state=active, parents=PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.impl, descriptorPath=intellij.platform.vcs.impl.xml, path=~\AppData\Local\Programs\PyCharm Professional\lib, version=242.20224.347, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.log.impl, descriptorPath=intellij.platform.vcs.log.impl.xml, path=~\AppData\Local\Programs\PyCharm Professional\lib, version=242.20224.347, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.vcs.dvcs.impl, descriptorPath=intellij.platform.vcs.dvcs.impl.xml, path=~\AppData\Local\Programs\PyCharm Professional\lib, version=242.20224.347, package=null, isBundled=true), PluginDescriptor(name=IDEA CORE, id=com.intellij, moduleName=intellij.platform.collaborationTools, descriptorPath=intellij.platform.collaborationTools.xml, path=~\AppData\Local\Programs\PyCharm Professional\lib, version=242.20224.347, package=null, isBundled=true), PluginDescriptor(name=TextMate Bundles, id=org.jetbrains.plugins.textmate, descriptorPath=plugin.xml, path=~\AppData\Local\Programs\PyCharm Professional\plugins\textmate, version=242.20224.347, package=null, isBundled=true), )
    at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.kt:157)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
    ... 16 more
angelozerr commented 3 months ago

I dont understand , is it working with 0.3.0?

It seems it doesnt find flexmark which should be embed with lsp4ij?

bzoracler commented 3 months ago

Sorry, I installed the plugin wrong - instead of installing the zip, I installed the jar. My mistake.

It's working now.

angelozerr commented 3 months ago

Why are you using zip?

Please read Testing nightly builds section from the README to avoid installing with zip