zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
49.18k stars 2.98k forks source link

Could not install the Go language server 'gopls', because 'Go' was not found #20061

Closed huhu415 closed 2 hours ago

huhu415 commented 2 hours ago

Check for existing issues

Describe the bug / provide steps to reproduce it

When i ssh openwrt, this is working, I can see the file directory, and the contents of the file, but I can't jump to the function definition. I was prompted Could not install the Go language server 'gopls', because 'Go' was not found, but my openwrt has go in it.

oh, my macos has go, it is work well on location on zed.

Environment

openwrt:

[root@Kwrt:02:57 PM ~/project/uaProxy] # go version
go version go1.23.2 linux/amd64

[root@Kwrt:02:58 PM ~/project/uaProxy] # which go
/usr/local/go/bin/go

goenv : 
GO111MODULE='on'
GOARCH='amd64'
GOBIN=''
GOCACHE='/root/.cache/go-build'
GOENV='/root/.config/go/env'
GOEXE=''
GOEXPERIMENT=''
GOFLAGS=''
GOHOSTARCH='amd64'
GOHOSTOS='linux'
GOINSECURE=''
GOMODCACHE='/root/go/pkg/mod'
GONOPROXY=''
GONOSUMDB=''
GOOS='linux'
GOPATH='/root/go'
GOPRIVATE=''
GOPROXY='https://goproxy.cn'
GOROOT='/usr/local/go'
GOSUMDB='sum.golang.org'
GOTMPDIR=''

macos zed config (part)

    {
      "host": "192.168.6.220",
      "username": "root",
      "projects": [
        {
          "paths": ["~/project/uaProxy"]
        }
      ],
      "upload_binary_over_ssh": true
    }

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your Zed.log file to this issue.

Caused by: 0: failed to read message from stdout 1: unexpected end of file, terminating... 2024-11-01T14:47:03.562323+08:00 [ERROR] (remote proxy) exiting due to error: stdout_task failed 2024-11-01T14:47:03.568216+08:00 [WARN] ssh heartbeat: connection activity channel has been dropped. stopping. 2024-11-01T14:47:03.568468+08:00 [ERROR] proxy process terminated unexpectedly 2024-11-01T14:47:13.176055+08:00 [INFO] downloading zed-remote-server linux x86_64 version 0.159.7 2024-11-01T14:47:18.477167+08:00 [INFO] remote development server present and matching client version 2024-11-01T14:47:18.570369+08:00 [ERROR] client:unhandled ssh message name:UpdateProject 2024-11-01T14:47:30.721922+08:00 [ERROR] (remote server) no cached binary 2024-11-01T14:47:30.72208+08:00 [ERROR] (remote server) Failed to start language server "gopls": cannot install gopls 2024-11-01T14:47:30.722169+08:00 [ERROR] (remote server) server stderr: "" 2024-11-01T14:48:50.929762+08:00 [INFO] open paths ["/Users/hello/.config/zed/settings.json"] 2024-11-01T14:48:50.931927+08:00 [INFO] attempting to start language server "json-language-server", path: "/Users/hello/.config/zed/settings.json", id: 3 2024-11-01T14:48:50.932033+08:00 [INFO] Initializing default prettier with plugins {} 2024-11-01T14:48:50.932435+08:00 [INFO] using project environment for language server LanguageServerName("json-language-server") 2024-11-01T14:48:51.002551+08:00 [INFO] using project environment variables shell launched in "/Users/hello/.config/zed/settings.json". PATH="/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/Visual Studio Code.app/Contents/Resources/app/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/hello/.orbstack/bin:/Users/hello/go/bin:/Users/hello/.orbstack/bin:/Users/hello/go/bin" 2024-11-01T14:48:51.002676+08:00 [INFO] starting language server process. binary path: "/opt/homebrew/bin/node", working directory: "/Users/hello/.config/zed", args: ["/Users/hello/Library/Application Support/Zed/languages/json-language-server/node_modules/vscode-langservers-extracted/bin/vscode-json-language-server", "--stdio"] 2024-11-01T14:49:02.867712+08:00 [INFO] Waiting for default prettier to install 2024-11-01T14:49:02.86822+08:00 [INFO] Starting prettier at path "/Users/hello/Library/Application Support/Zed/prettier" 2024-11-01T14:49:03.003706+08:00 [INFO] starting language server process. binary path: "/opt/homebrew/bin/node", working directory: "/Users/hello/Library/Application Support/Zed/prettier", args: ["/Users/hello/Library/Application Support/Zed/prettier/prettier_server.js", "/Users/hello/Library/Application Support/Zed/prettier"] 2024-11-01T14:49:03.056913+08:00 [INFO] Started default prettier in "/Users/hello/Library/Application Support/Zed/prettier" 2024-11-01T14:49:33.108243+08:00 [ERROR] oneshot canceled 2024-11-01T14:49:33.108766+08:00 [ERROR] oneshot canceled 2024-11-01T14:49:33.109176+08:00 [ERROR] window not found 2024-11-01T14:53:51.762027+08:00 [INFO] shutting down ssh processes 2024-11-01T14:53:51.77129+08:00 [ERROR] (remote proxy) encountered error while forwarding messages: stdout_task failed

Caused by: 0: failed to read message from stdout 1: unexpected end of file, terminating... 2024-11-01T14:53:51.771538+08:00 [ERROR] (remote proxy) exiting due to error: stdout_task failed 2024-11-01T14:53:51.786029+08:00 [WARN] ssh heartbeat: connection activity channel has been dropped. stopping. 2024-11-01T14:53:51.786343+08:00 [ERROR] proxy process terminated unexpectedly 2024-11-01T14:54:00.127485+08:00 [INFO] remote development server present and matching client version 2024-11-01T14:54:00.211143+08:00 [ERROR] client:unhandled ssh message name:UpdateProject 2024-11-01T14:54:06.083+08:00 [ERROR] (remote server) no cached binary 2024-11-01T14:54:06.083149+08:00 [ERROR] (remote server) Failed to start language server "gopls": cannot install gopls 2024-11-01T14:54:06.083244+08:00 [ERROR] (remote server) server stderr: ""

huhu415 commented 2 hours ago

when i run go install golang.org/x/tools/gopls@latest on openwrt , it works.