VSCode extension can't login

The vscode extension stopped working to me, i tried to re-login usaing github an also manually adding the token, but didn’t work. The attachment is the vscode output. I don’t know whats hapening because my internet connection is working fine with everything else.

Hey @CaioMS2000

It seems we had a downtime earlier that day. Please reload the IDE and try again. All systems should be operable again.

Sorry for the inconvenience.

I’m having this problemsince monday,and i just teste right now and still not not logging in

@CaioMS2000 Are you using any kind of VPN, proxy or other redirections instead of a direct network connection?
What OS are you on? Which IDE are you using and which version of Cody?

I have a VPN app installed, but it’s not running (I’m not sure if it might have changed some network settings from when I used it in the past), so I’m using a direct connection. I’m using Windows 11 with WSL (Ubuntu).

@CaioMS2000 If you are working from WSL then make sure that your network adapter is not using IPv6 protocol. This might interfere with WSL is a known network issue to the community.
Go into your Windows setting → Network & Internet → Ethernet → IP assignment “Edit” button and deactivate IPv6 there.

Then go into your Terminal (admin permission) and shutdown wsl --shutdown and restart WSL. Try to ping 8.8.8.8 and ping google.com

Please also make sure that you have in the WSL setting the NAT mode activated. The mirrored model make problems.

I don’t even see the IPv6 option — it’s already set to automatic DHCP.
is this enought to check if it is in NAT mode?

Did you use ping in WSL?

Use this settings depicted in the image to disable IPv6 for your networks. Shutdown WSL after and restart.

yes, I used ping in WSL. And that IPV6 option was already desabled.

My last option would be to provide the Cody logs and I can have a look at it closer.

how can i get the logs?

Go fresh in your IDE. CTRL + SHIFT + U then you should see the Output Pane. There is a menu where you can select Cody by Sourcegraph there are the logs. Copy & Paste them here or in a file and send them here.

I just refreshed this empty window and took a screenshot. But there are other windows open simultaneously, in case that interferes.

If you are not able to login, try to create a new access token on the Sourcegraph web site in your user account. It might be that your token has expired.
Then go into Cody and choose as login option “Sourcegraph URL”. As URL use “https://sourcegraph.com” and when asked for your access token then paste it in and wait if Cody logs you in. If not, then please provide the logs again.

This manual method worked, and at the moment I’m using my computer at home. Every other time I was at work. I hope it worked permanently and that it’s not something specific to the network. Tomorrow I’ll find out if it still works when using the internet at work.


I ran a test here using the work internet and it worked as well, but I noticed something: regardless of the internet, the extension works in a window that doesn’t have any project open, but in windows with a folder open, it doesn’t work.

You mean in “it doesn’t work” in regards to logging in like seen in the left image?
It might be related, that it stores data when a project is open (like in the left image) and the data seems to be out-dated. You need to go through the manual access token step here again. Or try to logout and login again with your new token.

Yes, I’m referring to the login. When you say the extension stores data — which data exactly are you referring to? As I mentioned yesterday, the manual login worked, but at that time I hadn’t tested it in windows with open projects. As soon as I saw it working in an empty window, I thought the issue was fully resolved. Does this mean that I’ll have to log in manually every time I open a new window?

Usually you don’t need to login in manually everytime. The login credentials are not stored or exchanged between VS code instances. For example, working on VS Code from Windows directly is different as from within WSL. The same applies for VS Code stable or VS Code Insiders version. Even on another PC, you need to login again to make your new token available to all machines. This is by design to prevent API key sharing.

But if I successfully logged in yesterday, and now again as I showed in the image, shouldn’t it be working in all windows? Do you still want me to try logging in again?