gencay / vscode-chatgpt

An unofficial Visual Studio Code - OpenAI ChatGPT integration
ISC License
3.5k stars 755 forks source link

[bugs] Unable to login, make sure to login and keep your browser open. Error Failed to authenticate session #143

Closed A11en0 closed 1 year ago

A11en0 commented 1 year ago

Can't log in with the browser.

image

A11en0 commented 1 year ago

Open AI API is OK, but I guess it's not ChatGPT but just GPT-3.

gencay commented 1 year ago

What's your OS, browser and versions? I just checked, it seems to be working for me with default settings (Chrome on Win11)

A11en0 commented 1 year ago

Chrome 110.0.5481.100 on Win 11, and the browser has been login success.

The plugin version is 3.6.1.

gencay commented 1 year ago

Interesting, the extension is either not able to get your access token or see the textarea where you normally ask questions to chatgpt. Could you try closing all of your Chrome instances and let the extension log you in on a fresh browser? I can't reproduce your issue, tried a few times.

A11en0 commented 1 year ago

I try it again with your advice, but it also won't work. I guess it's whether I need a proxy setting in the Vscode? I'm using a global socks proxy with v2ray to keep access to the ChatGPT website.

gencay commented 1 year ago

Proxy sounds like the issue. Check this comment, it may help https://github.com/gencay/vscode-chatgpt/issues/77#issuecomment-1409346121

A11en0 commented 1 year ago

I tried it, not work either.

A11en0 commented 1 year ago

image

gencay commented 1 year ago

Are you clicking/typing anywhere on the page until it logs you in and gets minimized? The second error in your screenshots suggests that your autologin flow may be interrupted.

A11en0 commented 1 year ago

Yes, maybe it is! I'm logged in success now. But Why did it happen?

gencay commented 1 year ago

Glad it worked @A11en0 ! As noted in Readme you should avoid interrupting the autologin flow and let it log you in and it will get automatically minimized. You shouldn't close the browser, since the extension uses browser to send and receive requests/responses from OpenAI via browser.

A11en0 commented 1 year ago

Cool! Sorry for my sloppiness, I think this is a significant consideration and it might be better to use bold and large-size fonts in the README.

gencay commented 1 year ago

Appreciate the feedback, I will update the Readme in the next iteration!

gencay commented 1 year ago

@A11en0 updated the readme with highlighted info regarding not interrupting the flow.