codeium.vim icon indicating copy to clipboard operation
codeium.vim copied to clipboard

Can't Auth

Open RedNekoderr opened this issue 2 years ago • 19 comments

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

RedNekoderr avatar Dec 15 '23 12:12 RedNekoderr

Same issue with gvim 9.0 patch 1-1984

fcomanso avatar Dec 21 '23 05:12 fcomanso

what do i do if i have something like this

FkLalita avatar Dec 31 '23 04:12 FkLalita

Same error, NeoVim 0.9.4 and Vim 9.0, Ubuntu 22.04

kodopik avatar Jan 15 '24 06:01 kodopik

+1

fennr avatar Jan 18 '24 11:01 fennr

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

MPCodeWriter21 avatar Jan 21 '24 17:01 MPCodeWriter21

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

imbasri avatar Feb 03 '24 20:02 imbasri

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

Nachasic avatar Feb 29 '24 15:02 Nachasic

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 avatar Mar 25 '24 15:03 melMass

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 avatar Mar 25 '24 15:03 melMass

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

melMass avatar Mar 25 '24 18:03 melMass

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.

matthewblott avatar May 04 '24 23:05 matthewblott

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

melMass avatar May 05 '24 13:05 melMass

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

matthewblott avatar May 05 '24 18:05 matthewblott

I ran into a similar problem on Windows, and it was because I was using Nushell as my shell. :set shell=cmd before doing :Codeium Auth worked then.

danferns avatar Jul 24 '24 10:07 danferns

I ran into a similar problem on Windows, and it was because I was using Nushell as my shell. :set shell=cmd before doing :Codeium Auth worked then.

You probably want to use the nvim one, I use nushell too: https://github.com/Exafunction/codeium.vim/issues/277#issuecomment-2018599757

melMass avatar Jul 24 '24 14:07 melMass

@melMass I found the nvim version comes with its own problems. It seems less well supported.

matthewblott avatar Jul 24 '24 15:07 matthewblott

@matthewblott interesting! I'm not fully getting why they maintain two distinct versions and don't dedicate fully to the vim one. I've been using the nvim version ever since my earlier comment without massive issue, but I mostly rely on it for very basic completions (3rd place priority in cmp) so I maybe did not encounter the issues you are mentioning

melMass avatar Jul 24 '24 15:07 melMass

You probably want to use the nvim one, I use nushell too: #277 (comment)

Thank you. I did try the nvim version but came back here because I wanted to use the auto-suggestions that are displayed as ghost-text, and as far as I could tell, the nvim one is built specifically to be used with cmp.

danferns avatar Jul 24 '24 15:07 danferns

I wanted to use the auto-suggestions that are displayed as ghost-text

Cmp does support ghost_text if that's the only issue. But honestly I would love if a maintainer could chime in to clarify the reason for separate extensions

melMass avatar Jul 24 '24 18:07 melMass