Exafunction / codeium.nvim

A native neovim extension for Codeium
MIT License
644 stars 50 forks source link

attempt to index field 'api' (a nil value) #142

Closed lessthanseventy closed 4 months ago

lessthanseventy commented 4 months ago

My codeium installation has stopped working. Attempting to download the server results in an error in io.lua, 'out' is nil on line 392. I tried downloading the server manually and setting the tools.language_server config option. When I try to run :Codeium Auth I get:

2024-02-08T13:58:10 Error   ERROR Error executing Lua callback: .../.local/share/nvim/lazy/codeium.nvim/lua/codeium/api.lua:72: attempt to index field 'api' (a nil value)
stack traceback:
    .../.local/share/nvim/lazy/codeium.nvim/lua/codeium/api.lua:72: in function 'authenticate'
    ....local/share/nvim/lazy/codeium.nvim/lua/codeium/init.lua:20: in function <....local/share/nvim/lazy/codeium.nvim/lua/codeium/init.lua:17>
fortenforge commented 4 months ago

reverted the last PR, let me know if this fixes this

https://github.com/Exafunction/codeium.nvim/commit/ad6705cacce51df32c9fd72b66f38cb242a95485

lessthanseventy commented 4 months ago

I got a bit further, but I still get:

2024-02-08T14:40:51 Error   ERROR Error executing luv callback:
...w/.local/share/nvim/lazy/codeium.nvim/lua/codeium/io.lua:417: attempt to compare number with nil
stack traceback:
    ...w/.local/share/nvim/lazy/codeium.nvim/lua/codeium/io.lua:417: in function '_user_on_exit'
    .../.local/share/nvim/lazy/plenary.nvim/lua/plenary/job.lua:240: in function '_shutdown'
    .../.local/share/nvim/lazy/plenary.nvim/lua/plenary/job.lua:47: in function <.../.local/share/nvim/lazy/plenary.nvim/lua/plenary/job.lua:38>

when I attempt to authenticate

consoleaf commented 4 months ago

Weird that the api.lua:72: attempt to index field 'api' (a nil value) error even happened, I assumed it being in the defaults meant unless you explicitly set api to nil, it would always be there?

consoleaf commented 4 months ago

I can't reproduce your issue, please try using my fork Consoleaf/codeium.nvim with the initial problem about indexing the api field fixed, hopefully that helps.

Upon a closer inspection it looks like plenary.curl is returning a result with the status field being nil: image Please make sure both plenary and curl are up to date.