golang / vscode-go

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

gopls: automated issue report (initialization) #3105

Closed ghost closed 8 months ago

ghost commented 9 months ago

gopls version: v0.14.2 gopls flags: extension version: 0.40.1 environment: VSCodium linux initialization error: Error: JSON RPC parse error: json: cannot unmarshal bool into Go struct field RenameClientCapabilities.capabilities.textDocument.rename.prepareSupportDefaultBehavior of type protocol.PrepareSupportDefaultBehavior manual restart count: 0 total start count: 1

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

Starting client failed
  Message: JSON RPC parse error: json: cannot unmarshal bool into Go struct field RenameClientCapabilities.capabilities.textDocument.rename.prepareSupportDefaultBehavior of type protocol.PrepareSupportDefaultBehavior
  Code: -32700 
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 9 months ago

Thanks for the report @tarzacol I am guessing this is a transient or stale error triggered from an old version of extension or editor. (prepareSupportDefaultBehavior had been switched from bool to a struct type a couple of years ago) If you are still experiencing the same issue, please make sure the extension and the vscodium are both up to date. If you still experience the problem, please set "go.trace.server": "verbose" and capture the LSP message logs ("Output: Show Output Channel" and select the "gopls" channel) and share it with us.

gopherbot commented 8 months ago

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)