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
48.08k stars 2.84k forks source link

Zed >= 0.155.2 not installing language servers #18718

Open 13tales opened 4 days ago

13tales commented 4 days ago

Check for existing issues

Describe the bug / provide steps to reproduce it

Language Servers (typescript, JSON, ESlint) recently stopped working for me. On looking at Zed.log, I saw issues installing/executing the language servers, and error messages that suggested files/folders were missing. When I investigated Zed's folder under /Library/Application Support/Zed/languages, I could see that folders for the expected executables (eg. vtsls) were present, but empty.

I tried:

None of which worked. On manually downloading Zed 0.154.4 stable, language servers are now working again.

Environment

Zed: v0.154.4 (Zed) OS: macOS 14.1.2 Memory: 16 GiB Architecture: aarch64

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.

Zed.log

2024-10-04T12:26:30.21633+10:00 [INFO] ========== starting zed ==========
2024-10-04T12:26:30.21738+10:00 [INFO] Opening main db
2024-10-04T12:26:30.218747+10:00 [INFO] Opening main db
2024-10-04T12:26:30.238532+10:00 [INFO] Using git binary path: Some("/Applications/Zed Preview.app/Contents/MacOS/git")
2024-10-04T12:26:30.453014+10:00 [INFO] set environment variables from shell:/opt/homebrew/bin/fish, path:/Users/tom.armstrong/.rbenv/shims:/Users/tom.armstrong/.bun/bin:opt/homebrew/bin:/usr/local/opt/ruby/bin:/usr/local/sbin:/Users/tom.armstrong/.local/bin:/Users/tom.armstrong/.pyenv/shims:/opt/homebrew/bin:/usr/local/bin:/Users/thomasarmstrong/.cargo/bin:/usr/local/opt/fzf/bin:/opt/homebrew/opt/fzf/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/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:/Users/tom.armstrong/.rbenv/shims:/Users/tom.armstrong/.bun/bin:/Users/tom.armstrong/.local/bin
2024-10-04T12:26:30.762691+10:00 [INFO] initializing context server client
2024-10-04T12:26:30.762827+10:00 [INFO] Registering built-in prompt template: content_prompt
2024-10-04T12:26:30.763172+10:00 [INFO] Registering built-in prompt template: edit_workflow
2024-10-04T12:26:30.763365+10:00 [INFO] Registering built-in prompt template: project_slash_command
2024-10-04T12:26:30.76344+10:00 [INFO] Registering built-in prompt template: step_resolution
2024-10-04T12:26:30.763757+10:00 [INFO] Registering built-in prompt template: terminal_assistant_prompt
2024-10-04T12:26:30.76425+10:00 [INFO] No prompt template overrides directory found at /Users/tom.armstrong/.config/zed/prompt_overrides. Using built-in prompts.
2024-10-04T12:26:30.764334+10:00 [INFO] extensions updated. loading 1, reloading 0, unloading 0
2024-10-04T12:26:30.814109+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.814221+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.814303+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.814396+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.816288+10:00 [INFO] Opening main db
2024-10-04T12:26:30.816383+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.816469+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.816533+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.816595+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.816681+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.827146+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.830071+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.831185+10:00 [INFO] building git repository, `.git` path in the worktree: ".git"
2024-10-04T12:26:30.875549+10:00 [INFO] Opening main db
2024-10-04T12:26:30.876672+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.877749+10:00 [INFO] set status on client 0: Authenticating
2024-10-04T12:26:30.879537+10:00 [INFO] Opening main db
2024-10-04T12:26:30.880053+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.880147+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.881524+10:00 [INFO] set status on client 135163: Connecting
2024-10-04T12:26:30.885817+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:30.890263+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:30.892193+10:00 [ERROR] No path or contents found for buffer
2024-10-04T12:26:30.89362+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.894662+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.942192+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:30.947539+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:30.952239+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:30.978584+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:31.053703+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:31.062063+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:31.07197+10:00 [INFO] attempting to start language server "typescript-language-server", path: "/Users/tom.armstrong/Workspace/lexer-dashboard-web", id: 1
2024-10-04T12:26:31.072111+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:31.072294+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:31.072367+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:31.072898+10:00 [INFO] fetching latest version of language server "typescript-language-server"
2024-10-04T12:26:31.081559+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:31.22453+10:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-10-04T12:26:31.445029+10:00 [INFO] starting language server process. binary path: "opt/homebrew/bin/node", working directory: "/", args: ["/Users/tom.armstrong/Library/Application Support/Zed/copilot/copilot-v0.5.0/dist/agent.js", "--stdio"]
2024-10-04T12:26:31.48162+10:00 [INFO] Installing default prettier and plugins: [("prettier", "3.3.3")]
2024-10-04T12:26:31.610649+10:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching formatter packages: No such file or directory (os error 2)
2024-10-04T12:26:31.701653+10:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-10-04T02:26:31.699Z] Agent service starting",
  "metadataStr": "[DEBUG] [agent] [2024-10-04T02:26:31.699Z]",
  "extra": [
    "Agent service starting"
  ]
}
2024-10-04T12:26:31.702894+10:00 [INFO] Language server with id 0 sent unhandled notification client/registerCapability:
{
  "registrations": [
    {
      "id": "3b69fe72-2b98-4d00-8fdf-e6637c249bed",
      "method": "workspace/didChangeWorkspaceFolders",
      "registerOptions": {}
    }
  ]
}
2024-10-04T12:26:32.021098+10:00 [INFO] Installing default prettier and plugins: [("prettier", "3.3.3")]
2024-10-04T12:26:32.13147+10:00 [INFO] downloading language server "typescript-language-server"
2024-10-04T12:26:32.149033+10:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching formatter packages: No such file or directory (os error 2)
2024-10-04T12:26:32.1805+10:00 [INFO] add connection to peer
2024-10-04T12:26:32.180568+10:00 [INFO] add_connection;
2024-10-04T12:26:32.180635+10:00 [INFO] waiting for server hello
2024-10-04T12:26:32.188945+10:00 [INFO] got server hello
2024-10-04T12:26:32.189023+10:00 [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 0 }, peer id: PeerId { owner_id: 545, id: 7762001 })
2024-10-04T12:26:32.189132+10:00 [INFO] set status on client 135163: Connected { peer_id: PeerId { owner_id: 545, id: 7762001 }, connection_id: ConnectionId { owner_id: 0, id: 0 } }
2024-10-04T12:26:32.191534+10:00 [INFO] Language server with id 0 sent unhandled notification LogMessage:
{
  "level": 0,
  "message": "[DEBUG] [agent] [2024-10-04T02:26:32.188Z] Telemetry initialized",
  "metadataStr": "[DEBUG] [agent] [2024-10-04T02:26:32.188Z]",
  "extra": [
    "Telemetry initialized"
  ]
}
2024-10-04T12:26:32.272641+10:00 [ERROR] missing executable in directory "/Users/tom.armstrong/Library/Application Support/Zed/languages/typescript-language-server"
2024-10-04T12:26:32.273108+10:00 [ERROR] Failed to start language server "typescript-language-server": No such file or directory (os error 2)
2024-10-04T12:26:32.273189+10:00 [ERROR] server stderr: ""
2024-10-04T12:26:32.51478+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.514882+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.518809+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:32.520308+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.520406+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.521206+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:32.53027+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.530429+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.533014+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:32.543563+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.543667+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.544655+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:32.600214+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.600304+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.60101+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:32.632554+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.632644+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.633506+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:32.701256+10:00 [INFO] Installing default prettier and plugins: [("prettier", "3.3.3")]
2024-10-04T12:26:32.884619+10:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching formatter packages: No such file or directory (os error 2)
2024-10-04T12:26:32.901613+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.901737+10:00 [INFO] Initializing default prettier with plugins {}
2024-10-04T12:26:32.903659+10:00 [WARN] request completed with error: failed to connect to the server
2024-10-04T12:26:32.987336+10:00 [ERROR] failed to fetch cached embeddings via cloud model

Caused by:
    RPC request GetCachedEmbeddings failed: permission denied
2024-10-04T12:26:33.30093+10:00 [ERROR] failed to fetch cached embeddings via cloud model

Caused by:
    RPC request GetCachedEmbeddings failed: permission denied
2024-10-04T12:26:33.36356+10:00 [INFO] Installing default prettier and plugins: [("prettier", "3.3.3")]
2024-10-04T12:26:33.494129+10:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching formatter packages: No such file or directory (os error 2)
2024-10-04T12:26:33.722918+10:00 [ERROR] failed to fetch cached embeddings via cloud model

Caused by:
    RPC request GetCachedEmbeddings failed: permission denied
2024-10-04T12:26:33.909829+10:00 [INFO] Installing default prettier and plugins: [("prettier", "3.3.3")]
2024-10-04T12:26:34.036026+10:00 [ERROR] Failed to install default prettier: prettier & plugins install: fetching formatter packages: No such file or directory (os error 2)
2024-10-04T12:26:34.036139+10:00 [WARN] Default prettier installation had failed 5 times, not attempting again
2024-10-04T12:26:34.040473+10:00 [ERROR] failed to fetch cached embeddings via cloud model

Caused by:
    RPC request GetCachedEmbeddings failed: permission denied
2024-10-04T12:26:34.458942+10:00 [ERROR] failed to fetch cached embeddings via cloud model

Caused by:
    RPC request GetCachedEmbeddings failed: permission denied
2024-10-04T12:26:34.459817+10:00 [INFO] Summarizing updated entries took 29.375µs
2024-10-04T12:26:34.460144+10:00 [INFO] Summarizing updated entries took 4.25µs
2024-10-04T12:44:20.028148+10:00 [ERROR] connection error: error reading rpc message from socket

Caused by:
    0: IO error: Connection reset by peer (os error 54)
    1: Connection reset by peer (os error 54)
2024-10-04T12:44:20.028591+10:00 [INFO] set status on client 135163: ConnectionLost
2024-10-04T12:44:20.029086+10:00 [INFO] set status on client 135163: Reauthenticating
2024-10-04T12:44:20.029327+10:00 [INFO] set status on client 135163: Reconnecting
2024-10-04T12:44:20.426276+10:00 [INFO] connected to rpc endpoint https://collab.zed.dev/rpc
2024-10-04T12:44:21.472627+10:00 [INFO] add connection to peer
2024-10-04T12:44:21.472834+10:00 [INFO] add_connection;
2024-10-04T12:44:21.473053+10:00 [INFO] waiting for server hello
2024-10-04T12:44:21.473423+10:00 [INFO] got server hello
2024-10-04T12:44:21.473599+10:00 [INFO] set status to connected (connection id: ConnectionId { owner_id: 0, id: 1 }, peer id: PeerId { owner_id: 545, id: 7774167 })
2024-10-04T12:44:21.473911+10:00 [INFO] set status on client 135163: Connected { peer_id: PeerId { owner_id: 545, id: 7774167 }, connection_id: ConnectionId { owner_id: 0, id: 1 } 
13tales commented 1 day ago

Postscript: I've had to disable auto_update due to this, as otherwise Zed happily downloads the broken version again and my language servers disappear the next time I restart 😞