golang / vscode-go

Go extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=golang.Go
Other
3.9k stars 755 forks source link

gopls: automated issue report (initialization) #3596

Open karvir26 opened 1 week ago

karvir26 commented 1 week ago

gopls version: v0.9.1/go1.23.3 gopls flags: --check-go-version=false update flags: off extension version: 0.42.1 environment: Visual Studio Code linux initialization error: Error: Pending response rejected since connection got disposed issue timestamp: Mon, 11 Nov 2024 11:53:47 GMT restart history: Mon, 11 Nov 2024 11:28:39 GMT: activation (enabled: true) Mon, 11 Nov 2024 11:30:30 GMT: manual (enabled: true) Mon, 11 Nov 2024 11:46:51 GMT: installation (enabled: true) Mon, 11 Nov 2024 11:51:34 GMT: config change (enabled: false) Mon, 11 Nov 2024 11:52:18 GMT: config change (enabled: true) Mon, 11 Nov 2024 11:53:47 GMT: config change (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

Please attach the stack trace from the crash. A window with the error message should have popped up in the lower half of your screen. Please copy the stack trace and error messages from that window and paste it in this issue. Failed to auto-collect gopls trace: no gopls log.
gopls stats -anon gopls stats -anon failed after 60 ms. Please check if gopls is killed by OS.
OPTIONAL: If you would like to share more information, you can attach your complete gopls logs. NOTE: THESE MAY CONTAIN SENSITIVE INFORMATION ABOUT YOUR CODEBASE. DO NOT SHARE LOGS IF YOU ARE WORKING IN A PRIVATE REPOSITORY.
hyangah commented 1 week ago

--check-go-version=false is not a valid gopls flag. Can you please check your vscode setting?

And, also it looks like the gopls version is very old. (v0.9.1) The latest version is v0.16.x currently. Looks like the extension tried to update at some point, but the gopls is still stuck in the old version. Can you share what was printed in the "Go" Output channel?