Exafunction / codeium.vim

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

Codeium Auth error Windows 10 #185

Closed IpelaTech closed 1 year ago

IpelaTech commented 1 year ago

I'd like to install codeium on Neovim.

When I install and run :Codeium Auth, I get this error after pressing enter, I get the following error.

Please advise.

Thanks.

2023-07-11 07_21_22-

IpelaTech commented 1 year ago

Here are my machine details

2023-07-11 07_27_36-Clipboard 2023-07-11 07_28_00-Settings

pqn commented 1 year ago

It looks like you have this problem: https://stackoverflow.com/a/73225129/832056

Maybe you can try the solution there and reply here if it works.

IpelaTech commented 1 year ago

Thanks for the reply.

Didn't work. I even put the command in my powershell profile. It's weird because I use codeium in VSCode and that works just fine.

pqn commented 1 year ago

If you try to use vim from cmd instead of PowerShell does the issue still occur?

IpelaTech commented 1 year ago

I've tried it on normal cmd, git bash and powershell to no avail.

I found the offending line, seems like that -sS option is causing the issue. I haven't tested or tried out much yet, but I'll give it a go in the meantime.

2023-07-12 07_22_39-Clipboard

pqn commented 1 year ago

From the logs it looks like Invoke-WebRequest is getting used instead of curl, which is why that option doesn't exist. Maybe the solution on that StackOverflow post isn't the right one to apply here but it seems like the right root cause. What happens if you edit the let command = 'curl -sS... line to something like let command = 'Remove-item alias:curl && curl -sS...?

IpelaTech commented 1 year ago

I tried that, but it didn't work.

What kind of did, though was:

image

But then what I got back was this. I think the -sS option might be causing the issue. I want to try download another curl and see if that makes a difference. Seems like progress, though.

image

IpelaTech commented 1 year ago

When I remove the -sS option, I get this.

image

IpelaTech commented 1 year ago

Still working on it. I got to here because I got an error message that the property name should be wrapped in quotes.

image

image

if I wrap the auth token in quotes

image

image

pqn commented 1 year ago

You don't need to wrap firebase_id_token or the auth token in quotes. The issue is probably that shellescape is not behaving correctly (a few things control its behavior, including shellescape).

pqn commented 1 year ago

Link to docs if it's helpful: https://vimdoc.sourceforge.net/htmldoc/eval.html#shellescape()

IpelaTech commented 1 year ago

You don't need to wrap firebase_id_token or the auth token in quotes. The issue is probably that shellescape is not behaving correctly (a few things control its behavior, including shellescape).

Thanks for the heads-up. I was hoping it was the json_encode. Ok, I'll give it a shot when I get home and report-back with findings.

IpelaTech commented 1 year ago

Turns out it was this setting in my options.lua - neovim was set to use Powershell. Once I commented this out, retried, I got it to work.

Thanks for all the help and suggestions.

NEOVIM