golang / vscode-go

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

gopls: automated issue report (initialization) #3405

Closed GHITony closed 1 month ago

GHITony commented 1 month ago

gopls version: v0.15.3/go1.22.3 gopls flags: rpc.trace -logfile /tmp/gopls.log update flags: proxy extension version: 0.41.4 environment: Visual Studio Code linux initialization error: Error: Pending response rejected since connection got disposed issue timestamp: Sun, 26 May 2024 17:54:04 GMT restart history: Sun, 26 May 2024 17:54:04 GMT: activation (enabled: true)

ATTENTION: PLEASE PROVIDE THE DETAILS REQUESTED BELOW.

Describe what you observed.

gopls client: couldn't create connection to server.
  Message: Pending response rejected since connection got disposed
  Code: -32097 
gopls stats -anon { "DirStats": { "Files": 58, "TestdataFiles": 0, "GoFiles": 15, "ModFiles": 9, "Dirs": 45 }, "GOARCH": "amd64", "GOOS": "linux", "GOPACKAGESDRIVER": "", "GOPLSCACHE": "", "GoVersion": "go1.22.3", "GoplsVersion": "v0.15.3", "InitialWorkspaceLoadDuration": "37.83793ms", "MemStats": { "HeapAlloc": 3002376, "HeapInUse": 5472256, "TotalAlloc": 10946200 }, "WorkspaceStats": { "Files": { "Total": 0, "Largest": 0, "Errs": 0 }, "Views": [ { "GoCommandVersion": "go1.22.3", "AllPackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "WorkspacePackages": { "Packages": 0, "LargestPackage": 0, "CompiledGoFiles": 0, "Modules": 0 }, "Diagnostics": 0 } ] } }
gopls: Unknown command rpc.trace gopls is a Go language server. It is typically used with an editor to provide language features. When no command is specified, gopls will default to the 'serve' command. The language features can also be accessed via the gopls command-line interface. Usage: gopls help [] Command: Main serve run a server for Go code using the Language Server Protocol version print the gopls version information bug report a bug in gopls help print usage information for subcommands api-json print JSON describing gopls API licenses print licenses of included software Features call_hierarchy display selected identifier's call hierarchy check show diagnostic results for the specified file codelens List or execute code lenses for a file definition show declaration of selected identifier execute Execute a gopls custom LSP command folding_ranges display selected file's folding ranges format format the code according to the go standard highlight display selected identifier's highlights implementation display selected identifier's implementation imports updates import statements remote interact with the gopls daemon inspect interact with the gopls daemon (deprecated: use 'remote') links list links in a file prepare_rename test validity of a rename operation at location references display selected identifier's references rename rename selected identifier semtok show semantic tokens for the specified file signature display selected identifier's signature stats print workspace statistics fix apply suggested fixes symbols display selected file's symbols workspace_symbol search symbols in workspace flags: -debug=string serve debug information on the supplied address -listen=string address on which to listen for remote connections. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. Otherwise, TCP is used. -listen.timeout=duration when used with -listen, shut down the server when there are no connected clients for this duration -logfile=string filename to log to. if value is "auto", then logging to a default output file is enabled -mode=string no effect -ocagent=string the address of the ocagent (e.g. http://localhost:55678), or off (default "off") -port=int port on which to run gopls for debugging purposes -profile.alloc=string write alloc profile to this file -profile.cpu=string write CPU profile to this file -profile.mem=string write memory profile to this file -profile.trace=string write trace log to this file -remote=string forward all commands to a remote lsp specified by this flag. With no special prefix, this is assumed to be a TCP address. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. If 'auto', or prefixed by 'auto;', the remote address is automatically resolved based on the executing environment. -remote.debug=string when used with -remote=auto, the -debug value used to start the daemon -remote.listen.timeout=duration when used with -remote=auto, the -listen.timeout value used to start the daemon (default 1m0s) -remote.logfile=string when used with -remote=auto, the -logfile value used to start the daemon -rpc.trace print the full rpc trace in lsp inspector format -v,-verbose verbose output -vv,-veryverbose very verbose output [Info - 01:54:04] true [Error - 01:54:04] gopls client: couldn't create connection to server. Message: Pending response rejected since connection got disposed Code: -32097 gopls: Unknown command rpc.trace gopls is a Go language server. It is typically used with an editor to provide language features. When no command is specified, gopls will default to the 'serve' command. The language features can also be accessed via the gopls command-line interface. Usage: gopls help [] Command: Main serve run a server for Go code using the Language Server Protocol version print the gopls version information bug report a bug in gopls help print usage information for subcommands api-json print JSON describing gopls API licenses print licenses of included software Features call_hierarchy display selected identifier's call hierarchy check show diagnostic results for the specified file codelens List or execute code lenses for a file definition show declaration of selected identifier execute Execute a gopls custom LSP command folding_ranges display selected file's folding ranges format format the code according to the go standard highlight display selected identifier's highlights implementation display selected identifier's implementation imports updates import statements remote interact with the gopls daemon inspect interact with the gopls daemon (deprecated: use 'remote') links list links in a file prepare_rename test validity of a rename operation at location references display selected identifier's references rename rename selected identifier semtok show semantic tokens for the specified file signature display selected identifier's signature stats print workspace statistics fix apply suggested fixes symbols display selected file's symbols workspace_symbol search symbols in workspace flags: -debug=string serve debug information on the supplied address -listen=string address on which to listen for remote connections. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. Otherwise, TCP is used. -listen.timeout=duration when used with -listen, shut down the server when there are no connected clients for this duration -logfile=string filename to log to. if value is "auto", then logging to a default output file is enabled -mode=string no effect -ocagent=string the address of the ocagent (e.g. http://localhost:55678), or off (default "off") -port=int port on which to run gopls for debugging purposes -profile.alloc=string write alloc profile to this file -profile.cpu=string write CPU profile to this file -profile.mem=string write memory profile to this file -profile.trace=string write trace log to this file -remote=string forward all commands to a remote lsp specified by this flag. With no special prefix, this is assumed to be a TCP address. If prefixed by 'unix;', the subsequent address is assumed to be a unix domain socket. If 'auto', or prefixed by 'auto;', the remote address is automatically resolved based on the executing environment. -remote.debug=string when used with -remote=auto, the -debug value used to start the daemon -remote.listen.timeout=duration when used with -remote=auto, the -listen.timeout value used to start the daemon (default 1m0s) -remote.logfile=string when used with -remote=auto, the -logfile value used to start the daemon -rpc.trace print the full rpc trace in lsp inspector format -v,-verbose verbose output -vv,-veryverbose very verbose output [Error - 01:54:04] [Error - 01:54:04] gopls client: couldn't create connection to server. Message: Pending response rejected since connection got disposed Code: -32097 Error starting language server: Error: Pending response rejected since connection got disposed
hyangah commented 1 month ago

Please check go.languageServerFlags setting. "rpc.trace" should be "-rpc.trace".