Exafunction / codeium.vim

Free, ultrafast Copilot alternative for Vim and Neovim
https://codeium.com
MIT License
3.73k stars 127 forks source link

Can't Auth #277

Open RedNekoderr opened 6 months ago

RedNekoderr commented 6 months ago

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

fcomanso commented 6 months ago

Same issue with gvim 9.0 patch 1-1984

FkLalita commented 6 months ago

what do i do if i have something like this

kodopik commented 5 months ago

Same error, NeoVim 0.9.4 and Vim 9.0, Ubuntu 22.04

fennr commented 5 months ago

+1

MPCodeWriter21 commented 5 months ago

@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.

imbasri commented 5 months ago

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

Nachasic commented 4 months ago

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

melMass commented 3 months ago

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 = ''
melMass commented 3 months ago

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

melMass commented 3 months ago

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

matthewblott commented 2 months ago

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.

melMass commented 2 months ago

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

matthewblott commented 2 months ago

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 :-)