-
Notifications
You must be signed in to change notification settings - Fork 18k
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
x/tools/gopls: client not receiving messages from server #46694
Comments
After following the instructions posted: https://gophers.slack.com/archives/C2B4L99RS/p1623424302142500 I have the following logs: None of the other log outputs in VS code seem to have anything interesting, most are empty or just a few lines. This is the entire project on one screen: I opened VS Code from my terminal: |
From those instructions--do you have the |
And one more thing to try after this, is to delete the wrapper script and the "go.languageServerFlags": [
"-remote=auto",
"-rpc.trace",
] If |
Ah, I had forgotten to make the script an executable and therefore wasn't getting I also tried adding the '"-remote=auto",' in there and it seems to somewhat alleviate the problem? It's a bit strange, I can still reproduce the loading packages sometimes but not 100% of the time. It seems to help most on the smaller test projects than on the big project (I haven't got the big project working at all yet) but my data points are fairly limited and it's hard to say for sure. |
That's the problem. Writing CANCEL to stdout breaks the jsonrpc2 stream. |
I'm guessing that even when operating as a thin forwarder, gopls can hit some context cancellations. Whelp, mystery solved. Please re-build gopls with a clean GOROOT. |
Oh wow! Thank you so much for your help, that indeed fixed the problem! I cleaned up cached modules ( Sorry for the weird issue and thanks for your time @stamblerre and @findleyr! |
First reported on Slack.
(From 2 different runs)
Client side: https://gophers.slack.com/files/T029RQSE6/F024HF0KRQE?origin_team=T029RQSE6.
Server side: https://gophers.slack.com/files/T029RQSE6/F024HECSV7Y?origin_team=T029RQSE6.
The next step in investigation is to log jsonrpc2 bytes to files to understand what is actually happening over the wire.
The text was updated successfully, but these errors were encountered: