Exafunction / codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim

Home Page:https://codeium.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't Auth

RedNekoderr opened this issue · comments

When I enter the token:
Error detected while processing function codeium#command#Command[6]..1 line 66
Linux neovim version 0.9.4

Same issue with gvim 9.0 patch 1-1984

what do i do if i have something like this

Same error, NeoVim 0.9.4 and Vim 9.0, Ubuntu 22.04

@RedNekoderr

I wanted to use Codeium on Windows but this error didn't let me log in:
image_2024-01-21_20-23-05

I figured that it was caused by the fact that shellescape command did not escape the JSON data properly and unsurprisingly Codeium was unable to post the token.

To address this, I've created a fork of the Codeium plugin that includes a fix for this particular issue. You can find it at MPCodeWriter21/codeium.vim. I've successfully used this version on Windows 11 with NVIM v0.10.0-dev-2021+gee2127363, and it resolved the authentication problem for me.

If you find the fork helpful and it resolves the issue for you, please let me know. I'd be more than happy to submit a pull request to merge these changes into the main repository. This way, the entire community can benefit from the fix.

Feel free to give it a try, and if you have any feedback, don't hesitate to reach out.

a few days ago I was able to use auth, but after I reinstalled windows, I couldn't and the same notification appeared as my friend here. please fix it. thank you.
image

I am experiencing the same issue with NVIM v0.9.2 under Linux

Yep, it adds extra quotes to the command...:

Executing command: 

curl -sS https://api.codeium.com/register_user/ --header "Content-Type: application/json" --data "{""firebase_id_token"": ""eyJhb********************************************""}"

Unexpected response: {"detail":[{"loc":["body",3],"msg":"Expecting ':' delimiter: line 1 column 4 (char 3)","type":"value_error.jsondecode","ctx":{"msg":"Expecting ':' delimiter","doc":"{\"\"firebase_id_token\"\": \"\"

I'm guessing it's an option conflict (I use a custom shell: nushell):

vim.opt.shellcmdflag = '-c'
vim.opt.shellquote = ''
vim.opt.shellxquote = ' '
vim.opt.shellxescape = ''

Thanks @MPCodeWriter21 it works well with your fork! I just forked it to merge the last updates and it merged without manual edits: https://github.com/melMass/codeium.vim/tree/fix-escape

I just realized there is two different extensions for vim and neovim, not sure what it's not mentionned in the readme, the neovim one doesn't have the issue at all: https://github.com/Exafunction/codeium.nvim

I just realized there is two different extensions for vim and neovim, not sure what it's not mentionned in the readme, the neovim one doesn't have the issue at all: https://github.com/Exafunction/codeium.nvim

It doesn't. I just installed it and got auth working okay but the nvim specific plugin doesn't do anything and seems not as well supported. There's almost no documentation. I did have this plugin working before though so I'm not sure what's changed.

It doesn't. I just installed it and got auth working okay but the nvim specific plugin doesn't do anything and seems not as well supported. There's almost no documentation. I did have this plugin working before though so I'm not sure what's changed.

I'm using it a lot and it works fine, there is one huge and very very annoying bug on high LOC files (>10K) where all request fails to plenary spams you with error as you type

I'm wondering if it's something to do with tmux. I found the vim (not nvim) plugin only works when I'm running tmux and I wonder if that was the case when I had the nvim (not vim) plugin installed. I'll check later :-)