the LSP server could not download from GitHub
Version: 0e3585b
When open a file, it will produce logs:
/usr/share/nvim/runtime/lua/vim/lsp/rpc.lua:800: Spawning language server with cmd: `{ ".local/share/nvim/lazy/copilot.lua/copilot/linux-x64/copilot-language-server-1.292.0", "--stdio" }` failed. The language server is either not installed, missing from PATH, or not executable.
2025-03-27 09:54:01.602 [40] [ERROR]: LSP client failed to start (no client ID returned)
[loops]
...
I found the .local/share/nvim/lazy/copilot.lua/copilot/linux-x64/copilot-language-server-1.292.0.zip is just a txt file with one line:
Cookies must be enabled to use GitHub.
seems a download error?
Yes the curl command to download the zip file seems to fail for some reason. I just pushed an attempt at resolving the issue, but I am really not sure if it will work so let me know if it does or not.
0da7ebc11bf63fe0591f664430266dfc87d77dbf fails with the same reason, still not working
the original curl command seems ok
Very odd, until we figure it out you can just extract the zip file in that same folder and the plugin will pick it up.
Hey, I thought i was having the same issue since i also had the notification saying:
[ERROR]: LSP client failed to start (no client ID returned)
But in the flood of notifications i found this one:
Stating that it could not create the linux-x64 folder. I simply did an mkdir in ~/.local/share/nvim/copilot.lua/copilot/linux-x64
Restarted neovim and everything went well this time:
So maybe the issue is more related to directory creation?
@NicolasGB maybe another bug? I have this directory though.
I had this problem and manually creating the linux-x64 directory worked for me too.
I have an idea to resolve the directory issue, but the one reported in this Issue initially is not the same from what I can see.
In my case the directory existed and the .zip file existed but nothing unzipped it, even if I removed it and tried having copilot.lua (presumably?) download it again.
This essentially hung my nvim as above -- but what fixed it here was basically just doing this myself for now, so unzip copilot-language-server-darwin-arm64-1.292.0.zip followed by mv copilot-language-server copilot-language-server-1.292.0 which seems to be the executable name expected.
In my case the directory existed and the
.zipfile existed but nothing unzipped it, even if I removed it and tried having copilot.lua (presumably?) download it again.This essentially hung my nvim as above -- but what fixed it here was basically just doing this myself for now, so
unzip copilot-language-server-darwin-arm64-1.292.0.zipfollowed bymv copilot-language-server copilot-language-server-1.292.0which seems to be the executable name expected.
This worked for me as well. Downloaded the zip from https://github.com/github/copilot-language-server-release/releases/download/1.292.0/copilot-language-server-linux-x64-1.292.0.zip
For anyone having an issue with the file manipulation, could you pull the new version (just added a log), add this to your configuration:
require("copilot").setup {
...
logger = {
file_log_level = vim.log.levels.TRACE,
},
...
Then replicate the issue and post the copilot_lua.log file generated?
On linux it should be in ~/.local/state/nvim/copilot-lua.log
Issue also occurs on LazyVim on windows, downloading the exe renaming it and placing it in the directory fixes the issue, but that's a workaround
Do you have logs? :)
They are in ~\AppaData\Local\ on Windows
When i fresh install it i get this using lazyvim package manager
'...nvim-data/lazy/lazy.nvim/lua/lazy/manage/task/plugin.lua:26: Vim:2025-03-27 16:52:59.664 [1] [ERROR]: error starting LSP client: ...les/Neovim/share/nvim/runtime/lua/vim/lsp/_transport.lua:68: Spawning language server with cmd: { "C:/Users/seal1/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/copilot-language-server-1.292.0.exe", "--stdio" } failed. The language server is either not installed, missing from PATH, or not executable.'
i can not find any file named copilot-lua.log in my appdata unfortunately
Did you add the configuration described here?: https://github.com/zbirenbaum/copilot.lua/issues/408#issuecomment-2758411881
I did, but i'm also using the environment variable for windows which makes the config directory change to ~/.config instead of AppData I'm not sure whether that also influences the log files directory, because the nvim-data directory is still in AppData
What shell are you using on Windows? I am starting to think it may have something to do with this
I've tried with Powershell and Nushell, the folder 'nvim-data/lazy/copilot.lua/copilot' which should contain the 'win32-x64' folder and the binary only contains a '.gitignore' and 'package.json' file, I saw in the repo that you use curl to download the binary, so I tried installing that on windows to see if it will make a difference but it did not still no .exe
I just pushed another change to use the built-in vim.fn.mkdir which should be better at handling varieties in shells and OSes.
I use Nushell on Windows and it is working OK.
Let's manually enter the commands and see which one fails in this case.
You will need to replace ~ with your user path as curl does not seem to like ~ to download the zip file:
curl -v -s -L -c "~/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/cookies.txt" -b "~/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/cookies.txt" -o "~/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/copilot-language-server-win32-x64-1.292.0.zip" "https://github.com/github/copilot-language-server-release/releases/download/1.292.0/copilot-language-server-win32-x64-1.292.0.zip"
And finally unzip it:
powershell -Command "Expand-Archive -Path ~/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/copilot-language-server-win32-x64-1.292.0.zip -DestinationPath ~/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64"
After your change the win32-x64 folder get created successfully, the curl command works fine if I use full path, but doesn't work if i use - and the powershell extract command works fine, but the extracted file does not, it is called copilot-language-server.exe and the plugin expects copilot-language-server-1.292.0.exe, otherwise it doesn't start up
If the folder is created automatically, what is the error in NeoVim? Since the commands work I would expect it to download fine through NeoVim.
when i delete the nvim data of copilot-lua, it reinstalls it I briefly see on the bottom downloading but very quickly after that I get the error
'...nvim-data/lazy/lazy.nvim/lua/lazy/manage/task/plugin.lua:26: Vim:2025-03-27 16:52:59.664 [1] [ERROR]: error starting LSP client: ...les/Neovim/share/nvim/runtime/lua/vim/lsp/_transport.lua:68: Spawning language server with cmd: { "C:/Users/seal1/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/copilot-language-server-1.292.0.exe", "--stdio" } failed. The language server is either not installed, missing from PATH, or not executable.'
so I have no clue, what happened with the downloading, is there somewhere I can find the logs for that part?
Okay I managed to get the logs
2025-03-27 18:09:22.514 [10] [ERROR]: Error downloading file: Error: [31mnu::shell::file_not_found[0m
[31m×[0m File not found ╭─[[36;1;4msource[0m:1:1] [2m1[0m │ nu · [35;1m▲[0m · [35;1m╰── [35;1mCould not access file '/s': The system cannot find the file specified. (os error 2)[0m[0m ╰────
Can you post what comes before? It should log the command it is about to run if you set your config to trace.
2025-03-27 18:12:06.250 [8] [TRACE]: copilot-language-server zip file not found, ensuring directory exists 2025-03-27 18:12:06.250 [9] [TRACE]: Downloading copilot-language-server with command: curl -s -L -c "C:/Users/seal1/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/cookies.txt" -b "C:/Users/seal1/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/cookies.txt" -o "C:/Users/seal1/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/copilot-language-server-win32-x64-1.292.0.zip" "https://github.com/github/copilot-language-server-release/releases/download/1.292.0/copilot-language-server-win32-x64-1.292.0.zip"
hmm that looks normal to me, if you add -v after curl and run that command, does it work?
I'm going to drive now for an hour, so I won't be able to give you quick feedback, but when I get home I will continue monitoring this conversation.
-v did not make any difference quickly tried it out!
-v only means verbose so it should output a log, so if you run the follow you should be able to get a log which you can post back here:
curl -v -s -L -c "C:/Users/seal1/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/cookies.txt" -b "C:/Users/seal1/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/cookies.txt" -o "C:/Users/seal1/AppData/Local/nvim-data/lazy/copilot.lua/copilot/win32-x64/copilot-language-server-win32-x64-1.292.0.zip" "https://github.com/github/copilot-language-server-release/releases/download/1.292.0/copilot-language-server-win32-x64-1.292.0.zip"
Just hit this myself.
For those trying to get over this error and continue working, and using lazy.nvim, you can pin it to a previous / unbroken commit, e.g.:
{ "zbirenbaum/copilot.lua", commit = "99654fe9ad6cb2500c66b178a03326f75c95f176" },