-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Language server sending improper data leading to connection failure #2837
Comments
The following patch seems to fix the crashes for me, but not the error logs when I run the server via cli. It would certainly make sense. Maybe some configurators are attempting to log onto the stream we're using for client/server interaction ? diff --git a/org.eclipse.jdt.ls.logback.appender/src/org/eclipse/jdt/ls/logback/appender/JavaLsConfigurator.java b/org.eclipse.jdt.ls.logback.appender/src/org/eclipse/jdt/ls/logback/appender/JavaLsConfigurator.java
index 2def9c8a..73b761fa 100644
--- a/org.eclipse.jdt.ls.logback.appender/src/org/eclipse/jdt/ls/logback/appender/JavaLsConfigurator.java
+++ b/org.eclipse.jdt.ls.logback.appender/src/org/eclipse/jdt/ls/logback/appender/JavaLsConfigurator.java
@@ -55,6 +55,6 @@ public class JavaLsConfigurator extends ContextAwareBase implements Configurator
defMavenFilter.setLevel(Level.INFO);
defMavenFilter.setAdditive(false);
}
- return ExecutionStatus.INVOKE_NEXT_IF_ANY;
+ return ExecutionStatus.DO_NOT_INVOKE_NEXT_IF_ANY;
}
} |
@rgrunber Java LS logging works with your patch. Could you create a PR? |
I can confirm it works, but I don't think it's the whole solution. Even with my patch I still see the following being spit out :
Those log messages don't seem to affect anything, but I also noticed that the error I produced via cli at #2831 (comment) still occurs. I guess it's better than the current situation though so I'll create a PR. |
Nevemind. The error I was seeing when interacting via CLI :
has always been there! It's just that we never reported it because the logging facility wasn't working correctly. I guess my PR should fix things. |
@rgrunber Thanks for the fix.
|
Just to close the loop on #2837 (comment) . The error I was seeing was entirely a misunderstanding on my part regarding the protocol. I was hitting Enter ( The solution is to use |
I'm getting this error while attaching jdtls server to the current buffer in nvim. How do I fix this? |
Can you post logs of what you're seeing when you attach ? What's the actual error ? |
As discussed on #2831 (comment) and demonstrated on #2831 (comment), there seems to be a regression introduced by m2e logging dependencies that cause improper messaging in the client/server communication. I can confirm some of the failures I've seen while running child instances can also reproduce it.
Sometimes like this :
The text was updated successfully, but these errors were encountered: