When I open a go file with activated modules I get the following error in VIM.

Whenever I change to another line in the code I get the error again
The error comes from vim-go and points to here: https://github.com/fatih/vim-go/blob/master/autoload/go/lsp.vim#L594
Why do I get the error and how can I fix the problem? Thanks!
1.20
:version):8.1.1635
go version):1.12.5
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/jan/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/jan/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/jan/Projects/mymusic/mp3db/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build260878572=/tmp/go-build -gno-record-gcc-switches"
gopls and vim-go have each changed quite a bit since vim-go v1.20. vim-go's master is pretty stable right now; I recommend upgrading to vim-go's master, running :GoUpdateBinaries gopls, restart vim afterwards and see if you still have problems.
I just updated yesterday all of my Vim-Plugins and also executed :GoInstallBinaries. But today I tried your tip with :GoUpdateBinaries gopls and it helped! Thank you very much!
I'm still seeing this with latest vim-go and gopls. When I enable let g:go_auto_type_info = 1 and hover the cursor on import statements, such errors show up.
import (
"net/http"
)
I'm still seeing this with latest
vim-goandgopls. When I enablelet g:go_auto_type_info = 1and hover the cursor on import statements, such errors show up.import ( "net/http" )
I just started running into this too, after recently updating gopls.
To be fair, the gopls utility is rapidly changing, so it might just be a new error condition for it.
Most helpful comment
I'm still seeing this with latest
vim-goandgopls. When I enablelet g:go_auto_type_info = 1and hover the cursor on import statements, such errors show up.