-
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
Exception occurred after sending textDocument/completion request. #3116
Comments
I think this is actually a bug in our implementation that we should be fixing. According to the spec :
That question mark indicates the value is optional and need not be defined. However, we're clearly accessing it without checking whether it exists (line 430) : Lines 421 to 431 in df60479
The lines immediately above show the right way to do it. As a workaround, @TherCN , could you try setting defining :
at https://github.com/TherCN/LSPClient-Example/blob/main/app/src/main/java/com/example/MainActivity.java#L305 and see if that temporarily fixes it ? |
Thank you for your help. After I added the code, it didn't return an exception, but it didn't return a completion request either. |
Would you be able to attach a log of the client requests that are made to the server as well as how the server responds ? The client would need to at least call |
|
I added the |
Good catch. Yeah according to https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#requestMessage , In terms of debugging such issues in the future, you could start the language server to have it listening for a debugger, connect to it remotely so that you'd be able to see what's going wrong. I mention this in #2313 (comment) . This would have probably allowed you to debug where the To do this just make sure you add something like |
OS:Android 10
Java Version:17
Run Command:
The code to send the request is in: MainActivity.java
And I returned an exception when sending textDocument/completion, as down:
I tried this problem in versions 1.32.0 and 1.33.0 and 1.34.0snapshot respectively. How can I solve it?
The text was updated successfully, but these errors were encountered: