zed icon indicating copy to clipboard operation
zed copied to clipboard

Language server logs not showing up in remote development

Open Alaska47 opened this issue 10 months ago • 6 comments

Summary

It seems like language server support on remote development is poor. I am frequently seeing errors like (remote server) oneshot canceled, do not see any feedback in the notifications on whether the language server is running, when looking at debug logs for the language server, I see multiple instances of the language server running.

I also don't see any of the status messages in the bottom left on remote development (i.e "Initializing Workspace", "Importing root project", "Refreshing Workspace" etc.) whereas I see them when running locally.

Description

To reproduce, open a Java file using remote development while having the https://github.com/zed-extensions/java extension installed.

Expected Behavior: Logs when I run locally:

2025-04-10T21:05:06.491276-04:00 [INFO] Initializing default prettier with plugins {"prettier-plugin-java"}
2025-04-10T21:05:06.522265-04:00 [INFO] attempting to start language server "jdtls", path: "/Volumes/workspace/MyProject/src/MyProject", id: 1
2025-04-10T21:05:07.878489-04:00 [INFO] Installing default prettier and plugins: [("prettier-plugin-java", "2.6.7"), ("prettier", "3.5.3")]
2025-04-10T21:05:08.896883-04:00 [INFO] Initialized prettier with plugins: {"prettier-plugin-java"}
2025-04-10T21:05:09.401157-04:00 [INFO] starting language server process. binary path: "/Users/akotnana/Library/Application Support/Zed/extensions/work/java/jdtls/jdt-language-server-1.46.1-202504011455/bin/jdtls", working directory: "/Volumes/workspace/MyProject/src/MyProject", args: []
2025-04-10T21:05:13.528298-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Starting", "message": "Init..." }
2025-04-10T21:05:13.528502-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Starting", "message": "0% Starting Java Language Server" }
2025-04-10T21:05:51.905157-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Starting", "message": "45% Starting Java Language Server - Deleting '/MyProject'." }
2025-04-10T21:05:52.454983-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Starting", "message": "70% Starting Java Language Server - Refreshing '/MyProject'." }
2025-04-10T21:05:53.946584-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Starting", "message": "70% Starting Java Language Server - Build" }
2025-04-10T21:05:54.446808-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Starting", "message": "70% Starting Java Language Server - Starting Gradle Daemon" }
2025-04-10T21:05:57.943909-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Starting", "message": "70% Starting Java Language Server - Configure project :buildSrc" }
2025-04-10T21:05:58.441126-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Starting", "message": "70% Starting Java Language Server - Configure project :" }
2025-04-10T21:05:58.760856-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "ProjectStatus", "message": "WARNING" }
2025-04-10T21:05:58.782679-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "Started", "message": "Ready" }
2025-04-10T21:05:58.808026-04:00 [WARN] unhandled capability registration: Registration { id: "0e6a9178-146e-4ed2-ab3a-de0c1e1ca9a6", method: "workspace/didChangeWorkspaceFolders", register_options: None }
2025-04-10T21:05:58.808225-04:00 [INFO] Language server with id 1 sent unhandled notification language/status: { "type": "ServiceReady", "message": "ServiceReady" }

Actual Behavior:

2025-04-10T20:36:06.709361-04:00 [INFO] Opening main db
2025-04-10T20:38:57.979651-04:00 [ERROR] failed to get git blame data: failed to find a git repository for buffer
...
2025-04-10T20:40:25.168901-04:00 [ERROR] (remote server) oneshot canceled
2025-04-10T20:42:01.386647-04:00 [ERROR] (remote server) server:error handling message. type:OpenBufferByPath, error:Is a directory (os error 21)
2025-04-10T20:42:01.425029-04:00 [ERROR] RPC request OpenBufferByPath failed: Is a directory (os error 21)
2025-04-10T20:42:24.1639-04:00 [ERROR] (remote server) server:error handling message. type:OpenBufferByPath, error:Is a directory (os error 21)

Zed Version and System Specs

Zed: v0.182.2 (Zed Preview) OS: macOS 15.1.1 Memory: 32 GiB Architecture: aarch64

Alaska47 avatar Apr 11 '25 01:04 Alaska47

Zed's page says it's coming soon. Has support for extension been released?

Image

josecanciani avatar May 12 '25 16:05 josecanciani

@josecanciani, yes we have extensions support. You can read about them at https://zed.dev/docs/extensions, I'm not sure where you got that screenshot of the site, it seems to be outdated

probably-neb avatar May 20 '25 15:05 probably-neb

@Alaska47 are the Language servers working as intended? From your description it sounds like just the logs aren't going through, but the language servers themselves are working

probably-neb avatar May 20 '25 15:05 probably-neb

@josecanciani, yes we have extensions support. You can read about them at https://zed.dev/docs/extensions, I'm not sure where you got that screenshot of the site, it seems to be outdated

Main Page -> Remote Development https://zed.dev/remote-development

There you can see the "extensions support coming soon".

I'll give it another try when I'm a bit free again. Any tips on how I could debug this to know if it's running? I tried using the PHP extension (which uses phpintelliphense if I remember correctly).

josecanciani avatar Jun 02 '25 12:06 josecanciani

You can see the running language servers in the dropdown in the top left of the pane opened by dev: open language server logs

probably-neb avatar Jun 04 '25 17:06 probably-neb

You can see the running language servers in the dropdown in the top left of the pane opened by dev: open language server logs

Thanks, I could open the log, but I don't find anything related to php. I have the extension installed, but I only see a tailwind lsp:

Image

Should I be getting something else?

josecanciani avatar Jun 04 '25 22:06 josecanciani

That means the PHP language server is not running, there is likely an error message in the zed logs (zed: open log), if you could find it and share it I can help you figure out what's going wrong if needed

probably-neb avatar Jun 12 '25 08:06 probably-neb

I have zero LSP and server logs for anything (including r-a) for any ssh remote project. Steps to repro are trivial: open any buffer, open lsp logs.

SomeoneToIgnore avatar Jun 18 '25 21:06 SomeoneToIgnore

Seems like the issue is similar to https://github.com/zed-industries/zed/issues/27328 where the replies say:

I see, seems we're just not sending the server logs from the remote to the client at all.

I can also verify the same behavior for clangd, it is definitely running on the remote machine but no logs show up on the client.

fizzxed avatar Jun 24 '25 00:06 fizzxed