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.03k stars 2.96k forks source link

Linux - Failed to start Elixir language server. Missing permissions. #15736

Open bakrhaso opened 2 months ago

bakrhaso commented 2 months ago

Check for existing issues

Describe the bug / provide steps to reproduce it

It looks like when Zed downloads elixir-ls it doesn't make the scripts executable and so the language server fails to start. My user only has read and write permissions on language_server.sh, and everyone else only has read.

❯ ll /home/bkhs/.local/share/zed/extensions/work/elixir/elixir-ls-v0.22.1/
Permissions Size User Date Modified  Name
.rw-r--r--@  616 bkhs  3 aug.  15:34 debug_adapter.bat
.rw-r--r--@  610 bkhs  3 aug.  15:34 debug_adapter.sh
.rw-r--r--@  345 bkhs  3 aug.  15:34 exec.bash
.rw-r--r--@  325 bkhs  3 aug.  15:34 exec.zsh
.rw-r--r--@  20k bkhs  3 aug.  15:34 installer.exs
.rw-r--r--@  628 bkhs  3 aug.  15:34 language_server.bat
.rw-r--r--@  614 bkhs  3 aug.  15:34 language_server.sh
.rw-r--r--@  710 bkhs  3 aug.  15:34 launch.exs
.rw-r--r--@ 3,1k bkhs  3 aug.  15:34 launch.fish
.rw-r--r--@ 3,9k bkhs  3 aug.  15:34 launch.sh
.rw-r--r--@  557 bkhs  3 aug.  15:34 quiet_install.exs
.rw-r--r--@    7 bkhs  3 aug.  15:34 VERSION

For completeness, I went and checked the same release from elixir-ls. It is executable there.

❯ ll Downloads/elixir-ls-v0.22.1
Permissions Size User Date Modified  Name
.rwxr-xr-x@  616 bkhs 10 juli  11:27 debug_adapter.bat
.rwxr-xr-x@  610 bkhs 10 juli  11:27 debug_adapter.sh
.rwxr-xr-x@  345 bkhs 10 juli  11:27 exec.bash
.rwxr-xr-x@  325 bkhs 10 juli  11:27 exec.zsh
.rw-r--r--@  20k bkhs 10 juli  11:27 installer.exs
.rwxr-xr-x@  628 bkhs 10 juli  11:27 language_server.bat
.rwxr-xr-x@  614 bkhs 10 juli  11:27 language_server.sh
.rw-r--r--@  710 bkhs 10 juli  11:27 launch.exs
.rw-r--r--@ 3,1k bkhs 10 juli  11:27 launch.fish
.rwxr-xr-x@ 3,9k bkhs 10 juli  11:27 launch.sh
.rw-r--r--@  557 bkhs 10 juli  11:27 quiet_install.exs
.rw-r--r--@    7 bkhs 10 juli  11:27 VERSION

Environment

Zed: v0.146.5 (Zed) OS: Linux Wayland fedora 40 Memory: 31.3 GiB Architecture: x86_64 GPU: NVIDIA GeForce RTX 3080 || NVIDIA || 555.58.02

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.

2024-08-03T15:34:16.353365287+02:00 [ERROR] failed to start language server "elixir-ls": failed to spawn command. path: "/home/bkhs/.local/share/zed/extensions/work/elixir/elixir-ls-v0.22.1/language_server.sh", working directory: "/home/bkhs/Code/personal/elixir/elixir_in_action_exercises", args: []
boleque commented 2 months ago

Managed to fix the issue by executing chmod +x launch.sh language_server.sh