Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stuck with Retry Connection in CoPilot chat on WSL #3821

Open
deshguru opened this issue Jan 7, 2025 · 19 comments
Open

Stuck with Retry Connection in CoPilot chat on WSL #3821

deshguru opened this issue Jan 7, 2025 · 19 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug network Network infrastructure for request/response
Milestone

Comments

@deshguru
Copy link

deshguru commented Jan 7, 2025

  • Copilot Chat Extension Version: 0.23 (2024-12-12)
  • VS Code Version: 1.96.2
  • OS Version: WSL2 on Windows 11 Enterprise 23H2 OS build: 22631.4602
  • Logs:

GitHub Copilot Chat window shows Retry Connection on WSL, but works fine on Windows

Steps to Reproduce:

  1. Open VS Code on WSL.
  2. Access GitHub Copilot chat
  3. I see the following in the GitHub Copilot Chat log

2025-01-07 10:44:24.457 [info] Can't use the Electron fetcher in this environment.
2025-01-07 10:44:24.457 [info] Using the Node fetch fetcher.
2025-01-07 10:44:24.457 [info] Initializing Git extension service.
2025-01-07 10:44:24.457 [info] Successfully activated the vscode.git extension.
2025-01-07 10:44:24.457 [info] Enablement state of the vscode.git extension: true.
2025-01-07 10:44:24.457 [info] Successfully registered Git commit message provider.
2025-01-07 10:44:25.161 [info] Logged in as
2025-01-07 10:44:25.258 [error] TypeError: fetch failed
at node:internal/deps/undici/undici:13392:13
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at ek._fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
at B0.fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
at B0.authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
at B0._auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023): Failed to get copilot token
2025-01-07 10:44:25.258 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"
2025-01-07 10:44:25.259 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-07 10:44:25.259 [error] TypeError: fetch failed
at node:internal/deps/undici/undici:13392:13
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at ek._fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
at B0.fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
at B0.authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
at B0._auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023)
2025-01-07 10:44:25.259 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-07 10:44:25.259 [error] TypeError: fetch failed
at node:internal/deps/undici/undici:13392:13
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at ek._fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
at B0.fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
at B0.authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
at B0._auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023)
2025-01-07 10:44:25.259 [info] activationBlocker from 'languageModelAccess' took for 811ms

@github-actions github-actions bot added the triage-needed Issues needing to be assigned to the prospective feature owner label Jan 7, 2025
@joyceerhl joyceerhl assigned chrmarti and unassigned joyceerhl Jan 7, 2025
@joyceerhl joyceerhl removed the triage-needed Issues needing to be assigned to the prospective feature owner label Jan 7, 2025
@chrmarti
Copy link

chrmarti commented Jan 8, 2025

Could you retry with the latest VS Code Insiders (https://code.visualstudio.com/insiders/) and latest GitHub Copilot Chat pre-release version? That has improved logging and should give us more details about the TypeError: fetch failed error.

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Jan 8, 2025
@cailmdaley
Copy link

cailmdaley commented Jan 10, 2025

I've been seeing the same issue for a couple days, although sometimes the fetch succeeds if I reload the window enough times. Here are the logs with the latest version of Insiders and the Copilot Chat extension:

  • Copilot Chat Extension Version: 0.24.2025011001
  • VS Code Version: 1.97.0-insider
  • OS: Darwin arm64 24.1.0
  • Logs:
2025-01-10 12:06:13.936 [info] Can't use the Electron fetcher in this environment.
2025-01-10 12:06:13.936 [info] Using the Node fetch fetcher.
2025-01-10 12:06:13.936 [info] Initializing Git extension service.
2025-01-10 12:06:13.936 [info] Successfully activated the vscode.git extension.
2025-01-10 12:06:13.936 [info] Enablement state of the vscode.git extension: true.
2025-01-10 12:06:13.936 [info] Successfully registered Git commit message provider.
2025-01-10 12:06:15.956 [info] Logged in as cailmdaley
2025-01-10 12:06:16.195 [error] fetch failed
  getaddrinfo EAI_AGAIN api.github.com
TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Dk._fetch (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:876:5811)
    at HM.fetchCopilotToken (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:428:8092)
    at HM.authFromGitHubToken (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:428:5762)
    at HM._auth (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:540:3023): Failed to get copilot token
2025-01-10 12:06:16.196 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"
2025-01-10 12:06:16.196 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-10 12:06:16.196 [error] fetch failed
  getaddrinfo EAI_AGAIN api.github.com
TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Dk._fetch (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:876:5811)
    at HM.fetchCopilotToken (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:428:8092)
    at HM.authFromGitHubToken (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:428:5762)
    at HM._auth (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:540:3023)
2025-01-10 12:06:16.196 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-10 12:06:16.196 [error] fetch failed
  getaddrinfo EAI_AGAIN api.github.com
TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Dk._fetch (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:876:5811)
    at HM.fetchCopilotToken (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:428:8092)
    at HM.authFromGitHubToken (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:428:5762)
    at HM._auth (/home/cdaley/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011001/dist/extension.js:540:3023)
2025-01-10 12:06:16.197 [info] activationBlocker from 'languageModelAccess' took for 2421ms

@chrmarti
Copy link

@cailmdaley Please check the output of F1 > Developer: GitHub Copilot Chat Diagnostics in VS Code and append it here.

@rgonaute
Copy link

rgonaute commented Jan 10, 2025

Not exactly the same problem but I can't seem to even sign in to github via VSCode on WSL2 but it works perfectly on windows, here's the output:

GitHub Copilot Chat

  • Extension Version: 0.22.3 (prod)
  • VS Code: vscode/1.96.2
  • OS: Linux

Network

User Settings:

  "github.copilot.advanced": {
    "debug.useElectronFetcher": true,
    "debug.useNodeFetcher": false
  }

Connecting to https://api.github.com:

  • DNS ipv4 Lookup: 20.217.135.0 (6 ms)
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • Electron Fetcher (configured): HTTP 200 (205 ms)
  • Node Fetcher: HTTP 200 (42 ms)
  • Helix Fetcher: HTTP 200 (262 ms)

Connecting to https://api.githubcopilot.com/_ping:

  • DNS ipv4 Lookup: 140.82.113.21 (8 ms)
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • Electron Fetcher (configured): HTTP 200 (448 ms)
  • Node Fetcher: HTTP 200 (460 ms)
  • Helix Fetcher: HTTP 200 (476 ms)

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

p.s. I'm experiencing the same issue on insiders version.

@chrmarti
Copy link

@rgonaute Could you update the Copilot Chat extension to the latest stable version (0.23.2) and rerun the diagnostics command? Also append the Copilot Chat log from when this happens. (F1 > Output: Show Output Channels... > GitHub Copilot Chat)

@chrmarti chrmarti added the bug Issue identified by VS Code Team member as probable bug label Jan 11, 2025
@rgonaute
Copy link

rgonaute commented Jan 11, 2025

@chrmarti sure thing, thank you

(F1 > Developer: GitHub Copilot Chat Diagnostics)

GitHub Copilot Chat

  • Extension Version: 0.23.2 (prod)
  • VS Code: vscode/1.96.2
  • OS: Linux

Network

User Settings:

  "github.copilot.advanced.debug.useElectronFetcher": true,
  "github.copilot.advanced.debug.useNodeFetcher": false,
  "github.copilot.advanced.debug.useNodeFetchFetcher": true

Connecting to https://api.github.com:

  • DNS ipv4 Lookup: 20.217.135.0 (8 ms)
  • DNS ipv6 Lookup: Error (13 ms): getaddrinfo ENOTFOUND api.github.com
  • Proxy URL: None (17 ms)
  • Electron fetch (configured): HTTP 200 (179 ms)
  • Node.js https: HTTP 200 (37 ms)
  • Node.js fetch: HTTP 200 (203 ms)
  • Helix fetch: HTTP 200 (124 ms)

Connecting to https://api.githubcopilot.com/_ping:

  • DNS ipv4 Lookup: 140.82.114.22 (7 ms)
  • DNS ipv6 Lookup: Error (8 ms): getaddrinfo ENOTFOUND api.githubcopilot.com
  • Proxy URL: None (2 ms)
  • Electron fetch (configured): HTTP 200 (137 ms)
  • Node.js https: HTTP 200 (424 ms)
  • Node.js fetch: HTTP 200 (441 ms)
  • Helix fetch: HTTP 200 (435 ms)

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

(F1 > Output: Show Output Channels... > GitHub Copilot Chat)

2025-01-11 11:15:51.364 [info] Using the Electron fetcher.
2025-01-11 11:15:51.364 [info] Initializing Git extension service.
2025-01-11 11:15:51.364 [info] Successfully activated the vscode.git extension.
2025-01-11 11:15:51.364 [info] Enablement state of the vscode.git extension: true.
2025-01-11 11:15:51.364 [info] Successfully registered Git commit message provider.
2025-01-11 11:15:52.249 [warning] GitHub login failed
2025-01-11 11:15:52.250 [info] copilot token chat_enabled: undefined, sku: 
2025-01-11 11:15:53.539 [warning] GitHub login failed
2025-01-11 11:15:53.546 [error] Error: GitHubLoginFailed
    at B0._authShowWarnings (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3909)
    at B0.getCopilotToken (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:2438)
    at dF.getCopilotToken (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:26267)
    at IZ.waitForChatEnabled (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:444:13713)
    at IZ.run (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:444:13432)
    at w0.askToUpgradeAuthPermissions (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:444:12870): Failed to get copilot token
2025-01-11 11:15:53.546 [error] You are not signed in to GitHub. Please sign in to use Copilot.
2025-01-11 11:15:53.546 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-11 11:15:53.546 [error] Error: GitHubLoginFailed
    at B0._authShowWarnings (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3909)
    at B0.getCopilotToken (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:2438)
    at dF.getCopilotToken (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:26267)
    at Y0._getAuthSession (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:2825)
    at Object.A [as task] (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:640)
    at xC._processQueue (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:487:1101)
2025-01-11 11:15:53.546 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-11 11:15:53.546 [error] Error: GitHubLoginFailed
    at B0._authShowWarnings (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3909)
    at B0.getCopilotToken (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:2438)
    at dF.getCopilotToken (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:26267)
    at Y0._getAuthSession (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:2825)
    at r (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:2288)
    at Y0._registerEmbeddings (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:2787)
    at async Promise.all (index 1)
    at async Promise.allSettled (index 0)
    at tB.waitForActivationBlockers (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:13668)
    at /home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:2255:4201
    at Frr (/home/user/.vscode/extensions/github.copilot-chat-0.23.2/dist/extension.js:2255:4014)
    at K0.n (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:4447)
    at K0.m (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:4410)
    at K0.l (file:///usr/share/code/resources/app/out/vs/workbench/api/node/extensionHostProcess.js:115:3866)
2025-01-11 11:15:53.546 [info] activationBlocker from 'languageModelAccess' took for 1179ms
2025-01-11 11:15:54.075 [warning] [repo:nvm-sh/nvm] Error fetching code search. Error: bad request: Authorization header is badly formatted
. Retrying in 1ms. Query: text
2025-01-11 11:15:54.313 [warning] [repo:nvm-sh/nvm] Error fetching code search. Error: bad request: Authorization header is badly formatted
. Retrying in 2ms. Query: text
2025-01-11 11:15:54.551 [warning] [repo:nvm-sh/nvm] Error fetching code search. Error: bad request: Authorization header is badly formatted
. Retrying in 3ms. Query: text
2025-01-11 11:15:54.652 [warning] [repo:nvm-sh/nvm] Max Retry Error thrown while querying 'text'
2025-01-11 11:17:10.185 [info] Removed 1 expired certificates

@chrmarti
Copy link

@rgonaute Thanks, continuing with your case in #3939.

@deshguru
Copy link
Author

deshguru commented Jan 13, 2025

Could you retry with the latest VS Code Insiders (https://code.visualstudio.com/insiders/) and latest GitHub Copilot Chat pre-release version? That has improved logging and should give us more details about the TypeError: fetch failed error.

Hi @chrmarti

Here's the logs with the VS Code Insiders version 1.97.0-insider and GitHub Copilot Chat pre-release version 0.24.2025011301

GitHub Copilot logs
2025-01-13 15:31:31.521 [info] [certificates] Removed 3 expired certificates
2025-01-13 15:31:32.221 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2025-01-13 15:31:32.823 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.

GitHub Copilot Chat logs
2025-01-13 15:31:31.326 [info] Can't use the Electron fetcher in this environment.
2025-01-13 15:31:31.326 [info] Using the Node fetch fetcher.
2025-01-13 15:31:31.326 [info] Initializing Git extension service.
2025-01-13 15:31:31.326 [info] Successfully activated the vscode.git extension.
2025-01-13 15:31:31.326 [info] Enablement state of the vscode.git extension: true.
2025-01-13 15:31:31.326 [info] Successfully registered Git commit message provider.
2025-01-13 15:31:31.899 [info] Logged in as Guru-Deshkulkarni_PegaCfB
2025-01-13 15:31:31.970 [error] fetch failed
connect ECONNREFUSED 127.0.0.1:9000
TypeError: fetch failed
at node:internal/deps/undici/undici:13392:13
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Gy._fetch (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:927:5885)
at eG.fetchCopilotToken (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:428:8092)
at eG.authFromGitHubToken (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:428:5762)
at eG._auth (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:540:3023): Failed to get copilot token
2025-01-13 15:31:31.970 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"
2025-01-13 15:31:31.971 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-13 15:31:31.971 [error] fetch failed
connect ECONNREFUSED 127.0.0.1:9000
TypeError: fetch failed
at node:internal/deps/undici/undici:13392:13
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Gy._fetch (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:927:5885)
at eG.fetchCopilotToken (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:428:8092)
at eG.authFromGitHubToken (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:428:5762)
at eG._auth (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:540:3023)
2025-01-13 15:31:31.971 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-13 15:31:31.971 [error] fetch failed
connect ECONNREFUSED 127.0.0.1:9000
TypeError: fetch failed
at node:internal/deps/undici/undici:13392:13
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at Gy._fetch (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:927:5885)
at eG.fetchCopilotToken (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:428:8092)
at eG.authFromGitHubToken (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:428:5762)
at eG._auth (/home/linuxadmin/.vscode-server-insiders/extensions/github.copilot-chat-0.24.2025011301/dist/extension.js:540:3023)
2025-01-13 15:31:31.971 [info] activationBlocker from 'languageModelAccess' took for 657ms
2025-01-13 15:31:47.896 [info] Logged in as Guru-Deshkulkarni_PegaCfB
2025-01-13 15:31:47.909 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"
2025-01-13 15:32:09.916 [info] Logged in as Guru-Deshkulkarni_PegaCfB
2025-01-13 15:32:09.926 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"
2025-01-13 15:33:00.355 [info] Logged in as Guru-Deshkulkarni_PegaCfB
2025-01-13 15:33:00.380 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"

@deshguru
Copy link
Author

Hi @chrmarti

Also, here's the output of (F1 > Developer: GitHub Copilot Chat Diagnostics) as you requested from another user.

GitHub Copilot Chat

  • Extension Version: 0.24.2025011301 (prod)
  • VS Code: vscode/1.97.0-insider
  • OS: Linux
  • Remote Name: wsl

Network

User Settings:

  "github.copilot.advanced.debug.useElectronFetcher": true,
  "github.copilot.advanced.debug.useNodeFetcher": false,
  "github.copilot.advanced.debug.useNodeFetchFetcher": true

Connecting to https://api.github.com:

  • DNS ipv4 Lookup: 140.82.121.6 (118 ms)
  • DNS ipv6 Lookup: Error (18 ms): getaddrinfo ENOTFOUND api.github.com
  • Proxy URL: http://127.0.0.1:9000 (0 ms)
  • Proxy Connection: Error (1 ms): connect ECONNREFUSED 127.0.0.1:9000
  • Electron fetch: Unavailable
  • Node.js https: Error (3 ms): Failed to establish a socket connection to proxies: PROXY 127.0.0.1:9000
  • Node.js fetch (configured): Error (22 ms): fetch failed
    connect ECONNREFUSED 127.0.0.1:9000
  • Helix fetch: HTTP 200 (457 ms)

Connecting to https://api.githubcopilot.com/_ping:

  • DNS ipv4 Lookup: 140.82.113.22 (4 ms)
  • DNS ipv6 Lookup: Error (7 ms): getaddrinfo ENOTFOUND api.githubcopilot.com
  • Proxy URL: http://127.0.0.1:9000 (23 ms)
  • Proxy Connection: Error (2 ms): connect ECONNREFUSED 127.0.0.1:9000
  • Electron fetch: Unavailable
  • Node.js https: Error (2 ms): Failed to establish a socket connection to proxies: PROXY 127.0.0.1:9000
  • Node.js fetch (configured): Error (16 ms): fetch failed
    connect ECONNREFUSED 127.0.0.1:9000
  • Helix fetch: HTTP 200 (344 ms)

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

@chrmarti
Copy link

ECONNREFUSED 127.0.0.1:9000 suggests that you have a proxy running locally on port 9000, but that does not work inside WSL. Possible workarounds:

  • Remove the configuration for the proxy while using WSL (assuming networking also works without proxy).
  • Set WSL's networking into mirrored mode (this should make the local interface available inside WSL).

@deshguru
Copy link
Author

ECONNREFUSED 127.0.0.1:9000 suggests that you have a proxy running locally on port 9000, but that does not work inside WSL. Possible workarounds:

  • Remove the configuration for the proxy while using WSL (assuming networking also works without proxy).
  • Set WSL's networking into mirrored mode (this should make the local interface available inside WSL).

Hello @chrmarti

Thank you for the suggestion. I set the WSL's networking into mirrored mode and I can now access Copilot chat. The strange thing is, this was working fine until a couple of weeks ago. So, I don't know what triggered this behavior.

Now, I have run into another issue, which may or may not be related to this. I get "Unable to get local issuer certificate" error now, and the automatic code suggestions have stopped working (again all this only on WSL; on Windows it works fine).

Here's the GitHub Copilot log, just in case it's somehow related:

2025-01-14 12:38:35.655 [info] [certificates] Removed 3 expired certificates
2025-01-14 12:38:41.074 [error] [auth] auth: FetchError: unable to get local issuer certificate
at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22)
at fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/auth/copilotToken.ts:204:16)
at authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/auth/copilotToken.ts:135:22)
at auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:30:25)
at authShowWarnings (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:87:25)
at Rse.getCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:135:33) {
type: 'system',
_name: 'FetchError',
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
errno: undefined,
erroredSysCall: undefined
}
2025-01-14 12:38:55.023 [error] [default] Error sending telemetry FetchError: unable to get local issuer certificate
at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) {
type: 'system',
_name: 'FetchError',
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
errno: undefined,
erroredSysCall: undefined
}
2025-01-14 12:40:21.407 [error] [default] Error sending telemetry FetchError: unable to get local issuer certificate
at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) {
type: 'system',
_name: 'FetchError',
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
errno: undefined,
erroredSysCall: undefined
}
2025-01-14 12:50:02.886 [error] [default] Error sending telemetry FetchError: unable to get local issuer certificate
at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) {
type: 'system',
_name: 'FetchError',
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
errno: undefined,
erroredSysCall: undefined
}
2025-01-14 12:55:46.665 [error] [default] Error sending telemetry FetchError: unable to get local issuer certificate
at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) {
type: 'system',
_name: 'FetchError',
code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY',
errno: undefined,
erroredSysCall: undefined
}

@deshguru
Copy link
Author

ECONNREFUSED 127.0.0.1:9000 suggests that you have a proxy running locally on port 9000, but that does not work inside WSL. Possible workarounds:

  • Remove the configuration for the proxy while using WSL (assuming networking also works without proxy).
  • Set WSL's networking into mirrored mode (this should make the local interface available inside WSL).

Hello @chrmarti

Thank you for the suggestion. I set the WSL's networking into mirrored mode and I can now access Copilot chat. The strange thing is, this was working fine until a couple of weeks ago. So, I don't know what triggered this behavior.

Now, I have run into another issue, which may or may not be related to this. I get "Unable to get local issuer certificate" error now, and the automatic code suggestions have stopped working (again all this only on WSL; on Windows it works fine).

Here's the GitHub Copilot log, just in case it's somehow related:

2025-01-14 12:38:35.655 [info] [certificates] Removed 3 expired certificates 2025-01-14 12:38:41.074 [error] [auth] auth: FetchError: unable to get local issuer certificate at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16) at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) at fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/auth/copilotToken.ts:204:16) at authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/auth/copilotToken.ts:135:22) at auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:30:25) at authShowWarnings (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:87:25) at Rse.getCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:135:33) { type: 'system', _name: 'FetchError', code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', errno: undefined, erroredSysCall: undefined } 2025-01-14 12:38:55.023 [error] [default] Error sending telemetry FetchError: unable to get local issuer certificate at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16) at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) { type: 'system', _name: 'FetchError', code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', errno: undefined, erroredSysCall: undefined } 2025-01-14 12:40:21.407 [error] [default] Error sending telemetry FetchError: unable to get local issuer certificate at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16) at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) { type: 'system', _name: 'FetchError', code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', errno: undefined, erroredSysCall: undefined } 2025-01-14 12:50:02.886 [error] [default] Error sending telemetry FetchError: unable to get local issuer certificate at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16) at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) { type: 'system', _name: 'FetchError', code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', errno: undefined, erroredSysCall: undefined } 2025-01-14 12:55:46.665 [error] [default] Error sending telemetry FetchError: unable to get local issuer certificate at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11) at processTicksAndRejections (node:internal/process/task_queues:95:5) at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16) at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) { type: 'system', _name: 'FetchError', code: 'UNABLE_TO_GET_ISSUER_CERT_LOCALLY', errno: undefined, erroredSysCall: undefined }

An update on the certificate issue and the auto code completions:

Both issues got resolved after I disabled Http: Proxy Strict SSL in vscode settings.

So, all my issues are now resolved.

Thank you.

@chrmarti
Copy link

Thanks for the feedback! I'm not sure if mirrored networking could somehow trigger the certificate issue. If you want to investigate that further, you could install the Network Proxy Test extension (https://marketplace.visualstudio.com/items?itemName=chrmarti.network-proxy-test) in WSL and check the output of F1 > Network Proxy Test: Test Connection.

Reopening to track that we add a way to handle the localhost proxy case better.

@chrmarti chrmarti reopened this Jan 14, 2025
@chrmarti chrmarti added network Network infrastructure for request/response and removed info-needed Issue requires more information from poster labels Jan 14, 2025
@deshguru
Copy link
Author

@chrmarti

I'm afraid I have run into some network related issue again. I have not tried anything in the environment since I wrote last time when it worked.

Here's what's happening now.

  1. When I open VS Code on WSL, the Copilot icon on the bottom left corner says "Copilot error (click for details)"
  2. When I click on the icon, at the top, it says "Status: Request to https://api.github.com/copilot_internal/v2/token timed out after 12000..."

Again, it's working fine on Windows.

Here's the GitHub Copilot log:

2025-01-16 12:41:51.518 [info] [certificates] Removed 1 expired certificates
2025-01-16 12:46:20.669 [error] [auth] auth: HttpTimeoutError: Request to <https://api.github.com/copilot_internal/v2/token> timed out after 120000ms
    at /home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:96:19
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22)
    ... 4 lines matching cause stack trace ...
    at Rse.getCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:135:33) {
  cause: FetchError: tunneling socket could not be established, cause=connect ETIMEDOUT 127.0.0.1:9000
      at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
      at processTicksAndRejections (node:internal/process/task_queues:95:5)
      at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
      at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22)
      at fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/auth/copilotToken.ts:204:16)
      at authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/auth/copilotToken.ts:135:22)
      at auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:30:25)
      at authShowWarnings (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:87:25)
      at Rse.getCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/extension/src/auth.ts:135:33) {
    type: 'system',
    _name: 'FetchError',
    code: 'ETIMEDOUT',
    errno: -110,
    erroredSysCall: 'connect'
  }
}
2025-01-16 12:46:36.016 [error] [default] Error sending telemetry FetchError: tunneling socket could not be established, cause=connect ETIMEDOUT 127.0.0.1:9000
    at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) {
  type: 'system',
  _name: 'FetchError',
  code: 'ETIMEDOUT',
  errno: -110,
  erroredSysCall: 'connect'
}
2025-01-16 12:48:49.133 [error] [default] Error sending telemetry FetchError: tunneling socket could not be established, cause=connect ETIMEDOUT 127.0.0.1:9000
    at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) {
  type: 'system',
  _name: 'FetchError',
  code: 'ETIMEDOUT',
  errno: -110,
  erroredSysCall: 'connect'
}
2025-01-16 12:52:29.275 [error] [default] Error sending telemetry FetchError: tunneling socket could not be established, cause=connect ETIMEDOUT 127.0.0.1:9000
    at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) {
  type: 'system',
  _name: 'FetchError',
  code: 'ETIMEDOUT',
  errno: -110,
  erroredSysCall: 'connect'
}
2025-01-16 13:01:52.432 [error] [default] Error sending telemetry FetchError: tunneling socket could not be established, cause=connect ETIMEDOUT 127.0.0.1:9000
    at fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at cachingFetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at Pge.fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-1.257.0/lib/src/network/helix.ts:94:22) {
  type: 'system',
  _name: 'FetchError',
  code: 'ETIMEDOUT',
  errno: -110,
  erroredSysCall: 'connect'

Here's the GitHub Copilot Chat log:

2025-01-16 12:41:51.054 [info] Can't use the Electron fetcher in this environment.
2025-01-16 12:41:51.054 [info] Using the Node fetch fetcher.
2025-01-16 12:41:51.054 [info] Initializing Git extension service.
2025-01-16 12:41:51.054 [info] Successfully activated the vscode.git extension.
2025-01-16 12:41:51.054 [info] Enablement state of the vscode.git extension: true.
2025-01-16 12:41:51.054 [info] Successfully registered Git commit message provider.
2025-01-16 12:41:54.388 [info] Logged in as Guru-Deshkulkarni_PegaCfB
2025-01-16 12:42:04.864 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at B0.fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
    at B0.authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
    at B0._auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023): Failed to get copilot token
2025-01-16 12:42:04.864 [error] GitHub Copilot could not connect to server. Extension activation failed: "fetch failed"
2025-01-16 12:42:04.864 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-16 12:42:04.864 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at B0.fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
    at B0.authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
    at B0._auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023)
2025-01-16 12:42:04.865 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-16 12:42:04.865 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at B0.fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
    at B0.authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
    at B0._auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023)
2025-01-16 12:42:04.866 [info] activationBlocker from 'languageModelAccess' took for 1988ms
2025-01-16 12:57:05.113 [info] Logged in as Guru-Deshkulkarni_PegaCfB
2025-01-16 12:57:15.639 [warning] [LanguageModelAccess] LanguageModel/Embeddings are not available without auth token
2025-01-16 12:57:15.639 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at B0.fetchCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:23966)
    at B0.authFromGitHubToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:21634)
    at B0._auth (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3023)
    at B0._authShowWarnings (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:3203)
    at B0.getCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:446:2438)
    at dF.getCopilotToken (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:334:26267)
    at Y0._getAuthSession (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:2825)
    at Object.A [as task] (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:640)
    at xC._processQueue (/home/linuxadmin/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:487:1101)

And, finally here's the output of the F1 > Network Proxy Test: Test Network Connection as you suggested in one of the previous messages.

Note: Make sure to replace all sensitive information with dummy values before sharing this output.

VS Code 1.96.3 (91fbdddc47bc9c09064bf7acf133d22631cbf083)
Network Proxy Test 0.0.16
win32 10.0.22631 x64
Extension: UI
Remote: wsl

DNS:
- Servers: 192.168.1.1, 192.168.68.1
- Result Order: ipv4first
- Auto Select Family: true
- Auto Select Family Attempt Timeout: 250
- Lookup: 140.82.121.5 (20 ms)

Proxy:
- URL: http://127.0.0.1:9000 (18 ms)
- Connection: 200 Connection Established
	proxy-agent: Zscaler/6.2 (53 ms)

Sending GET request to https://api.github.com...
Received response:
- Status: 403 Forbidden
Certificate chain:
- Subject: *.github.com (Zscaler Inc.)
  Subject alt: DNS:*.github.com, DNS:github.com
  Validity: Jan 14 09:56:40 2025 GMT - Jan 25 04:06:38 2025 GMT
  Fingerprint: B5:D2:7B:F8:E3:A2:4A:48:BD:6B:A9:DC:C5:D0:D3:FC:EC:C9:D9:AE
- Subject: Zscaler Intermediate Root CA (zscalertwo.net) (t)  (Zscaler Inc.)
  Validity: Jan 11 04:06:38 2025 GMT - Jan 25 04:06:38 2025 GMT
  Fingerprint: 32:C0:1D:91:B5:0A:FD:65:FB:8A:64:C3:DA:E4:B7:B0:D8:06:D0:0D
- Subject: Zscaler Intermediate Root CA (zscalertwo.net) (Zscaler Inc.)
  Validity: Jun  5 05:32:29 2020 GMT - Jun 23 05:32:29 2041 GMT
  Fingerprint: 52:85:46:EE:CB:35:C4:7B:49:60:5D:0F:86:CF:B0:5D:5C:3F:D0:1C
- Subject: Zscaler Root CA (Zscaler Inc.)
  Validity: Dec 19 00:27:55 2014 GMT - May  6 00:27:55 2042 GMT
  Fingerprint: D7:2F:47:D8:74:20:E3:F0:F9:BD:CA:C6:F0:3A:56:67:43:C4:81:B9
  Self-signed
Local root certificates:
- Subject: C=US ST=California L=San Jose O=Zscaler Inc. OU=Zscaler Inc. CN=Zscaler Root CA [email protected] (OS)
  Validity: Dec 19 00:27:55 2014 GMT - May  6 00:27:55 2042 GMT
  Fingerprint: D7:2F:47:D8:74:20:E3:F0:F9:BD:CA:C6:F0:3A:56:67:43:C4:81:B9
  Issuer: C=US ST=California L=San Jose O=Zscaler Inc. OU=Zscaler Inc. CN=Zscaler Root CA [email protected]

Sending GET request to https://api.github.com using fetch from Electron...
Received response:
- Status: 200 

Sending GET request to https://api.github.com using fetch from Node.js...
Received response:
- Status: 200 OK

Sending GET request to https://api.github.com using fetch from Node.js (allow HTTP2)...
Received response:
- Status: 200 OK

And, for comparison, here's the output of F1 > Network Proxy Test: Test Network Connection when run from Windows. I don't see any difference.

Note: Make sure to replace all sensitive information with dummy values before sharing this output.

VS Code 1.96.3 (91fbdddc47bc9c09064bf7acf133d22631cbf083)
Network Proxy Test 0.0.16
win32 10.0.22631 x64

DNS:
- Servers: 192.168.1.1, 192.168.68.1
- Result Order: ipv4first
- Auto Select Family: true
- Auto Select Family Attempt Timeout: 250
- Lookup: 140.82.121.5 (20 ms)

Proxy:
- URL: http://127.0.0.1:9000 (0 ms)
- Connection: 200 Connection Established
	proxy-agent: Zscaler/6.2 (46 ms)

Sending GET request to https://api.github.com...
Received response:
- Status: 403 Forbidden
Certificate chain:
- Subject: *.github.com (Zscaler Inc.)
  Subject alt: DNS:*.github.com, DNS:github.com
  Validity: Jan 14 09:56:40 2025 GMT - Jan 25 04:06:38 2025 GMT
  Fingerprint: B5:D2:7B:F8:E3:A2:4A:48:BD:6B:A9:DC:C5:D0:D3:FC:EC:C9:D9:AE
- Subject: Zscaler Intermediate Root CA (zscalertwo.net) (t)  (Zscaler Inc.)
  Validity: Jan 11 04:06:38 2025 GMT - Jan 25 04:06:38 2025 GMT
  Fingerprint: 32:C0:1D:91:B5:0A:FD:65:FB:8A:64:C3:DA:E4:B7:B0:D8:06:D0:0D
- Subject: Zscaler Intermediate Root CA (zscalertwo.net) (Zscaler Inc.)
  Validity: Jun  5 05:32:29 2020 GMT - Jun 23 05:32:29 2041 GMT
  Fingerprint: 52:85:46:EE:CB:35:C4:7B:49:60:5D:0F:86:CF:B0:5D:5C:3F:D0:1C
- Subject: Zscaler Root CA (Zscaler Inc.)
  Validity: Dec 19 00:27:55 2014 GMT - May  6 00:27:55 2042 GMT
  Fingerprint: D7:2F:47:D8:74:20:E3:F0:F9:BD:CA:C6:F0:3A:56:67:43:C4:81:B9
  Self-signed
Local root certificates:
- Subject: C=US ST=California L=San Jose O=Zscaler Inc. OU=Zscaler Inc. CN=Zscaler Root CA [email protected] (OS)
  Validity: Dec 19 00:27:55 2014 GMT - May  6 00:27:55 2042 GMT
  Fingerprint: D7:2F:47:D8:74:20:E3:F0:F9:BD:CA:C6:F0:3A:56:67:43:C4:81:B9
  Issuer: C=US ST=California L=San Jose O=Zscaler Inc. OU=Zscaler Inc. CN=Zscaler Root CA [email protected]

Sending GET request to https://api.github.com using fetch from Electron...
Received response:
- Status: 200 

Sending GET request to https://api.github.com using fetch from Node.js...
Received response:
- Status: 200 OK

Sending GET request to https://api.github.com using fetch from Node.js (allow HTTP2)...
Received response:
- Status: 200 OK

Final note: I have copied the zscaler certificate to WSL to see if it helps. Doesn't seem to make any difference.

chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jan 16, 2025
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jan 16, 2025
chrmarti added a commit to microsoft/vscode-proxy-agent that referenced this issue Jan 16, 2025
@chrmarti
Copy link

With the latest VS Code Insiders builds the Remote tab in the settings editor has a setting for controlling whether or not the remote should use the local proxy config. You could turn that off and set a different proxy for the remote.

Image

This should work as an additional solution to the original issue when using mirrored networking is not desired.

@chrmarti
Copy link

@deshguru To your new issue: Could you also check the output of F1 > Developer: GitHub Copilot Chat Diagnostics when connected to WSL and append it here?

@deshguru
Copy link
Author

deshguru commented Jan 22, 2025

@deshguru To your new issue: Could you also check the output of F1 > Developer: GitHub Copilot Chat Diagnostics when connected to WSL and append it here?

Hi @chrmarti

Since I last wrote here, I created a script that unsets proxy variables and added that script to my ~/.profile and ~/.bashrc. The script looks like this:

# Unset proxy settings for WSL
unset HTTP_PROXY
unset http_proxy
unset HTTPS_PROXY
unset https_proxy
unset WSL_PAC_URL
export NO_PROXY=*

I can see that these variables are not set when I open a WSL terminal. But Github Coplit still seems to be picking them up (as you see below in the diagnostics output).

Also, I noticed a behavior that might be helpful for you and the rest of the community. When I'm in the company network (whether working at the office or through VPN), there is no status error in Github Copilot.

Here's the output of F1 > Developer: GitHub Copilot Chat Diagnostics when connected to WSL.

GitHub Copilot Chat

  • Extension Version: 0.23.2 (prod)
  • VS Code: vscode/1.96.4
  • OS: Linux
  • Remote Name: wsl

Network

User Settings:

  "http.proxyStrictSSL": false,
  "github.copilot.advanced.debug.useElectronFetcher": true,
  "github.copilot.advanced.debug.useNodeFetcher": false,
  "github.copilot.advanced.debug.useNodeFetchFetcher": true

Environment Variables:

Connecting to https://api.github.com:

  • DNS ipv4 Lookup: 140.82.121.5 (61 ms)
  • DNS ipv6 Lookup: Error (66 ms): getaddrinfo ENOTFOUND api.github.com
  • Proxy URL: None (0 ms)
  • Electron fetch: Unavailable
  • Node.js https: HTTP 200 (154 ms)
  • Node.js fetch (configured): HTTP 200 (174 ms)
  • Helix fetch: timed out after 10 seconds

Connecting to https://api.business.githubcopilot.com/_ping:

  • DNS ipv4 Lookup: 140.82.112.21 (23 ms)
  • DNS ipv6 Lookup: Error (12 ms): getaddrinfo ENOTFOUND api.business.githubcopilot.com
  • Proxy URL: None (1 ms)
  • Electron fetch: Unavailable
  • Node.js https: HTTP 200 (362 ms)
  • Node.js fetch (configured): HTTP 200 (398 ms)
  • Helix fetch: timed out after 10 seconds

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

@deshguru
Copy link
Author

@deshguru To your new issue: Could you also check the output of F1 > Developer: GitHub Copilot Chat Diagnostics when connected to WSL and append it here?

Hi @chrmarti

Since I last wrote here, I created a script that unsets proxy variables and added that script to my ~/.profile and ~/.bashrc. The script looks like this:

# Unset proxy settings for WSL
unset HTTP_PROXY
unset http_proxy
unset HTTPS_PROXY
unset https_proxy
unset WSL_PAC_URL
export NO_PROXY=*

I can see that these variables are not set when I open a WSL terminal. But Github Coplit still seems to be picking them up (as you see below in the diagnostics output).

Also, I noticed a behavior that might be helpful for you and the rest of the community. When I'm in the company network (whether working at the office or through VPN), there is no status error in Github Copilot.

Here's the output of F1 > Developer: GitHub Copilot Chat Diagnostics when connected to WSL.

GitHub Copilot Chat

  • Extension Version: 0.23.2 (prod)
  • VS Code: vscode/1.96.4
  • OS: Linux
  • Remote Name: wsl

Network

User Settings:

"http.proxyStrictSSL": false,
"github.copilot.advanced.debug.useElectronFetcher": true,
"github.copilot.advanced.debug.useNodeFetcher": false,
"github.copilot.advanced.debug.useNodeFetchFetcher": true
Environment Variables:

Connecting to https://api.github.com:

  • DNS ipv4 Lookup: 140.82.121.5 (61 ms)
  • DNS ipv6 Lookup: Error (66 ms): getaddrinfo ENOTFOUND api.github.com
  • Proxy URL: None (0 ms)
  • Electron fetch: Unavailable
  • Node.js https: HTTP 200 (154 ms)
  • Node.js fetch (configured): HTTP 200 (174 ms)
  • Helix fetch: timed out after 10 seconds

Connecting to https://api.business.githubcopilot.com/_ping:

  • DNS ipv4 Lookup: 140.82.112.21 (23 ms)
  • DNS ipv6 Lookup: Error (12 ms): getaddrinfo ENOTFOUND api.business.githubcopilot.com
  • Proxy URL: None (1 ms)
  • Electron fetch: Unavailable
  • Node.js https: HTTP 200 (362 ms)
  • Node.js fetch (configured): HTTP 200 (398 ms)
  • Helix fetch: timed out after 10 seconds

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

Btw, despite this error, I can use Copilot chat and edit features now.

@chrmarti
Copy link

Maybe these proxy env variables are listed in the WSLENV env variable? See, e.g., https://devblogs.microsoft.com/commandline/share-environment-vars-between-wsl-and-windows/ for details.

@chrmarti chrmarti added this to the January 2025 milestone Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue identified by VS Code Team member as probable bug network Network infrastructure for request/response
Projects
None yet
Development

No branches or pull requests

5 participants