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

Keeps hanging: TypeError: fetch failed at node:internal/deps/undici/undici:13392:13 #3357

Closed
etmoore opened this issue Dec 18, 2024 · 20 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@etmoore
Copy link

etmoore commented Dec 18, 2024

Type: Bug

Chat keeps failing. See "Sorry, your request failed. Please try again. Request id: e06234e0-3530-440a-8f5b-550713d60e33". Logs show errors like:

2024-12-17 18:40:47.280 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.1/dist/extension.js:763:5811)
    at Mat (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.1/dist/extension.js:2212:5824)
    at OO.fetchMany (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.1/dist/extension.js:2213:1912)
    at OO.fetchOne (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.1/dist/extension.js:2213:959)
    at Hw.fetchConversationResponse (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.1/dist/extension.js:1072:22350)
    at Hw.getResult (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.1/dist/extension.js:1072:20348)
    at wD.getResult (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.1/dist/extension.js:1075:8718)
    at o$.y (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.1/dist/extension.js:2212:1764)
    at fh.$invokeAgent (file:///nail/home/evanm/.vscode-server/cli/servers/Stable-138f619c86f1199955d53b4166bef66ef252935c/server/out/vs/workbench/api/node/extensionHostProcess.js:138:46609): Error on conversation request

Extension version: 0.23.1
VS Code version: Code 1.96.0 (Universal) (138f619c86f1199955d53b4166bef66ef252935c, 2024-12-11T02:29:09.626Z)
OS version: Darwin arm64 23.6.0
Modes:
Remote OS version: Linux x64 6.2.0-1016-aws

System Info
Item Value
CPUs Apple M1 Pro (10 x 2400)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Load (avg) 3, 4, 4
Memory (System) 16.00GB (0.07GB free)
Screen Reader no
VM 0%

Connection to 'SSH: dev' could not be established Canceled

Connection to 'SSH: dev' could not be established Canceled

Item Value
Remote SSH: dev
OS Linux x64 6.2.0-1016-aws
CPUs Intel(R) Xeon(R) Platinum 8375C CPU @ 2.90GHz (32 x 0)
Memory (System) 247.74GB (197.32GB free)
VM 0%

Connection to 'SSH: dev' could not be established Canceled

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
2i9eh265:30646982
962ge761:30959799
pythonnoceb:30805159
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
dvdeprecation:31068756
dwnewjupyter:31046869
newcmakeconfigv2:31071590
nativerepl1:31139838
pythonrstrctxt:31112756
nativeloc2:31192216
cf971741:31144450
iacca1:31171482
notype1:31157159
5fd0e150:31155592
dwcopilot:31170013
stablechunks:31184530
6074i472:31201624

@github-actions github-actions bot added the triage-needed Issues needing to be assigned to the prospective feature owner label Dec 18, 2024
@bhavyaus
Copy link
Contributor

Can you do F1 -> GitHub Copilot Chat Diagnostics and attach that output

@bhavyaus bhavyaus added ~info-needed Issue requires more information from poster (with bot comment) info-needed Issue requires more information from poster and removed ~info-needed Issue requires more information from poster (with bot comment) labels Dec 18, 2024
Copy link

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@jascomp
Copy link

jascomp commented Dec 18, 2024

@etmoore I was having the same problem. Based on this thread, https://github.com/orgs/community/discussions/147055#discussioncomment-11606773, I updated WSL to 2.3.26 (Latest stable): https://github.com/microsoft/WSL/releases. I did that a couple of hours ago and have been using Copilot through WSL again without an issue.

@bhavyaus bhavyaus assigned chrmarti and unassigned aiday-mar Dec 18, 2024
@vs-code-engineering vs-code-engineering bot removed the triage-needed Issues needing to be assigned to the prospective feature owner label Dec 18, 2024
@etmoore
Copy link
Author

etmoore commented Dec 18, 2024

Can you do F1 -> GitHub Copilot Chat Diagnostics and attach that output

@bhavyaus sure thing! here you go:

GitHub Copilot Chat

  • Extension Version: 0.23.1 (prod)
  • VS Code: vscode/1.96.0
  • OS: Linux
  • Remote Name: ssh-remote

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: timed out after 10 seconds
  • DNS ipv6 Lookup: timed out after 10 seconds
  • Proxy URL: None (1 ms)
  • Electron fetch: Unavailable
  • Node.js https: timed out after 10 seconds
  • Node.js fetch (configured): timed out after 10 seconds
  • Helix fetch: timed out after 10 seconds

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

  • DNS ipv4 Lookup: timed out after 10 seconds
  • DNS ipv6 Lookup: timed out after 10 seconds
  • Proxy URL: None (0 ms)
  • Electron fetch: Unavailable
  • Node.js https: timed out after 10 seconds
  • Node.js fetch (configured): timed out after 10 seconds
  • Helix fetch: timed out after 10 seconds

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.


@jascomp thanks for the tip, but I'm on a remote linux environment, not Windows.

Worth noting that when I reload VSCode, the first message or two will succeed, but then all subsequent messages hang.
Once it happens, Copilot auto-suggestions also stop appearing.

@chrmarti
Copy link

Please append the Copilot Chat and the Remote Extension Host log from when this happens. (F1 > Output: Show Output Channels... > GitHub Copilot Chat / Remote Extension Host)

Have you tried updating WSL as suggested in the discussion you linked to?

@etmoore
Copy link
Author

etmoore commented Dec 19, 2024

@chrmarti 👍 here's the output:

GitHub Copilot Chat:

2024-12-19 07:33:26.333 [info] Can't use the Electron fetcher in this environment.
2024-12-19 07:33:26.333 [info] Using the Node fetch fetcher.
2024-12-19 07:33:26.333 [info] Initializing Git extension service.
2024-12-19 07:33:26.333 [info] Successfully activated the vscode.git extension.
2024-12-19 07:33:26.333 [info] Enablement state of the vscode.git extension: true.
2024-12-19 07:33:26.333 [info] Successfully registered Git commit message provider.
2024-12-19 07:33:27.934 [info] Logged in as etmoore
2024-12-19 07:33:28.771 [info] Got Copilot token for etmoore
2024-12-19 07:33:30.794 [info] copilot token chat_enabled: true, sku: copilot_for_business_seat
2024-12-19 07:33:30.814 [info] Registering default platform agent...
2024-12-19 07:33:31.060 [info] Successfully activated the GitHub.vscode-pull-request-github extension.
2024-12-19 07:33:31.060 [info] [githubTitleAndDescriptionProvider] Initializing GitHub PR title and description provider provider.
2024-12-19 07:33:31.060 [info] Successfully registered GitHub PR title and description provider.
2024-12-19 07:33:31.065 [info] Fetched model metadata in 2285ms 547ae261-429b-4399-ae50-c1a746e8c201
2024-12-19 07:33:31.069 [info] activationBlocker from 'languageModelAccess' took for 4836ms
2024-12-19 07:48:45.913 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at _p._fetchModels (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:11405)
    at _p.getAllChatModels (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:9332)
    at WO.getAllChatEndpoints (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:15770)
    at Object.A [as task] (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:781)
    at xC._processQueue (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:487:1101): Failed to fetch models (6170afed-9057-4315-a2b7-9d8870226756)
2024-12-19 07:48:56.838 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at _p._fetchModels (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:11405)
    at _p.getChatModelFromFamily (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:10055)
    at WO.getChatEndpoint (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:14751)
    at Object.A [as task] (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:488:834)
    at xC._processQueue (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:487:1101): Failed to fetch models (a32415af-bde7-4247-9864-102ffc170482)
2024-12-19 07:52:33.143 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at _p._fetchModels (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:11405)
    at _p.getEmbeddingsModel (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:10854)
    at WO.getEmbeddingsEndpoint (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:15546)
    at dC.getRemoteContainer (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:349:4501)
    at dC.getRemoteCacheLatestUpdateURL (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:349:4867)
    at dC.fetchRemoteCacheLatest (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:349:5628)
    at dC.getCache (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:349:6029)
    at dC.getCache (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:349:7746)
    at PW._calculateEmbeddings (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:349:9555): Failed to fetch models (d49befa7-fc81-4136-9330-31c1ec96ca27)

Extension Host (Remote):

2024-12-19 07:33:18.922 [info] Extension host with pid 3870581 started
2024-12-19 07:33:18.975 [info] Lock '/nail/home/evanm/.vscode-server/data/User/workspaceStorage/c43a8423a536d0c1c8acc4af8b745457/vscode.lock': Lock acquired.
2024-12-19 07:33:19.221 [info] ExtensionService#_doActivateExtension vscode.git-base, startup: false, activationEvent: '*', root cause: vscode.git
2024-12-19 07:33:19.222 [info] ExtensionService#_doActivateExtension vscode.tunnel-forwarding, startup: false, activationEvent: 'onTunnel'
2024-12-19 07:33:19.222 [info] ExtensionService#_doActivateExtension vscode.emmet, startup: false, activationEvent: 'onLanguage'
2024-12-19 07:33:19.223 [info] ExtensionService#_doActivateExtension ms-python.python, startup: false, activationEvent: 'onLanguage:python', root cause: ms-python.black-formatter
2024-12-19 07:33:19.761 [info] ExtensionService#_doActivateExtension vscode.git, startup: false, activationEvent: '*'
2024-12-19 07:33:19.762 [info] ExtensionService#_doActivateExtension vscode.github, startup: false, activationEvent: '*'
2024-12-19 07:33:20.226 [info] ExtensionService#_doActivateExtension ms-python.black-formatter, startup: false, activationEvent: 'onLanguage:python'
2024-12-19 07:33:20.226 [info] ExtensionService#_doActivateExtension ms-python.debugpy, startup: false, activationEvent: 'onLanguage:python'
2024-12-19 07:33:20.227 [info] ExtensionService#_doActivateExtension ms-python.isort, startup: false, activationEvent: 'onLanguage:python'
2024-12-19 07:33:20.227 [info] ExtensionService#_doActivateExtension ms-python.vscode-pylance, startup: false, activationEvent: 'onLanguage:python'
2024-12-19 07:33:20.697 [info] ExtensionService#_doActivateExtension vscode.npm, startup: true, activationEvent: 'workspaceContains:package.json'
2024-12-19 07:33:20.729 [info] ExtensionService#_doActivateExtension Orta.vscode-jest, startup: true, activationEvent: 'workspaceContains:node_modules/.bin/jest'
2024-12-19 07:33:21.372 [info] ExtensionService#_doActivateExtension ms-vscode.makefile-tools, startup: true, activationEvent: 'workspaceContains:**/makefile,**/Makefile,**/GNUmakefile'
2024-12-19 07:33:22.556 [info] Eager extensions activated
2024-12-19 07:33:22.557 [info] ExtensionService#_doActivateExtension vscode.debug-auto-launch, startup: false, activationEvent: 'onStartupFinished'
2024-12-19 07:33:22.557 [info] ExtensionService#_doActivateExtension vscode.merge-conflict, startup: false, activationEvent: 'onStartupFinished'
2024-12-19 07:33:22.557 [info] ExtensionService#_doActivateExtension dbaeumer.vscode-eslint, startup: false, activationEvent: 'onStartupFinished'
2024-12-19 07:33:22.557 [info] ExtensionService#_doActivateExtension GitHub.copilot, startup: false, activationEvent: 'onStartupFinished'
2024-12-19 07:33:22.558 [info] ExtensionService#_doActivateExtension GitHub.copilot-chat, startup: false, activationEvent: 'onStartupFinished'
2024-12-19 07:33:22.558 [info] ExtensionService#_doActivateExtension sourcegraph.sourcegraph, startup: false, activationEvent: 'onStartupFinished'
2024-12-19 07:33:22.558 [info] ExtensionService#_doActivateExtension Yelp.yelp-core, startup: false, activationEvent: 'onStartupFinished'
2024-12-19 07:33:25.640 [info] ExtensionService#_doActivateExtension GitHub.vscode-pull-request-github, startup: false, activationEvent: 'onStartupFinished'
2024-12-19 07:33:27.604 [info] ExtensionService#_doActivateExtension vscode.configuration-editing, startup: false, activationEvent: 'onLanguage:json'
2024-12-19 07:33:27.604 [info] ExtensionService#_doActivateExtension vscode.extension-editing, startup: false, activationEvent: 'onLanguage:json'
2024-12-19 07:33:27.604 [info] ExtensionService#_doActivateExtension vscode.json-language-features, startup: false, activationEvent: 'onLanguage:json'
2024-12-19 07:33:28.959 [info] ExtensionService#_doActivateExtension ms-vsliveshare.vsliveshare, startup: false, activationEvent: 'api', root cause: GitHub.vscode-pull-request-github

I'm working on a mac, connected to a remote linux (ubuntu) host via ssh, so don't think WSL applies to me, right? iiuc, that's for Windows.

@jascomp
Copy link

jascomp commented Dec 19, 2024

@chrmarti correct. WSL should not apply, but I do think it is a possible clue. Are you able to confirm the remote Linux machine has been updated?

@chrmarti
Copy link

Missed that you're not on Windows. Could you try adding the following to your user settings (F1 > Preferences: Open User Settings (JSON)):

"github.copilot.advanced.debug.useNodeFetcher": true

Then reload VS Code and retry.

@etmoore
Copy link
Author

etmoore commented Dec 19, 2024

update: I rebooted the remote linux host, and so far, copilot + chat are working again 🎉
wish I had tried that earlier 😊 appreciate the help y'all provided.

If I start having trouble again, I will try useNodeFetcher as you recommend @chrmarti and report back.

@ahmadomira
Copy link

ahmadomira commented Dec 19, 2024

I'm experiencing the same issue. Copilot starts working for couple of prompts after reloading VSC's window, but then it stops responding. I have no network issues or whatsoever. It appears to be related to VS Code's extension host. Whenever Copilot malfunctions, I also encounter problems launching the Python debugger. I've tried clearing VS Code's cache, uninstalling and reinstalling all extensions, and even reinstalling VS Code itself. Unfortunately, nothing has resolved the problem.

Source control also stops working correctly when Copilot malfunctions. It seems like a VSC issue.

System Information

Apple M3 Max (16 x 2400)
Load (avg) 3, 3, 3
Memory (System) 128.00GB (85.95GB free)
macOS Sequoia 15.2

Extensions

copilot v1.253.0
copilot-chat v0.23.2
debugpy v2024.14.0
python v2024.22.0
vscode-pylance v2024.12.1
datawrangler v1.14.0
wolfram v2.0.0

Here's Copilot's diagnostic report:

GitHub Copilot Chat

  • Extension Version: 0.23.2 (prod)
  • VS Code: vscode/1.96.1
  • OS: Mac

Network

User Settings:

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

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

  • DNS ipv4 Lookup: timed out after 10 seconds
  • DNS ipv6 Lookup: timed out after 10 seconds
  • Proxy URL: None (5 ms)
  • Electron fetch (configured): HTTP 200 (61 ms)
  • Node.js https: timed out after 10 seconds
  • Node.js fetch: timed out after 10 seconds
  • Helix fetch: timed out after 10 seconds

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

  • DNS ipv4 Lookup: timed out after 10 seconds
  • DNS ipv6 Lookup: timed out after 10 seconds
  • Proxy URL: None (9 ms)
  • Electron fetch (configured): HTTP 200 (105 ms)
  • Node.js https: timed out after 10 seconds
  • Node.js fetch: timed out after 10 seconds
  • Helix fetch: timed out after 10 seconds

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

@etmoore
Copy link
Author

etmoore commented Dec 19, 2024

I'm sad to report it's happening again to me.

    "github.copilot.advanced": {
        "debug.useNodeFetcher": true
    }

@chrmarti , fyi applied that setting ☝ as you suggested, but it did not fix the issue.

@chrmarti
Copy link

@ahmadomira Since you mention SCM: There is an issue in the Python extension that seems to affect SCM. Could you try without the Python extension or update to its latest pre-release version that has a fix to check if that affects this issue? (microsoft/vscode-python#24611)

@ahmadomira
Copy link

Hi @chrmarti,

Updating the Python extension to the latest pre-release version (microsoft/vscode-python#24611) appears to have fixed all issues immediately. Copilot, SCM, and the Python debugger are all working correctly. I've been using it for a couple of hours without encountering any problems. Thank you!

@chrmarti
Copy link

@etmoore Could you try the same? The timeouts you are seeing in the diagnostics suggest this might be the same problem.

@etmoore
Copy link
Author

etmoore commented Dec 23, 2024

@chrmarti :( switched to Python plugin pre-release version, but unfortunately did not fix the issue. Still seeing the same error:

Image
2024-12-23 09:01:34.581 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at runNextTicks (node:internal/process/task_queues:64:3)
    at processImmediate (node:internal/timers:454:9)
    at ek._fetch (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at Mat (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2212:5858)
    at OO.fetchMany (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:1912)
    at CD.detectIntent (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:1072:27728)
    at wD.selectIntent (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:1075:10638)
    at wD.getResult (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:1075:8080)
    at o$.y (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2212:1798)
    at fh.$invokeAgent (file:///nail/home/evanm/.vscode-server/cli/servers/Stable-fabdb6a30b49f79a7aba0f2ad9df9b399473380f/server/out/vs/workbench/api/node/extensionHostProcess.js:138:46609): Error on conversation request
2024-12-23 09:02:08.662 [error] TypeError: fetch failed
    at node:internal/deps/undici/undici:13392:13
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at ek._fetch (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:763:5811)
    at Mat (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2212:5858)
    at OO.fetchMany (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:2213:1912)
    at CD.detectIntent (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:1072:27728)
    at CD.provideParticipantDetection (/nail/home/evanm/.vscode-server/extensions/github.copilot-chat-0.23.2/dist/extension.js:1072:26566): Error on conversation request

@jalenzz
Copy link

jalenzz commented Dec 26, 2024

@chrmarti Same problem here. I tried the pre-release Python extension, but the problem was not solved. I also tried disabling all extensions except Copilot, but the problem was not solved.

I think this problem may be related to the proxy. Copilot did not use the proxy correctly.,I used SSH connect to a remote machine, it is network-isolated and can only access the network through a proxy, and I set env http_proxy and https_proxy.

I tested my connection according to https://docs.github.com/en/copilot/troubleshooting-github-copilot/troubleshooting-network-errors-for-github-copilot#diagnosing-network-issues.

curl use my proxy, no error. My proxy is correct and can connect to Copilot.

curl --verbose https://copilot-proxy.githubusercontent.com/_ping
* Uses proxy env variable https_proxy == 'http://192.168.1.108:7892'
*   Trying 192.168.1.108:7892...
* Connected to 192.168.1.108 (192.168.1.108) port 7892 (#0)
* allocate connect buffer
* Establish HTTP proxy tunnel to copilot-proxy.githubusercontent.com:443
> CONNECT copilot-proxy.githubusercontent.com:443 HTTP/1.1
> Host: copilot-proxy.githubusercontent.com:443
> User-Agent: curl/7.87.0
> Proxy-Connection: Keep-Alive
> 
< HTTP/1.1 200 Connection established
< 
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: /opt/anaconda3/ssl/cacert.pem
*  CApath: /usr/lib/ssl/certs
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS handshake, Client hello (1):

* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Server hello (2):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Certificate (11):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, CERT verify (15):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Finished (20):
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* [CONN-0-0][CF-SSL] TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256
* ALPN: server accepted h2
* Server certificate:
*  subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.githubusercontent.com
*  start date: Jun 20 00:00:00 2024 GMT
*  expire date: Jun 19 23:59:59 2025 GMT
*  subjectAltName: host "copilot-proxy.githubusercontent.com" matched cert's "*.githubusercontent.com"
*  issuer: C=US; O=DigiCert Inc; CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1
*  SSL certificate verify ok.
* Using HTTP2, server supports multiplexing
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* h2h3 [:method: GET]
* h2h3 [:path: /_ping]
* h2h3 [:scheme: https]
* h2h3 [:authority: copilot-proxy.githubusercontent.com]
* h2h3 [user-agent: curl/7.87.0]
* h2h3 [accept: */*]
* Using Stream ID: 1 (easy handle 0x9e23b0)
> GET /_ping HTTP/2
> Host: copilot-proxy.githubusercontent.com
> user-agent: curl/7.87.0
> accept: */*
> 
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* [CONN-0-0][CF-SSL] TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
< HTTP/2 200 
< content-security-policy: default-src 'none'; sandbox
< content-type: application/json
< strict-transport-security: max-age=31536000
< content-length: 48
< date: Thu, 26 Dec 2024 08:44:45 GMT
< x-github-backend: Kubernetes
< x-github-request-id: 35D3:1379B9:5E540C:605FCC:676D177D
< 
{"now":1735202685,"status":"ok","ns1":"200 OK"}
* Connection #0 to host 192.168.1.108 left intact

But when I try GitHub Copilot Chat Diagnostics and attach that output

## GitHub Copilot Chat

- Extension Version: 0.23.2 (prod)
- VS Code: vscode/1.96.2
- OS: Linux
- Remote Name: ssh-remote

## 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: Error (6160 ms): getaddrinfo EAI_AGAIN api.github.com
- DNS ipv6 Lookup: timed out after 10 seconds
- Proxy URL: None (1 ms)
- Electron fetch: Unavailable
- Node.js https: Error (6949 ms): getaddrinfo EAI_AGAIN api.github.com
- Node.js fetch (configured): timed out after 10 seconds
- Helix fetch: timed out after 10 seconds

Connecting to https://api.githubcopilot.com/_ping:
- DNS ipv4 Lookup: timed out after 10 seconds
- DNS ipv6 Lookup: timed out after 10 seconds
- Proxy URL: None (0 ms)
- Electron fetch: Unavailable
- Node.js https: timed out after 10 seconds
- Node.js fetch (configured): timed out after 10 seconds
- Helix fetch: timed out after 10 seconds

## Documentation

In corporate networks: [Troubleshooting firewall settings for GitHub Copilot](https://docs.github.com/en/copilot/troubleshooting-github-copilot/troubleshooting-firewall-settings-for-github-copilot).

with "github.copilot.advanced.debug.useNodeFetcher": true

## GitHub Copilot Chat

- Extension Version: 0.23.2 (prod)
- VS Code: vscode/1.96.2
- OS: Linux
- Remote Name: ssh-remote

## Network

User Settings:

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


Connecting to https://api.github.com:
- DNS ipv4 Lookup: timed out after 10 seconds
- DNS ipv6 Lookup: timed out after 10 seconds
- Proxy URL: None (1 ms)
- Electron fetch: Unavailable
- Node.js https (configured): timed out after 10 seconds
- Node.js fetch: timed out after 10 seconds
- Helix fetch: timed out after 10 seconds

Connecting to https://api.githubcopilot.com/_ping:
- DNS ipv4 Lookup: timed out after 10 seconds
- DNS ipv6 Lookup: timed out after 10 seconds
- Proxy URL: None (0 ms)
- Electron fetch: Unavailable
- Node.js https (configured): timed out after 10 seconds
- Node.js fetch: timed out after 10 seconds
- Helix fetch: timed out after 10 seconds

## Documentation

In corporate networks: [Troubleshooting firewall settings for GitHub Copilot](https://docs.github.com/en/copilot/troubleshooting-github-copilot/troubleshooting-firewall-settings-for-github-copilot).

If more information is required, please do tell me! I earnestly hope this problem can be resolved properly and satisfactorily! 😊

@chrmarti
Copy link

chrmarti commented Jan 6, 2025

@jalenzz Are you still seeing this with the latest Python extension version 2024.22.1? (Yours also looks like microsoft/vscode-python#24611 which is now fixed in the latest stable Python extension release.)

@jalenzz
Copy link

jalenzz commented Jan 6, 2025

@chrmarti The problem seems to be gone with the latest Python extension version 2024.22.1. Thanks !

@etmoore
Copy link
Author

etmoore commented Jan 6, 2025

I'm no longer seeing the issue 🎉
Using python plugin pre-release version 2024.23.2024121901

@chrmarti
Copy link

chrmarti commented Jan 7, 2025

Great, thanks for the update. Closing the issue.

@chrmarti chrmarti closed this as completed Jan 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

7 participants