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 · 13 comments
Open

Stuck with Retry Connection in CoPilot chat on WSL #3821

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

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
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