Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shipping broken, api key doesn't work #12

Open
s1nistr4 opened this issue Jun 9, 2024 · 13 comments
Open

Shipping broken, api key doesn't work #12

s1nistr4 opened this issue Jun 9, 2024 · 13 comments

Comments

@s1nistr4
Copy link

s1nistr4 commented Jun 9, 2024

👎 Problem

When you enter an API key it gives a bunch of garbled text and says it's invalid even when it's not

🔢 Steps to reproduce

  • Install using instructions in readme with lazy.nvim
  • After it extracts binary, you have to enter the token
  • When you enter the token, it says it's invalid

👍 Expected behavior

For the token to be valid

Neovim version (nvim -v)

0.11.0-dev

Operating system (uname -om)

Linux x86_64

:checkhealth neocodeium

OK

Relevant log output

No response

@s1nistr4 s1nistr4 added the bug Something isn't working label Jun 9, 2024
@monkoose
Copy link
Owner

monkoose commented Jun 10, 2024

Can't reproduce following reproducing steps. Are you sure you have invoked :NeoCodeium auth to retrieve the token?

Without more information and description of the issue (screenshots, full error log (not some "a bunch of garbled text") there would not be any fix.

@monkoose monkoose added can't reproduce and removed bug Something isn't working labels Jun 10, 2024
@n-crespo
Copy link

I think I have a similar issue, here's what it says:
Everything works seems to properly with the original Codeium plugin, however.

  Warn  12:25:27 notify.warn NeoCodeium: Unexpected response: �]10;rgb:c0caf5�\�]11;rgb:24283b�\�]12;7�\{"api_key":"string-of-letters-that-is-probably-my-api-key","name":"my-name"}
  Error  12:25:37 notify.error NeoCodeium: could not retrieve api key
Authentication is canceled

Also, a note: when using this inside of WSL, wslview (sudo apt install wslu) is needed to open the authentication link properly. Otherwise, vim.ui.open() strangely spawns explorer instead of a browser window.

@n-crespo
Copy link

I found (somewhat) of a solution for this: manually enter the API key into ~/.codeium/config.json. The file should look like this:

{ "api_key": "your-api-key"}

Not pretty, but it works.

@Arpit-Moga
Copy link

Arpit-Moga commented Aug 15, 2024

Can confirm , This issue is still there.

NeoVim Version :
NVIM v0.10.1
Build type: Release
LuaJIT 2.1.1713484068
Run "nvim -V1 -v" for more info

After installing the plugin and entering : NeoCodeium auth , It correctly opens up the token page in the browser , but when that token is pasted in the terminal , it shows it as an invalid token.

image

image

image

image

@monkoose
Copy link
Owner

@Arpit-Moga which OS do you use?

@Arpit-Moga
Copy link

@Arpit-Moga which OS do you use?

Windows 11

image

@monkoose
Copy link
Owner

monkoose commented Aug 15, 2024

Thanks. Do you use WSL?
Not sure about OP (because he is using Linux and my guess he had some unrelated issue), but seems like something is broken on windows based on yours and @n-crespo responces.
Let me see what I can do (not an Windows user myself).

@Arpit-Moga
Copy link

@monkoose No , I do have WSL install but I am using Neovim on windows

@monkoose
Copy link
Owner

@Arpit-Moga @n-crespo could you test if it works now?

@Arpit-Moga
Copy link

@monkoose It works perfectly now ! Thanks for the quick update.

@n-crespo
Copy link

Still not working in WSL for me... getting the same error:

NeoCodeium: Unexpected response: �]10;rgb:c0caf5�\�]11;rgb:1a1b26�\�]12;7�\{"api_key":"api-key-was-here","name":"my name"}

@monkoose
Copy link
Owner

Got it. I will look on weekends if I can fix it.

@monkoose
Copy link
Owner

@n-crespo I have tested on windows 11 and Ubuntu wsl, and it worked for me perfectly. As you have mentioned it required wslu but other than that I don't have any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants