vscode-copilot-release icon indicating copy to clipboard operation
vscode-copilot-release copied to clipboard

Invalid copilot token: missing token: 403. (And, "Chat failed to load. Please ensure that the GitHub Copilot Chat extension is up to date.")

Open San1k-02 opened this issue 1 year ago • 41 comments

  • VS Code Version: 1.89.0
  • OS Version: Windows 11 23H2 22631.3527
  • Logs: 2024-05-07 16:56:26.577 [info] [FetcherService] Using Helix fetcher 2024-05-07 16:56:26.577 [info] [gitExtensionService] Initializing Git extension service. 2024-05-07 16:56:26.577 [info] [gitExtensionService] Successfully activated the vscode.git extension. 2024-05-07 16:56:26.577 [info] [gitExtensionService] Enablement state of the vscode.git extension: true. 2024-05-07 16:56:26.577 [info] [gitExtensionService] Successfully registered Git commit message provider. 2024-05-07 16:56:26.704 [info] [FetcherService] Using Electron fetcher 2024-05-07 16:56:26.711 [info] [auth] Logged in as San1k-02 2024-05-07 16:56:27.088 [info] [auth] Invalid copilot token: missing token: 403 2024-05-07 16:56:27.090 [info] [extension] GitHub Copilot could not connect to server. Extension activation failed: "Failed to get copilot token" 2024-05-07 16:56:27.093 [info] [auth] Logged in as San1k-02 2024-05-07 16:56:27.402 [info] [auth] Invalid copilot token: missing token: 403 2024-05-07 16:56:27.517 [info] [RemoteAgents] Invalid remote agent response: access denied (SyntaxError: Unexpected token 'a', "access denied " is not valid JSON)

Steps to Reproduce:

  1. Open VS Code
  2. Use GitHub Copilot Chat

San1k-02 avatar May 07 '24 13:05 San1k-02

With release version (v.0.15.0) of Chat logs are: 2024-05-07 16:59:44.298 [info] [FetcherService] Using Helix fetcher 2024-05-07 16:59:44.298 [info] [gitExtensionService] Initializing Git extension service. 2024-05-07 16:59:44.298 [info] [gitExtensionService] Successfully activated the vscode.git extension. 2024-05-07 16:59:44.298 [info] [gitExtensionService] Enablement state of the vscode.git extension: true. 2024-05-07 16:59:44.298 [info] [gitExtensionService] Successfully registered Git commit message provider. 2024-05-07 16:59:44.420 [info] [FetcherService] Using Electron fetcher 2024-05-07 16:59:44.423 [info] [auth] Logged in as San1k-02 2024-05-07 16:59:44.788 [info] [auth] Invalid copilot token: missing token: 403 2024-05-07 16:59:44.790 [info] [extension] GitHub Copilot could not connect to server. Extension activation failed: "Failed to get copilot token" 2024-05-07 16:59:44.805 [info] [auth] Logged in as San1k-02 2024-05-07 16:59:45.032 [info] [auth] Invalid copilot token: missing token: 403

Otherwise, GitHub Copilot works perfectly

San1k-02 avatar May 07 '24 14:05 San1k-02

Please ensure that the GitHub Copilot Chat extension is up to date.

jrieken avatar May 07 '24 14:05 jrieken

Please ensure that the GitHub Copilot Chat extension is up to date.

It's updated.

San1k-02 avatar May 07 '24 14:05 San1k-02

please share the full version number

jrieken avatar May 07 '24 14:05 jrieken

v.0.15.0 image

San1k-02 avatar May 07 '24 14:05 San1k-02

I am also hitting this issue. I have tried installing previous version but still chat does not work

nikolas-garza-ai avatar May 07 '24 22:05 nikolas-garza-ai

Hello guys, I'm also facing this issue with the version 0.15.0

joaofigueroa avatar May 08 '24 01:05 joaofigueroa

I'm also having this problem, I don't know why.

Jefsnkz avatar May 08 '24 01:05 Jefsnkz

I'm also having this problem, I don't know why.

lwl4613615 avatar May 08 '24 02:05 lwl4613615

Same here. Solved changing to the pre-release version.

airtongomeslima avatar May 08 '24 04:05 airtongomeslima

[info] [RemoteAgents] Invalid remote agent response: [object ReadableStream] (SyntaxError: Unexpected token 'o', "[object Rea"... is not valid JSON)

lwl4613615 avatar May 08 '24 06:05 lwl4613615

GitHub Copilot could not connect to server. Extension activation failed: "Failed to get copilot token"

⬆️ @TylerLeonhardt either something with auth

⬇️ @roblourens or something with remote agents

[info] [RemoteAgents] Invalid remote agent response: [object ReadableStream] (SyntaxError: Unexpected token 'o', "[object Rea"... is not valid JSON)

jrieken avatar May 08 '24 06:05 jrieken

I have the same problem starting from yesterday. Everything is the latest version. Switching to pre-release doesn't help. Copilot code completion also not working and when pressing ctrl+i it only shows pop up with trivial type-based suggestions. Although strangely GitHub Copilot: Open Completions Panel works fine and shows some code snippets, but it's inconvenient to use

ssslakter avatar May 08 '24 09:05 ssslakter

Same here. Solved changing to the pre-release version.

Not working for me, logs are:

2024-05-08 13:19:50.953 [info] [auth] Invalid copilot token: missing token: 403 2024-05-08 13:19:51.274 [info] [RemoteAgents] Invalid remote agent response: access denied (SyntaxError: Unexpected token 'a', "access denied " is not valid JSON)

v0.16.2024050801

San1k-02 avatar May 08 '24 10:05 San1k-02

The same issue after update to the v0.15.0 today

2024-05-08 14:28:53.819 [info] [auth] Logged in as mispon
2024-05-08 14:28:54.480 [info] [auth] Invalid copilot token: missing token: 403 
2024-05-08 14:28:54.481 [info] [extension] GitHub Copilot could not connect to server. Extension activation failed: "Failed to get copilot token"
2024-05-08 14:28:55.359 [info] [auth] Logged in as mispon
2024-05-08 14:28:55.617 [info] [auth] Invalid copilot token: missing token: 403 

mispon avatar May 08 '24 11:05 mispon

Same. Not working

bcdebusk avatar May 08 '24 13:05 bcdebusk

Sorry for the trouble. There seems to be an issue with authentication which incorrectly triggers the check that the extension may not be up to date. Looking into it. The RemoteAgents error is expected, just a red herring.

roblourens avatar May 08 '24 16:05 roblourens

And for anyone seeing this, has it gone away today, or if you reload the window, do you see it go away?

If not, are you behind a corporate proxy, or anything else interesting about your network configuration?

roblourens avatar May 08 '24 17:05 roblourens

The problem didn't go away after reloading window. I also use my own proxy

ssslakter avatar May 08 '24 17:05 ssslakter

And for anyone seeing this, has it gone away today, or if you reload the window, do you see it go away?

If not, are you behind a corporate proxy, or anything else interesting about your network configuration?

No, it didn't go away. I'm also using proxy, but Copilot works perfectly.

San1k-02 avatar May 08 '24 17:05 San1k-02

Could some of you try downgrading to VS Code 1.88 with the links at the top of the page here https://code.visualstudio.com/updates/v1_88

Then make sure to downgrade Copilot Chat to 0.14 (right click Copilot Chat > Install Another Version) and check whether it works for you? That would help us understand whether it's a client-side issue, or service/network issue

roblourens avatar May 08 '24 17:05 roblourens

Could some of you try downgrading to VS Code 1.88 with the links at the top of the page here https://code.visualstudio.com/updates/v1_88

Then make sure to downgrade Copilot Chat to 0.14 (right click Copilot Chat > Install Another Version) and check whether it works for you? That would help us understand whether it's a client-side issue, or service/network issue

I just tried VS Code v.1.88.1 and GitHub Copilot Chat v.0.14.0 and it works.

San1k-02 avatar May 08 '24 18:05 San1k-02

Alguns de vocês poderiam tentar fazer o downgrade para o VS Code 1.88 com os links no topo da página aqui https://code.visualstudio.com/updates/v1_88

Em seguida, certifique-se de fazer o downgrade do Copilot Chat para 0.14 (clique com o botão direito do mouse em Copilot Chat > Instalar outra versão) e verifique se ele funciona para você? Isso nos ajudaria a entender se é um problema do lado do cliente ou de serviço/rede

Hello! I've been having a problem with my Copilot since the day before yesterday, the day before yesterday I couldn't use it, I couldn't use Chat (I even uninstalled it and installed it back, then nothing happened) so I went out the other day and it ended up working, then last night it failed again. At Roblourens' suggestion, I installed version 1.88, I installed 1.89 several times, I reinstalled all the extensions and it doesn't work. When I try to click "Join" nothing happens to enter the chat. Can you help me with a guide? I'm new to using Copilot.

Jefsnkz avatar May 09 '24 11:05 Jefsnkz

I already know how to reproduce this issue 100%. When I use the latest version of VSCODE and install the latest version of GitHub Copilot Chat 0.15.0 and the plugin for this link, and complete the login and verification of the second plugin, I will encounter the issue of GitHub Copilot Chat not being able to be used. After uninstalling the second plugin, there is no problem.

the pugin link:https://marketplace.visualstudio.com/items?itemName=cnblogs.vscode-cnb

lwl4613615 avatar May 09 '24 13:05 lwl4613615

Thanks @lwl4613615, but it doesn't look like that extension is related to chat, so you might be seeing a different problem. Maybe you can open a new issue and share your logs or more details about what you see

roblourens avatar May 09 '24 15:05 roblourens

I have the same issue and checking the VSCode console, this appears:

image

eavelasquez avatar May 09 '24 15:05 eavelasquez

@eavelasquez please make sure both Copilot Chat and VS Code are updated to the latest, and open a new issue if you still have a problem

roblourens avatar May 09 '24 16:05 roblourens

@roblourens Just checked again on the latest version of VS Code (v.1.89.0) and Copilot Chat (v.0.15.0) and everything works. Did you fix something?

San1k-02 avatar May 09 '24 16:05 San1k-02

I've been facing the same issue for a couple of days now.

I just uninstalled CoPilot & VS Code. Re installed VS Code & the extension, and it gives me the same error. "Chat failed to load. Please ensure that the GitHub Copilot Chat extension is up to date."

Inline suggestion are working though.

VS Code - 1.89.1. I've tried 1.89.9 as well. Copilot Chat - v0.15.0

anupamg7 avatar May 09 '24 17:05 anupamg7

Alguns de vocês poderiam tentar fazer o downgrade para o VS Code 1.88 com os links no topo da página aqui https://code.visualstudio.com/updates/v1_88 Em seguida, certifique-se de fazer o downgrade do Copilot Chat para 0.14 (clique com o botão direito do mouse em Copilot Chat > Instalar outra versão) e verifique se ele funciona para você? Isso nos ajudaria a entender se é um problema do lado do cliente ou de serviço/rede

Olá! Eu tenho tido um problema com o meu Copilot desde anteontem, anteontem eu não pude usá-lo, eu não pude usar o Chat (eu até desinstalei e instalei de volta, então nada aconteceu) então eu saí no outro dia e ele acabou funcionando, então ontem à noite ele falhou novamente. Por sugestão do Roblourens, instalei a versão 1.88, instalei a 1.89 várias vezes, reinstalei todas as extensões e não funciona. Quando tento clicar em "Entrar" nada acontece para entrar no chat. Você pode me ajudar com um guia? Eu sou novo no uso do Copilot.

I just finished reinstalling Windows, downloaded i and installed Visual Studio Code again, downloaded the Github Copilot extension, and still nothing. 2024-05-10 07:23:41.173 [error] [auth] Extension activation failed: "Canceled"

Jefsnkz avatar May 09 '24 19:05 Jefsnkz