Repository: vscode
Issue: Copilot stuck after website authentification
Labels: info-needed,network


Type: <b>Bug</b>

I click on "Sign in to GitHub.com"
Sign in on the website.
Get redirected to VsCode and then nothing happens.
The prompt "Ask Copilot Sign in with GitHub to use GitHub Copilot, your AI pair programmer." is still there. Same display as before the login. I am asked to click "Sign in to GitHub.com" again.

Probably an error due to me using VsCode via Remote SSH on a HPC (high performance computer) System.
I replaced my user name with \<user\> and real path to home with \~/

Remote Machine HPC
lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: RedHatEnterprise
Description:    Red Hat Enterprise Linux release 8.8 (Ootpa)
Release:        8.8
Codename:       Ootpa

##########################################
Output GitHub Copilot:
2025-01-17 07:37:44.497 [warning] [certificates] Failed to parse certificate # DWD Prod CA 2
 Error: error:0480006C:PEM routines::no start line
    at new X509Certificate (node:internal/crypto/x509:119:21)
    at \~/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/certificateReaders.ts:79:36
    at Array.filter (<anonymous>)
    at nse.removeExpiredCertificates (\~/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/certificateReaders.ts:77:32)
    at nse.getAllRootCAs (\~/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/certificateReaders.ts:68:38)
    at Tge.createSecureContext (\~/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/certificates.ts:47:23) {
  opensslErrorStack: [
    'error:0688010A:asn1 encoding routines::nested asn1 error',
    'error:06800066:asn1 encoding routines::bad object header',
    'error:0680009B:asn1 encoding routines::too long'
  ],
  library: 'PEM routines',
  reason: 'no start line',
  code: 'ERR_OSSL_PEM_NO_START_LINE'
}
2025-01-17 07:37:44.497 [info] [certificates] Removed 4 expired certificates
2025-01-17 07:37:45.116 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-17 07:37:45.605 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-17 07:37:45.606 [info] [code-referencing] Public code references are enabled.
2025-01-17 07:54:46.260 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-17 07:54:46.260 [info] [code-referencing] Public code references are enabled.
2025-01-17 07:54:46.288 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-17 07:54:46.288 [info] [code-referencing] Public code references are enabled.
2025-01-17 07:54:46.323 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-17 07:54:46.323 [info] [code-referencing] Public code references are enabled.
2025-01-17 07:56:55.499 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-17 07:56:55.499 [info] [code-referencing] Public code references are enabled.
2025-01-17 07:56:55.520 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-17 07:56:55.520 [info] [code-referencing] Public code references are enabled.
2025-01-17 07:56:55.526 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-17 07:56:55.526 [info] [code-referencing] Public code references are enabled.


########################
Output GitHub Copilot Chat

2025-01-17 07:37:42.700 [info] Can't use the Electron fetcher in this environment.
2025-01-17 07:37:42.700 [info] Using the Node fetch fetcher.
2025-01-17 07:37:42.700 [info] Initializing Git extension service.
2025-01-17 07:37:42.700 [info] Successfully activated the vscode.git extension.
2025-01-17 07:37:42.700 [info] Enablement state of the vscode.git extension: true.
2025-01-17 07:37:42.700 [info] Successfully registered Git commit message provider.
2025-01-17 07:37:44.937 [info] Logged in as \<user\>
2025-01-17 07:37:45.029 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at ek._fetch (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at B0.fetchCopilotToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
    at B0.authFromGitHubToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
    at B0._auth (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023): Failed to get copilot token
2025-01-17 07:37:45.029 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"
2025-01-17 07:37:45.029 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-17 07:37:45.029 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at ek._fetch (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at B0.fetchCopilotToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
    at B0.authFromGitHubToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
    at B0._auth (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023)
2025-01-17 07:37:45.029 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-17 07:37:45.029 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at ek._fetch (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at B0.fetchCopilotToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
    at B0.authFromGitHubToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
    at B0._auth (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023)
2025-01-17 07:37:45.029 [info] activationBlocker from 'languageModelAccess' took for 2758ms
2025-01-17 07:52:45.233 [info] Logged in as \<user\>
2025-01-17 07:52:45.250 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-17 07:52:45.250 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at ek._fetch (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at B0.fetchCopilotToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
    at B0.authFromGitHubToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
    at B0._auth (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023)
    at B0._authShowWarnings (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3203)
    at B0.getCopilotToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:2438)
    at dF.getCopilotToken (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:26267)
    at Y0._getAuthSession (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:2825)
    at Object.A [as task] (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:640)
    at xC._processQueue (\~/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:487:1101)
2025-01-17 07:54:46.175 [info] Logged in as \<user\>
2025-01-17 07:56:55.503 [info] Logged in as \<user\>



VS Code version: Code 1.96.4 (cd4ee3b1c348a13bafd8f9ad8060705f6d4b9cba, 2025-01-16T00:16:19.038Z)
OS version: Windows_NT x64 10.0.19045
Modes:
Remote OS version: Linux x64 4.18.0-477.15.1.el8_8.x86_64

<details>
<summary>System Info</summary>

|Item|Value|
|---|---|
|CPUs|Intel(R) Core(TM) i5-5200U CPU @ 2.20GHz (4 x 2195)|
|GPU Status|2d_canvas: enabled<br>canvas_oop_rasterization: enabled_on<br>direct_rendering_display_compositor: disabled_off_ok<br>gpu_compositing: enabled<br>multiple_raster_threads: enabled_on<br>opengl: enabled_on<br>rasterization: enabled<br>raw_draw: disabled_off_ok<br>skia_graphite: disabled_off<br>video_decode: enabled<br>video_encode: enabled<br>vulkan: disabled_off<br>webgl: enabled<br>webgl2: enabled<br>webgpu: enabled<br>webnn: disabled_off|
|Load (avg)|undefined|
|Memory (System)|7.92GB (2.10GB free)|
|Process Argv|--crash-reporter-id 0946425e-424a-4684-b202-1aab6b06ca43|
|Screen Reader|no|
|VM|0%|

|Item|Value|
|---|---|
|Remote|SSH: rcl|
|OS|Linux x64 4.18.0-477.15.1.el8_8.x86_64|
|CPUs|AMD EPYC 7502 32-Core Processor (64 x 3348)|
|Memory (System)|250.44GB (149.05GB free)|
|VM|0%|
</details><details><summary>Extensions (15)</summary>

Extension|Author (truncated)|Version
---|---|---
jupyter-keymap|ms-|1.1.2
remote-ssh|ms-|0.116.1
remote-ssh-edit|ms-|0.87.0
remote-wsl|ms-|0.88.5
remote-explorer|ms-|0.4.3
pdf|tom|1.2.2
linter-gfortran|for|3.4.2024101621
chatgpt-vscode|gen|0.0.13
copilot|Git|1.257.0
copilot-chat|Git|0.23.2
bash-ide-vscode|mad|1.43.0
debugpy|ms-|2024.14.0
python|ms-|2024.22.2
vscode-pylance|ms-|2024.12.1
cpptools|ms-|1.22.11


</details><details>
<summary>A/B Experiments</summary>

```
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805cf:30301675
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupytercf:31046870
2f103344:31071589
nativerepl2:31139839
pythonrstrctxt:31112756
nativeloc2:31192216
cf971741:31144450
iacca1:31171482
notype1cf:31157160
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
390bf810:31215807
6074i472:31201624
dwoutputs:31217127

```

</details>

<!-- generated by issue reporter -->