Skip to content

Known Problems

Sören Domrös edited this page Aug 16, 2022 · 3 revisions

Make sure to add the problems you encountered as a developer in here for future reference.

My LS does not show the connection message

Connection to: localhost:5007
Starting language server socket

You might have forgotten to set the correct VM argument to specify a port or the class that handles the connection is somehow not included or broken. Search whether the string System.getProperty("port") is somehow used in your application.

Your address is already in use

Connection to: localhost:5007
Starting language server socket
Exception in thread "Thread-0" java.net.BindException: Address already in use
    at java.base/sun.nio.ch.Net.bind0(Native Method)
    at java.base/sun.nio.ch.Net.bind(Net.java:455)
    at java.base/sun.nio.ch.Net.bind(Net.java:447)
    at java.base/sun.nio.ch.AsynchronousServerSocketChannelImpl.bind(AsynchronousServerSocketChannelImpl.java:164)
    at java.base/java.nio.channels.AsynchronousServerSocketChannel.bind(AsynchronousServerSocketChannel.java:198)
    at de.cau.cs.kieler.klighd.lsp.launch.AbstractLanguageServer.run(AbstractLanguageServer.java:172)
    at de.cau.cs.kieler.klighd.lsp.launch.AbstractLanguageServer.lambda$0(AbstractLanguageServer.java:85)
    at java.base/java.lang.Thread.run(Thread.java:829)

Some other LS you started previously is using this connection. Maybe you configured a watcher to have a better look at the LSP messages. Either way, something is running on your port. Find it and kill it or change the port 5007 to a free port.

You can kill it via fuser -k 5007/tcp

Some binding error or NPE when connecting via a client application

You might miss some projects/folders in your classpath

Your new language server extension is not loaded

When creating a language extension as a new plug-in, the run configuration must be updated. Under the dependencies tab of the run configuration the classpath entries must be selected. Now select "Add Projects.." and add the new plug-in. Additionally, click on "Advanced.." and select "Add Folders". Now select the new plug-in again.

Server Client Message with only a list as parameter only returns the first element

A message from server to client that should only contain a list cannot be defined standardly. When sending this notification:

@JsonNotification("verification/properties")
    def void sendVerificationProperties(Object props)

with props as a list, this is interpreted as a list of parameters to send instead of one parameter that is a list. This can be seen in Wireshark: Screenshot (4)

Dirty Workaround:

@JsonNotification("verification/properties")
    def void sendVerificationProperties(Object props, String dummy)

Good Workaround: Create a wrapper class for the list.