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

i can't use copilot in visual studio code

Open flcYtb opened this issue 1 year ago • 14 comments

Type: Bug

hello. i can't use copilot chat in visual studio code.

error log is here

[Extension Host] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token y @ console.ts:137 $logExtensionHostMessage @ mainThreadConsole.ts:39 S @ rpcProtocol.ts:458 Q @ rpcProtocol.ts:443 M @ rpcProtocol.ts:373 L @ rpcProtocol.ts:299 (anonymous) @ rpcProtocol.ts:161 B @ event.ts:1230 fire @ event.ts:1261 fire @ ipc.net.ts:652 K.onmessage @ localProcessExtensionHost.ts:378 log.ts:439 ERR [Extension Host] [LanguageModelAccess] Error: GitHubLoginFailed at RS.authShowWarnings (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:633:13828) at RS.getCopilotToken (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:633:11894) at Q_.getCopilotToken (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:144:2645) at PS._getAuthSession (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:634:2188) at r (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:634:627) at PS.registerLanguageModels (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:634:1513) at async Promise.all (index 0) at async Promise.allSettled (index 0) at Zct (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:1365:4403) at Xct (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:1365:3372) at m.n (c:\Users\s-uwa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:144:6409) at m (c:\Users\s-uwa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:144:6372) at m.l (c:\Users\s-uwa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:144:5829) console.ts:137 [Extension Host] [LanguageModelAccess] Error: GitHubLoginFailed at RS.authShowWarnings (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:633:13828) at RS.getCopilotToken (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:633:11894) at Q.getCopilotToken (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:144:2645) at PS._getAuthSession (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:634:2188) at r (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:634:627) at PS._registerLanguageModels (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:634:1513) at async Promise.all (index 0) at async Promise.allSettled (index 0) at Zct (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:1365:4403) at Xct (c:\Users\s-uwa.vscode\extensions\github.copilot-chat-0.18.1\dist\extension.js:1365:3372) at m.n (c:\Users\s-uwa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:144:6409) at m (c:\Users\s-uwa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:144:6372) at m.l (c:\Users\s-uwa\AppData\Local\Programs\Microsoft VS Code\resources\app\out\vs\workbench\api\node\extensionHostProcess.js:144:5829)

my plan is here, i have right of using copilot.

Copilot policies Copilot in the CLI Enabled You can use GitHub Copilot for assistance in terminal.

Copilot Chat in the IDE Enabled You can use GitHub Copilot Chat in the IDE to explain a piece of code, propose bug fixes, or generate unit tests in a chat interface from your editor.

Copilot Chat in GitHub Mobile Enabled You can use Copilot Chat in GitHub Mobile personalized to a codebase.

Suggestions matching public code (duplication detection filter) Copilot can allow or block suggestions matching public code. Learn more about code suggestions.

please tell me what do i do. thanks.

Extension version: 0.18.1 VS Code version: Code 1.92.0 (b1c0a14de1414fcdaa400695b4db1c0799bc3124, 2024-07-31T23:26:45.634Z) OS version: Windows_NT x64 10.0.22631 Modes: Unsupported

System Info
Item Value
CPUs AMD Ryzen 7 7735HS with Radeon Graphics (16 x 3194)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) undefined
Memory (System) 31.25GB (15.76GB free)
Process Argv --crash-reporter-id 0f58a6c2-6e53-4ca4-a70c-0c953dbbb28f
Screen Reader no
VM 0%
A/B Experiments
vsliv368cf:30146710
vspor879:30202332
vspor708:30202333
vspor363:30204092
vswsl492cf:30256860
vscorecescf:30445987
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
vscrpc:30673769
2i9eh265:30646982
962ge761:30959799
pythongtdpath:30769146
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
01bff139:31013167
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupyter:31046869
impr_priority:31102340
refactort:31108082
ccpltc:31103427
pythonrstrctxtcf:31103194
1iic9185:31097392

flcYtb avatar Aug 03 '24 02:08 flcYtb

i already tried these.

  • In the bottom left corner of the Visual Studio Code window, click the Accounts icon, hover over your GitHub username, and click the Sign out button.
  • To reload Visual Studio Code, press F1 to open the command palette, and select Developer: Reload Window.
  • After Visual Studio Code reloads, sign back in to your GitHub account.

but, the issue persists, and my vscode and copilot extension's versions are latest.

flcYtb avatar Aug 03 '24 03:08 flcYtb

I found such tweet. My situation is same this tweet.

https://x.com/uYRpiPGFGDQULRp/status/1819327025309794440

In VS Code 1.92, the Copilot column does not appear when right-clicking, and the Chat in the left column does not respond. It seems that Github Copilot Chat 0.18.1 and 0.18.0 do not work. It works when I update to 0.17.1 (the GPT-4o conversion of Copilot applied in 1.92 seems to be applied in 0.17 and above).

VS Code 1.92で、右クリックで Copilot の欄が出なくなり、左欄の Chat も反応しない。どうやら、Github Copilot Chat 0.18.1, 0.18.0 が動かないもよう。0.17.1 に落としたら動く(一応 1.92で適用されたCopilotのGPT-4o化は、0.17以上ならされてるらしい)。

I downgradeed to v0.17.1, Copilot Chat works . Do you know why? Can't I use v0.18.3 or latest?

flcYtb avatar Aug 03 '24 14:08 flcYtb

This worked for me: https://github.com/orgs/community/discussions/134876#discussioncomment-10257723

livinsunny519 avatar Aug 07 '24 03:08 livinsunny519

@livinsunny519 Thank you for the info, but it didn't solve my problem.....

This worked for me: https://github.com/orgs/community/discussions/134876#discussioncomment-10257723

flcYtb avatar Aug 07 '24 05:08 flcYtb

for now, I installed VSCode 1.91(previous version), and Copilot Chat 0.17.1. Someone emailed me and told me about it, but I can't find them in this issue 😖

CopilotChat works, but of course, that doesn't solve the problem.

flcYtb avatar Aug 07 '24 05:08 flcYtb

Same issue here. I updated both VSCode and Copilot chat to the latest version and the chat stopped working. The error showed in the chat was: certificate has expired. I tried each one of the previously suggested solutions and nothing worked. Also had to comeback to the same versions @flcYtb mentioned and it is working again

CarlosaBauti avatar Aug 07 '24 20:08 CarlosaBauti

Installing Copilot v17.2 worked for me. v19 is acting up.

I'm running VSC Insiders Version: 1.93.0-insider (Universal) btw!

KaliaHayes avatar Aug 08 '24 01:08 KaliaHayes

Had to revert to version v1.201.0 for copilot and revert github chat to v0.17.0. If i both to the latest version it doesn't work at all. this seems to be the only work around

kennyr3221 avatar Aug 09 '24 12:08 kennyr3221

@flcYtb @CarlosaBauti @KaliaHayes @kennyr3221

Can you please tell me what the value of the github.copilot.preferredAccount setting is (VS Code Insiders users, click this link instead)? If you remove the value, does that fix the issue for you?

TylerLeonhardt avatar Aug 09 '24 21:08 TylerLeonhardt

@TylerLeonhardt Thank you for the info, my value of the github.copilot.preferredAccount setting is my GH account( s-***@***c.jp Should I just write the correct account name here...? ), I have verified that I can sign out of GH and then sign back in to GH with that account.

I remove it and leave it blank, I install latest vsCode( 1.92 ) and GitHub Copilot Chat( 0.18.1 ), copilot chat seems to be working correctly.

flcYtb avatar Aug 09 '24 23:08 flcYtb

What's odd here is that preferredAccount shouldn't ever be an email address, but instead your username (or empty). Clearly several users are hitting this same behavior where it ends up getting set to an email address instead of the username ...but it's odd to me how this happens... more to investigate. Also, without a repro this is quite challenging.

Do you have any other GitHub related extensions installed? Are you running in Codespaces maybe?

TylerLeonhardt avatar Aug 10 '24 00:08 TylerLeonhardt

@TylerLeonhardt This problem started after the vsCode update notice was released this month( 2024/08, v1.92 ) .

I don't use Codespaces.

These are my extensions. I narrowed it down by '@enabled git', so I'm listing the ones that are not related to github.

mhutchie.git-graph GitHub.copilot GitHub.copilot-chat GitHub.vscode-pull-request-github GitHub.github-vscode-theme eamodio.gitlens

flcYtb avatar Aug 10 '24 02:08 flcYtb

@flcYtb @CarlosaBauti @KaliaHayes @kennyr3221

Can you please tell me what the value of the github.copilot.preferredAccount setting is (VS Code Insiders users, click this link instead)? If you remove the value, does that fix the issue for you?

the value for preferred account was empty on the latest update for github copilot , but when i revert back to version v1.201.0 for copilot and revert github chat to v0.17.0 it shows up as my Email rather than my username. As far as extensions related to git. actions, Code Space, copilot, pull request, repositories, and git theme.

edit: deleted my preferred account it did fetch the auth token again, it started to work.

kennyr3221 avatar Aug 10 '24 05:08 kennyr3221

I couldn't use my extension in vscode until now, did anyone solve the problem?😭

martin666888 avatar Aug 12 '24 03:08 martin666888

@Martianing Have you tried this method? Of course, you need to enable github copilot (https://github.com/settings/copilot), but if you've already done that, just leave the field blank. ↓↓↓↓↓

@flcYtb @CarlosaBauti @KaliaHayes @kennyr3221

Can you please tell me what the value of the github.copilot.preferredAccount setting is (VS Code Insiders users, click this link instead)? If you remove the value, does that fix the issue for you?

flcYtb avatar Aug 12 '24 04:08 flcYtb

@flcYtb Now there is still a problem, I don't even know what went wrong, it's just that when I open the vscode extension again there is nothing, and there is no response to sending messages! image

martin666888 avatar Aug 12 '24 09:08 martin666888

@Martianing If leaving github.copilot.preferredAccount blank doesn't solve your problem, it's probably a different issue than mine, so you might want to create a new issue and report it as a different problem.

flcYtb avatar Aug 12 '24 09:08 flcYtb

@flcYtb thank you!I will try to find some other way.

martin666888 avatar Aug 12 '24 09:08 martin666888

I found such tweet. My situation is same this tweet.

https://x.com/uYRpiPGFGDQULRp/status/1819327025309794440

In VS Code 1.92, the Copilot column does not appear when right-clicking, and the Chat in the left column does not respond. It seems that Github Copilot Chat 0.18.1 and 0.18.0 do not work. It works when I update to 0.17.1 (the GPT-4o conversion of Copilot applied in 1.92 seems to be applied in 0.17 and above).

VS Code 1.92で、右クリックで Copilot の欄が出なくなり、左欄の Chat も反応しない。どうやら、Github Copilot Chat 0.18.1, 0.18.0 が動かないもよう。0.17.1 に落としたら動く(一応 1.92で適用されたCopilotのGPT-4o化は、0.17以上ならされてるらしい)。

I downgradeed to v0.17.1, Copilot Chat works . Do you know why? Can't I use v0.18.3 or latest?

Gracias me ayudaste a resolverlo

AlexeiEvenepoel avatar Aug 20 '24 13:08 AlexeiEvenepoel

I believe I tracked this down. You can try the fix in the:

TylerLeonhardt avatar Aug 20 '24 18:08 TylerLeonhardt

@TylerLeonhardt

Thank you✨️

Is there anything I can try?

I installed the VS Code Insiders build and the pre-release version of Github Copilot Chat.

I confirmed that Github Copilot Chat works properly when I leave github.copilot.preferredAccount blank or enter an account name, but does not work when I enter an email address.

flcYtb avatar Aug 20 '24 23:08 flcYtb

@flcYtb Hi! Thanks for being willing to try! You actually need tomorrow's prerelease of the Copilot Chat extension. Sorry about that.

Would you mind trying tomorrow? I believe the extension will be released in like... 6hrs or so.

TylerLeonhardt avatar Aug 21 '24 01:08 TylerLeonhardt

@TylerLeonhardt Okay, thanks for the info! I'll try it tomorrow.

flcYtb avatar Aug 21 '24 04:08 flcYtb

@flcYtb should be available to test now! You need v0.20.2024082101 of Copilot Chat.

TylerLeonhardt avatar Aug 21 '24 21:08 TylerLeonhardt

@TylerLeonhardt I checked it! It seems to work without any problems.

GitHub Copilot works when github.copilot.preferredAccount is blank or is the name of an account already logged in to GitHub.

If for some reason a string that is not an account name (such as an email address or a meaningless string like "aaa") is entered, I am prompted to log in to GitHub, and once I log in it is replaced with my account name and GitHub Copilot starts working.

Thank you!!

flcYtb avatar Aug 21 '24 23:08 flcYtb

Same issues after 30 mins using copilot. issues happen every 30 mins using and have to restart extention copilot again :

2024-09-10 15:06:56.257 [info] [auth] Got Copilot token for mjkokid 2024-09-10 15:06:56.266 [info] [chat] copilot token chat_enabled: true 2024-09-10 15:06:56.266 [info] [githubTitleAndDescriptionProvider] GitHub.vscode-pull-request-github extension is not yet activated. 2024-09-10 15:06:59.008 [info] [contributions] activationBlocker from 'languageModelAccess' took for 8596ms 2024-09-10 15:07:25.978 [info] [chat fetch] request.response: [https://api.business.githubcopilot.com/chat/completions], took 2040 ms 2024-09-10 15:07:26.002 [info] [streamMessages] message 0 returned. finish reason: [stop] 2024-09-10 15:07:26.003 [info] [streamChoices] request done: requestId: [5d78769c-10ad-4121-beee-1108c7357a53] model deployment ID: [] 2024-09-10 15:07:28.060 [info] [chat fetch] request.response: [https://api.business.githubcopilot.com/chat/completions], took 2051 ms 2024-09-10 15:07:28.062 [info] [streamMessages] message 0 returned. finish reason: [stop] 2024-09-10 15:07:28.063 [info] [streamChoices] request done: requestId: [531d51a2-39f3-4ede-9a42-7f5ebd978ea1] model deployment ID: [] 2024-09-10 15:31:56.332 [info] [auth] Logged in as mjkokid 2024-09-10 15:36:59.159 [info] [auth] Logged in as mjkokid 2024-09-10 15:37:00.215 [info] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token 2024-09-10 15:37:00.215 [info] [LanguageModelAccess] SyntaxError: Unexpected token '<', " <h"... is not valid JSON at JSON.parse () at t.json (c:\Users\apo1hc.vscode\extensions\github.copilot-chat-0.18.2\dist\extension.js:13:17068) at processTicksAndRejections (node:internal/process/task_queues:95:5) at kS.authFromGitHubToken (c:\Users\apo1hc.vscode\extensions\github.copilot-chat-0.18.2\dist\extension.js:633:3978) at kS.auth (c:\Users\apo1hc.vscode\extensions\github.copilot-chat-0.18.2\dist\extension.js:633:13173) at kS.authShowWarnings (c:\Users\apo1hc.vscode\extensions\github.copilot-chat-0.18.2\dist\extension.js:633:13330) at kS.getCopilotToken (c:\Users\apo1hc.vscode\extensions\github.copilot-chat-0.18.2\dist\extension.js:633:12143) at Q_.getCopilotToken (c:\Users\apo1hc.vscode\extensions\github.copilot-chat-0.18.2\dist\extension.js:144:2645) at AS._getAuthSession (c:\Users\apo1hc.vscode\extensions\github.copilot-chat-0.18.2\dist\extension.js:634:2188) at Timeout.r [as _onTimeout] (c:\Users\apo1hc.vscode\extensions\github.copilot-chat-0.18.2\dist\extension.js:634:627)

mjkokid avatar Sep 10 '24 08:09 mjkokid

@mjkokid Are you using version 0.18.2? The current version is 0.20.0, so why not try updating to the latest version? I'm using the current version (0.20.0) and it's working fine.

flcYtb avatar Sep 10 '24 22:09 flcYtb

@flcYtb I have uninstall and re-install Copilot but it's still 0.18.2

mjkokid avatar Sep 11 '24 01:09 mjkokid

@mjkokid According to https://marketplace.visualstudio.com/items?itemName=GitHub.copilot-chat&ssr=false

The latest version seems to be 0.20 or 0.21.

If you uninstall and reinstall it and it still shows 0.18.2, then I think it's a different problem, so I think it would be better to open a separate issue.

flcYtb avatar Sep 11 '24 03:09 flcYtb