Skip to content
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: <gopls crashed> #39996

nicofr83 opened this issue Jul 2, 2020 · 6 comments

x/tools/gopls: <gopls crashed> #39996

nicofr83 opened this issue Jul 2, 2020 · 6 comments


Copy link

@nicofr83 nicofr83 commented Jul 2, 2020

ATTENTION: Please answer these questions BEFORE submitting your issue. Thanks!

What did you do?

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on is better.
A failing unit test is the best.

What did you expect to see?

process goals crash.
It seems to run if I start it in terminal : goals --serve

What did you see instead?

Error message saying that goals crashed....

[Info - 9:11:55 AM] Connection to server got closed. Server will restart.
gopls: Unknown command vs-kubernetes
The Go Language source tools.

Usage: gopls [flags] [command-flags] [command-args]

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.

Available commands are:

serve : run a server for Go code using the Language Server Protocol
version : print the gopls version information
bug : report a bug in gopls

check : show diagnostic results for the specified file
definition : show declaration of selected identifier
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
inspect : inspect server state (daemon mode only)
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
signature : display selected identifier's signature
fix : apply suggested fixes
symbols : display selected file's symbols
workspace_symbol : search symbols in workspace

gopls flags are:

Build info

I removed all go extensions
Reinstall only the go extensions

vscode standard (not daily build) up to date
osx Catalina
go 1.14.3 (but I got this problem with go 1.14 as well)

I have the following extensions installed

go 0.15
Kubernetes 1.21
pgFormatter 1.14.0
remote container (ms) 0.122.1
remote-ssh/remote ssh config file v0.51
vscode position 1.0.1
yaml 0.80 0.4.2 h1:SPpw/YOMhYKB5TjtZj77ddcTDQkpkUZtw4+0jtVYwro= h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0= h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= h1:vcxGaoTs7kV8m5Np9uUNQin4BrLOthgV7252N8V+FwY= h1:0YooLLGGxVRx2qHHVzitbm1g2pS6ar7dW2nO8aEiOdA= h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=

Go info

go version go1.14.3 darwin/amd64

Copy link

@gopherbot gopherbot commented Jul 2, 2020

Thank you for filing a gopls issue! Please take a look at the Troubleshooting guide, and make sure that you have provided all of the relevant information here.

@gopherbot gopherbot added this to the Unreleased milestone Jul 2, 2020
Copy link

@stamblerre stamblerre commented Jul 2, 2020

Can you please share your VS Code settings? You can access them through the Command Palette (Ctrl + Shift + P) -> Preferences: Open Settings (JSON).

@stamblerre stamblerre modified the milestones: Unreleased, gopls/v0.5.0 Jul 2, 2020
Copy link

@nicofr83 nicofr83 commented Jul 2, 2020

Sorry, forgotten this...

"window.zoomLevel": 4,
"files.autoSave": "afterDelay",
"editor.formatOnSave": true,
"go.useLanguageServer": true,
"explorer.confirmDragAndDrop": false,
"typescript.updateImportsOnFileMove.enabled": "always",
"go.autocompleteUnimportedPackages": true,
"go.coverOnSave": true,
"go.coverageDecorator": {
"type": "highlight",
"coveredHighlightColor": "rgba(64,128,128,0.5)",
"uncoveredHighlightColor": "rgba(128,64,64,0.25)",
"coveredGutterStyle": "blockgreen",
"uncoveredGutterStyle": "blockred"
"go.coverOnSingleTest": true,
"vs-kubernetes": {
"vs-kubernetes.minikube-path.mac": "/Users/nico/.vs-kubernetes/tools/minikube/darwin-amd64/minikube",
"vs-kubernetes.helm-path.mac": "/Users/nico/.vs-kubernetes/tools/helm/darwin-amd64/helm",
"vs-kubernetes.draft-path.mac": "/Users/nico/.vs-kubernetes/tools/draft/darwin-amd64/draft"
"go.languageServerFlags": [
"editor.formatOnType": true,
"go.coverageOptions": "showUncoveredCodeOnly",
"go.coverOnSingleTestFile": true,
"go.lintOnSave": "file",
"merge-conflict.autoNavigateNextConflict.enabled": true,
"git.autofetch": true,
"go.formatTool": "goimports"

Copy link

@nicofr83 nicofr83 commented Jul 2, 2020

I have docker on OSX with Kubernetes...
docker v2.3.0.3
Kubernetes: v 1.16.5


Copy link

@hyangah hyangah commented Jul 2, 2020

@nicofr83 Thanks for providing the details!

According to the log , gopls crashed with an error
gopls: Unknown command vs-kubernetes.

From your settings, I see

"go.languageServerFlags": [

That's how gopls got the problematic arguments, and failed to start. Please remove that and try again (⇧⌘P -> Go: Restart Language Server, or Developer: Reload Window).

Copy link

@nicofr83 nicofr83 commented Jul 2, 2020

It is fixed,
thanks a lot, you made my day !!!

@nicofr83 nicofr83 closed this Jul 2, 2020
@stamblerre stamblerre modified the milestones: gopls/v0.5.0, gopls/v0.4.4 Jul 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants