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

Copilot not working inside WSL #1380

Closed
BinaryFusion-00 opened this issue Jul 11, 2024 · 56 comments
Closed

Copilot not working inside WSL #1380

BinaryFusion-00 opened this issue Jul 11, 2024 · 56 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster

Comments

@BinaryFusion-00
Copy link

  • Copilot Extension Version: 1.211.0
  • Copilot Chat Extension Version: 0.17.0
  • VS Code Version: 1.91.0
  • OS Version: Windows 11

Github copilot works on my Windows, but it does not work inside WSL. I see the following error in the GitHub Copilot log

[info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
[info] [auth] Sucessfully authenticated
[error] [default] Error sending telemetry FetchError: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

GitHub Copilot chat log:
[info] [extension] Error: Unable to resolve chat model with family selection: gpt-4

@github-actions github-actions bot added the triage-needed Issues needing to be assigned to the prospective feature owner label Jul 11, 2024
@lramos15 lramos15 assigned chrmarti and unassigned lramos15 Jul 11, 2024
@lramos15 lramos15 removed the triage-needed Issues needing to be assigned to the prospective feature owner label Jul 11, 2024
@chrmarti
Copy link

There is a new stable version GitHub Copilot Chat 0.17.1 improving the error reporting. Could you retry with that and run the diagnostic command F1 > Developer: GitHub Copilot Chat Diagnostics and post the output here?

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Jul 12, 2024
@BinaryFusion-00
Copy link
Author

Copilot

  • Version: 1.212.0
  • Build: prod
  • Editor: vscode/1.91.1

Environment

  • http_proxy: http://wsl_proxy:3129
  • https_proxy: http://wsl_proxy:3129
  • no_proxy: localhost,127.0.0.1,127.,172.,192.168.,10.,169.254.169.254
  • SSL_CERT_FILE: n/a
  • SSL_CERT_DIR: n/a
  • OPENSSL_CONF: n/a

Feature Flags

  • Send Restricted Telemetry: disabled
  • Chat: enabled

Node setup

  • Number of root certificates: 146
  • Operating system: Linux
  • Operating system version: 5.15.146.1-microsoft-standard-WSL2
  • Operating system architecture: x64
  • NODE_OPTIONS: n/a
  • NODE_EXTRA_CA_CERTS: n/a
  • NODE_TLS_REJECT_UNAUTHORIZED: 0
  • tls default min version: TLSv1.2
  • tls default max version: TLSv1.3

Network Configuration

  • Proxy host: xxxx.com
  • Proxy port: 8080
  • Kerberos SPN: n/a
  • Reject unauthorized: disabled
  • Fetcher: HelixFetcher

Reachability

  • github.com: HTTP 200
  • api.github.com: HTTP 403
  • copilot-proxy.githubusercontent.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
  • api.githubcopilot.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
  • default.exp-tas.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

VS Code Configuration

  • HTTP proxy: http://xxxx:8080
  • HTTP proxy authentication: n/a
  • Proxy Strict SSL: false
  • Extension HTTP proxy support: on

Extensions

  • Is win-ca installed?: true
  • Is mac-ca installed?: false

Authentication

  • GitHub username: xxx

@chrmarti
Copy link

This suggests that Kerberos authentication is required for the network proxy, but is not set up in WSL: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000).

@chrmarti
Copy link

We can look up the Kerberos auth on the host when it failed in WSL.

@chrmarti chrmarti added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels Jul 12, 2024
@mofa65
Copy link

mofa65 commented Jul 15, 2024

How shall I update the fetcher , i think it is trying to authenticate from the old cache. I updated the Github copilot extension to a newer version (v1.213.0) but that didn't help. Still getting the same error:
2024-07-15 10:57:36.149 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available. 2024-07-15 10:57:36.287 [info] [auth] Sucessfully authenticated 2024-07-15 10:57:36.867 [error] [default] Error sending telemetry FetchError: Unspecified GSS failure. Minor code may provide more information: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

@chrmarti
Copy link

@BinaryFusion-00 and @mofa65: Could you try the latest VS Code Insiders release (https://code.visualstudio.com/insiders/)? That comes with a fix that will query Kerberos on Windows when it fails in WSL.

@chrmarti chrmarti added the info-needed Issue requires more information from poster label Jul 15, 2024
@BinaryFusion-00
Copy link
Author

Apologies for the delay. I get this error in the Insiders build inside WSL:
[ContextKeysContribution] GitHub Copilot could not connect to server. Extension activation failed
[ModelMetadataFetcher] Failed to fetch models, TV: tunneling socket could not be established, cause=getaddrinfo EAI_AGAIN
[RemoteAgents] Failed to load remote slash commands, TV: tunneling socket could not be established, cause=getaddrinfo EAI_AGAIN

@chrmarti
Copy link

@BinaryFusion-00 Could you rerun the diagnostics commands? F1 > Developer: GitHub Copilot Chat Diagnostics and F1 > GitHub Copilot: Collect Diagnostics.

@BinaryFusion-00
Copy link
Author

Copilot

  • Version: 1.214.998
  • Build: nightly
  • Editor: vscode/1.92.0-insider

Environment

  • http_proxy: http://wsl_proxy:3129
  • https_proxy: http://wsl_proxy:3129
  • no_proxy: localhost
  • SSL_CERT_FILE: n/a
  • SSL_CERT_DIR: n/a
  • OPENSSL_CONF: n/a

Feature Flags

Node setup

  • Number of root certificates: 147
  • Operating system: Linux
  • Operating system version: 5.15.146.1-microsoft-standard-WSL2
  • Operating system architecture: x64
  • NODE_OPTIONS: n/a
  • NODE_EXTRA_CA_CERTS: n/a
  • NODE_TLS_REJECT_UNAUTHORIZED: n/a
  • tls default min version: TLSv1.2
  • tls default max version: TLSv1.3

Network Configuration

  • Proxy host: xxx.com
  • Proxy port: 8080
  • Kerberos SPN: n/a
  • Reject unauthorized: enabled
  • Fetcher: HelixFetcher

Reachability

  • github.com: tunneling socket could not be established, cause=getaddrinfo EAI_AGAIN xxx.com
  • api.github.com: tunneling socket could not be established, cause=getaddrinfo EAI_AGAIN xxx.com
  • copilot-proxy.githubusercontent.com: tunneling socket could not be established, cause=getaddrinfo EAI_AGAIN xxx.com
  • api.githubcopilot.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
  • default.exp-tas.com: tunneling socket could not be established, cause=getaddrinfo EAI_AGAIN xxx.com

VS Code Configuration

  • HTTP proxy: http://xxx.com:8080
  • HTTP proxy authentication: n/a
  • Proxy Strict SSL: true
  • Extension HTTP proxy support: on

Extensions

  • Is win-ca installed?: true
  • Is mac-ca installed?: false

Authentication

  • GitHub username: ----

@chrmarti
Copy link

Could you also run F1 > Developer: GitHub Copilot Chat Diagnostics?

@BinaryFusion-00
Copy link
Author

GitHub Copilot Chat

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

Network

User Settings:

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

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

  • DNS Lookup: timed out after 10 seconds
  • Electron Fetcher: Unavailable
  • Node Fetcher: HTTP 403
  • Helix Fetcher (configured):

@chrmarti
Copy link

Could you rerun it and give it more time? It should run a similar test for api.githubcopilot.com.

@BinaryFusion-00
Copy link
Author

Apologies for the delay

GitHub Copilot Chat

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

Network

User Settings:

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

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

  • DNS Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • Electron Fetcher: Unavailable
  • Node Fetcher: HTTP 403
  • Helix Fetcher (configured): HTTP 403

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

  • DNS Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • Electron Fetcher: Unavailable
  • Node Fetcher: HTTP 500
  • Helix Fetcher (configured): Error: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

@AashishKumar-3002
Copy link

any updates on this, facing the same issue

@amanda-natallie
Copy link

I also need help with this! any updates?

@chrmarti
Copy link

@BinaryFusion-00 Could you set Proxy Support to override in the user settings? (Only noticed it is set to on now.)

@AashishKumar-3002 @amanda-natallie Please check the output of F1 > Developer: GitHub Copilot Chat Diagnostics in VS Code and append it here.

@chrmarti
Copy link

Related: #1577

@Adrian43211234
Copy link

From authentication-with-kerberos

when executing
klist

klist: No credentials cache found (filename: /tmp/krb5cc_1000)

I don't even have this file.

@Pumbaazz
Copy link

Pumbaazz commented Oct 25, 2024

Hi @chrmarti, I have checked the internet connection, and it's correct my home's internet. It's just happened with the WSL because I use the autocomplete totally fine with both VS Code and PyCharm on Windows so I believed that the firewall is fine (It's worked when I use my company's internet also but only on Windows workspace).

Here is the diagnostics from Windows workspace:

GitHub Copilot Chat

  • Extension Version: 0.21.2 (prod)
  • VS Code: vscode/1.94.2
  • OS: Windows

Network

User Settings:

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

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

  • DNS ipv4 Lookup: x.x.x.x (131 ms)
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • Electron Fetcher (configured): HTTP 200 (874 ms)
  • Node Fetcher: HTTP 200 (199 ms)
  • Helix Fetcher: HTTP 200 (306 ms)

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

  • DNS ipv4 Lookup: y.y.y.y (12 ms)
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • Electron Fetcher (configured): HTTP 200 (1077 ms)
  • Node Fetcher: HTTP 200 (779 ms)
  • Helix Fetcher: HTTP 200 (1065 ms)

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

==EDIT==
I found this issue but not sure that it's related to my case or not: #1192

@chrmarti
Copy link

@Adrian43211234 Are you behind a network proxy with Kerberos authentication? Are you using WSL?

@Pumbaazz The Electron fetcher is expected to not be available in WSL. Does curl -v https://api.github.com/ work in WSL?

@Pumbaazz
Copy link

@chrmarti Seem it's work, I can see that SSL certificate verify ok:

curl -v https://api.github.com/
* Host api.github.com:443 was resolved.
* IPv6: (none)
* IPv4: x.x.x.x
*   Trying x.x.x.x:443...
* ALPN: curl offers h2,http/1.1
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* TLSv1.3 (IN), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
* TLSv1.3 (IN), TLS handshake, Certificate (11):
* TLSv1.3 (IN), TLS handshake, CERT verify (15):
* TLSv1.3 (IN), TLS handshake, Finished (20):
* TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
* TLSv1.3 (OUT), TLS handshake, Finished (20):
* SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 / x25519 / id-ecPublicKey
* ALPN: server accepted h2
* Server certificate:
*  subject: CN=*.github.com
*  start date: Mar  7 00:00:00 2024 GMT
*  expire date: Mar  7 23:59:59 2025 GMT
*  subjectAltName: host "api.github.com" matched cert's "*.github.com"
*  issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo ECC Domain Validation Secure Server CA
*  SSL certificate verify ok.
*   Certificate level 0: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA256
*   Certificate level 1: Public key type EC/prime256v1 (256/128 Bits/secBits), signed using ecdsa-with-SHA384
*   Certificate level 2: Public key type EC/secp384r1 (384/192 Bits/secBits), signed using ecdsa-with-SHA384
* Connected to api.github.com (x.x.x.x) port 443
* using HTTP/2
* [HTTP/2] [1] OPENED stream for https://api.github.com/
* [HTTP/2] [1] [:method: GET]
* [HTTP/2] [1] [:scheme: https]
* [HTTP/2] [1] [:authority: api.github.com]
* [HTTP/2] [1] [:path: /]
* [HTTP/2] [1] [user-agent: curl/8.10.1]
* [HTTP/2] [1] [accept: */*]
> GET / HTTP/2
> Host: api.github.com
> User-Agent: curl/8.10.1
> Accept: */*
>
* Request completely sent off
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
< HTTP/2 200
< date: Fri, 25 Oct 2024 09:47:19 GMT
< cache-control: public, max-age=60, s-maxage=60
< vary: Accept,Accept-Encoding, Accept, X-Requested-With
< x-github-api-version-selected: 2022-11-28
< access-control-expose-headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset
< access-control-allow-origin: *
< strict-transport-security: max-age=31536000; includeSubdomains; preload
< x-frame-options: deny
< x-content-type-options: nosniff
< x-xss-protection: 0
< referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin
< content-security-policy: default-src 'none'
< server: github.com
< content-type: application/json; charset=utf-8
< x-github-media-type: github.v3; format=json
< etag: W/"4f825cc84e1c733059d46e76e6df9db557ae5254f9625dfe8e1b09499c449438"
< x-ratelimit-limit: 60
< x-ratelimit-remaining: 58
< x-ratelimit-reset: 1729851412
< x-ratelimit-resource: core
< x-ratelimit-used: 2
< accept-ranges: bytes
< content-length: 2396
< x-github-request-id: 75D1:37B94:14248B0:1529EB7:671B692F
<
{
  "current_user_url": "https://api.github.com/user",
  "current_user_authorizations_html_url": "https://github.com/settings/connections/applications{/client_id}",
  "authorizations_url": "https://api.github.com/authorizations",
  "code_search_url": "https://api.github.com/search/code?q={query}{&page,per_page,sort,order}",
  "commit_search_url": "https://api.github.com/search/commits?q={query}{&page,per_page,sort,order}",
  "emails_url": "https://api.github.com/user/emails",
  "emojis_url": "https://api.github.com/emojis",
  "events_url": "https://api.github.com/events",
  "feeds_url": "https://api.github.com/feeds",
  "followers_url": "https://api.github.com/user/followers",
  "following_url": "https://api.github.com/user/following{/target}",
  "gists_url": "https://api.github.com/gists{/gist_id}",
  "hub_url": "https://api.github.com/hub",
  "issue_search_url": "https://api.github.com/search/issues?q={query}{&page,per_page,sort,order}",
  "issues_url": "https://api.github.com/issues",
  "keys_url": "https://api.github.com/user/keys",
  "label_search_url": "https://api.github.com/search/labels?q={query}&repository_id={repository_id}{&page,per_page}",
  "notifications_url": "https://api.github.com/notifications",
  "organization_url": "https://api.github.com/orgs/{org}",
  "organization_repositories_url": "https://api.github.com/orgs/{org}/repos{?type,page,per_page,sort}",
  "organization_teams_url": "https://api.github.com/orgs/{org}/teams",
  "public_gists_url": "https://api.github.com/gists/public",
  "rate_limit_url": "https://api.github.com/rate_limit",
  "repository_url": "https://api.github.com/repos/{owner}/{repo}",
  "repository_search_url": "https://api.github.com/search/repositories?q={query}{&page,per_page,sort,order}",
  "current_user_repositories_url": "https://api.github.com/user/repos{?type,page,per_page,sort}",
  "starred_url": "https://api.github.com/user/starred{/owner}{/repo}",
  "starred_gists_url": "https://api.github.com/gists/starred",
  "topic_search_url": "https://api.github.com/search/topics?q={query}{&page,per_page}",
  "user_url": "https://api.github.com/users/{user}",
  "user_organizations_url": "https://api.github.com/user/orgs",
  "user_repositories_url": "https://api.github.com/users/{user}/repos{?type,page,per_page,sort}",
  "user_search_url": "https://api.github.com/search/users?q={query}{&page,per_page,sort,order}"
}
* Connection #0 to host api.github.com left intact

@Adrian43211234
Copy link

Adrian43211234 commented Oct 25, 2024

@Adrian43211234 Are you behind a network proxy with Kerberos authentication? Are you using WSL?

Yes @chrmarti to both and in my VSC without WSL the copilot is also working.

@chrmarti
Copy link

@Adrian43211234 Please check the output of F1 > Developer: GitHub Copilot Chat Diagnostics in VS Code when connected to WSL and append it here.

@chrmarti
Copy link

@amanda-natallie Looking at the diagnostics you posted in #1380 (comment) I realize the setting probably won't solve the issue because the Node fetcher is shown as failing with a 407 (proxy auth missing). Does it work on Windows?

@Adrian43211234
Copy link

@Adrian43211234 Please check the output of F1 > Developer: GitHub Copilot Chat Diagnostics in VS Code when connected to WSL and append it here.

GitHub Copilot Chat

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

Network

User Settings:

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

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

  • DNS ipv4 Lookup: 140.82.121.6 (55 ms)
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • Electron Fetcher: Unavailable
  • Node Fetcher (configured): HTTP 200 (201 ms)
  • Helix Fetcher: HTTP 200 (377 ms)

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

  • DNS ipv4 Lookup: 140.82.114.22 (23 ms)
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • Electron Fetcher: Unavailable
  • Node Fetcher (configured): HTTP 200 (480 ms)
  • Helix Fetcher: Error: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

@dimun
Copy link

dimun commented Oct 28, 2024

Hello I am having the same problem

Here is my diagnostic, I really appreciate if this is solved since this is not working at all

GitHub Copilot Chat

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

Network

User Settings:

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

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

  • DNS ipv4 Lookup: timed out after 10 seconds
  • DNS ipv6 Lookup: timed out after 10 seconds
  • Electron Fetcher: Unavailable
  • Node Fetcher: timed out after 10 seconds
  • Helix Fetcher (configured): 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
  • Electron Fetcher: Unavailable
  • Node Fetcher: timed out after 10 seconds
  • Helix Fetcher (configured): timed out after 10 seconds

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

@chrmarti
Copy link

@Adrian43211234 Could you try adding the following to your user settings JSON (F1 > Preferences: Open User Settings (JSON)):

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

@dimun This looks like your WSL distro does not have network at all. Does it work on Windows? Are you behind a network proxy?

@Adrug
Copy link

Adrug commented Oct 29, 2024

The same issue. I have a virtual windows workstation with WSL at work that uses a proxy.
So on Windows it also works stable but not on WSL. Mostly copilot doesn't return anything at all or it takes many seconds.
Copilot chat works. All copilot endpoints are available on WSL (via curl)

GitHub Copilot Chat

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

Network

User Settings:

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

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

  • DNS ipv4 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • Electron Fetcher: Unavailable
  • Node Fetcher (configured): HTTP 200 (5166 ms)
  • Helix Fetcher: HTTP 200 (5226 ms)

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

  • DNS ipv4 Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • Electron Fetcher: Unavailable
  • Node Fetcher (configured): HTTP 200 (5580 ms)
  • Helix Fetcher: HTTP 200 (5510 ms)

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

@Adrian43211234
Copy link

@Adrian43211234 Could you try adding the following to your user settings JSON (F1 > Preferences: Open User Settings (JSON)):

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

@dimun This looks like your WSL distro does not have network at all. Does it work on Windows? Are you behind a network proxy?

Hi @chrmarti

This is already my setting - the
"debug.useElectronFetcher": true,
seems to be added from somewhere - is this the problem?

## GitHub Copilot Chat

- Extension Version: 0.21.2 (prod)
- VS Code: vscode/1.94.2
- OS: Linux
- Remote Name: wsl

## Network

User Settings:
```json
  "github.copilot.advanced": {
    "debug.useElectronFetcher": true,
    "debug.useNodeFetcher": true
  }

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

  • DNS ipv4 Lookup: 140.82.121.5 (22 ms)
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • Electron Fetcher: Unavailable
  • Node Fetcher (configured): HTTP 200 (352 ms)
  • Helix Fetcher: HTTP 200 (229 ms)

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

  • DNS ipv4 Lookup: 140.82.114.22 (20 ms)
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • Electron Fetcher: Unavailable
  • Node Fetcher (configured): HTTP 200 (510 ms)
  • Helix Fetcher: Error: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.


@chrmarti
Copy link

@Adrian43211234 Indeed, I would expect it to work then. Could you check F1 > Output: Show Output Channels... > GitHub Copilot Chat for errors?

@Adrug The diagnostics you posted confirm your observation, the requests go through, but take very long. Does time curl https://api.github.com/ in a WSL shell also take 5 seconds?

@Adrian43211234
Copy link

Adrian43211234 commented Oct 30, 2024

@chrmarti thanks for your help!

copilot chat seems to work for now:

2024-10-30 09:16:12.783 [info] Can't use the Electron fetcher in this environment.
2024-10-30 09:16:12.783 [info] Using the Node fetcher.
2024-10-30 09:16:12.783 [info] Initializing Git extension service.
2024-10-30 09:16:12.783 [info] Successfully activated the vscode.git extension.
2024-10-30 09:16:12.783 [info] Enablement state of the vscode.git extension: true.
2024-10-30 09:16:12.783 [info] Successfully registered Git commit message provider.
2024-10-30 09:16:13.918 [info] Logged in as xxxxx
2024-10-30 09:16:14.976 [info] Got Copilot token for xxxxx
2024-10-30 09:16:15.319 [info] copilot token chat_enabled: true, sku: copilot_for_business_seat
2024-10-30 09:16:15.319 [info] GitHub.vscode-pull-request-github extension is not yet activated.
2024-10-30 09:16:15.330 [info] Registering default platform agent...
2024-10-30 09:16:20.842 [info] Fetched model metadata in 5862ms 599ad399-4615-4f7d-93f8-42fbd9959970
2024-10-30 09:16:21.193 [info] activationBlocker from 'languageModelAccess' took for 8502ms

copilot:

2024-10-30 09:16:13.037 [info] [certificates] Removed 6 expired certificates
2024-10-30 09:16:14.282 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2024-10-30 09:16:14.282 [info] [auth] Successfully authenticated
2024-10-30 09:16:43.635 [warning] [relatedFiles] unknown language yaml
2024-10-30 09:16:43.983 [error] [ghostText] Error on ghost text request: FetchError: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
    at fetch (/home/a/.vscode-server/extensions/github.copilot-1.243.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at cachingFetch (/home/a/.vscode-server/extensions/github.copilot-1.243.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at cue.fetch (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/network/helix.ts:93:22)
    at XW.fetchWithParameters (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/openai/fetch.ts:451:26)
    at XW.fetchAndStreamCompletions (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/openai/fetch.ts:354:26)
    at genericGetCompletionsFromNetwork (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/ghostText/ghostText.ts:149:21)
    at getGhostText (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/ghostText/ghostText.ts:698:23)
    at calculateInlineCompletions (/home/a/.vscode-server/extensions/github.copilot-1.243.0/extension/src/ghostText/ghostText.ts:77:20)
    at provideInlineCompletions (/home/a/.vscode-server/extensions/github.copilot-1.243.0/extension/src/ghostText/ghostText.ts:140:20)
    at Iue.provideInlineCompletionItems (/home/a/.vscode-server/extensions/github.copilot-1.243.0/extension/src/ghostText/ghostText.ts:153:27)
    at tU.provideInlineCompletions (file:///home/a/.vscode-server/bin/384ff7382de624fb94dbaf6da11977bba1ecd427/out/vs/workbench/api/node/extensionHostProcess.js:137:139184) {
  type: 'system',
  _name: 'FetchError',
  code: undefined,
  errno: undefined,
  erroredSysCall: undefined
## Copilot

- Version: 1.243.0
- Build: prod
- Editor: vscode/1.94.2

## Environment

- http_proxy: http://xxxxx-proxy.app.corpintra.net:3128
- https_proxy: n/a
- no_proxy: localhost,127.0.0.1
- SSL_CERT_FILE: n/a
- SSL_CERT_DIR: n/a
- OPENSSL_CONF: n/a

## Feature Flags

- Send Restricted Telemetry: disabled
- Chat: enabled
- Content exclusion: unavailable

## Node setup

- Number of root certificates: 147
- Operating system: Linux
- Operating system version: 5.15.153.1-microsoft-standard-WSL2
- Operating system architecture: x64
- NODE_OPTIONS: n/a
- NODE_EXTRA_CA_CERTS: /etc/ssl/certs/ca-certificates.crt
- NODE_TLS_REJECT_UNAUTHORIZED: n/a
- tls default min version: TLSv1.2
- tls default max version: TLSv1.3

## Network Configuration

- Proxy host: xxxxx-proxy.app.corpintra.net
- Proxy port: 3128
- Kerberos SPN: n/a
- Reject unauthorized: enabled
- Fetcher: HelixFetcher

## Reachability

- github.com: HTTP 200
- api.github.com: HTTP 200
- copilot-proxy.githubusercontent.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
- api.githubcopilot.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
- copilot-telemetry-service.githubusercontent.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
- default.exp-tas.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

## VS Code Configuration

- HTTP proxy: 
- HTTP proxy authentication: n/a
- Proxy Strict SSL: true
- Extension HTTP proxy support: override

## Extensions

- Is `win-ca` installed?: false
- Is `mac-ca` installed?: false

@Adrug
Copy link

Adrug commented Oct 30, 2024

@Adrug The diagnostics you posted confirm your observation, the requests go through, but take very long. Does time curl https://api.github.com/ in a WSL shell also take 5 seconds?

Unfortunately yes, via curl it takes 5secs or more. I guess my issue is not due to copilot. Just now I have realized all remote endpoints have about 5 second delay.

@chrmarti
Copy link

@Adrian43211234 This looks like Copilot Chat might work, does the Chat viewlet work for you? The ghost text completions from Copilot (not Chat) show an error, @devm33 I don't think there is a way to switch that to using the Node.js https module as a workaround?

@Adrug Maybe post the same diagnostics from when you are using a Windows folder, that will show us the Windows side. (E.g., I wonder if the DNS lookups succeed there.) I suggest you also check with your IT admins for a solution as this seems to be related to how networking is set up on your machine / WSL.

@Adrian43211234
Copy link

Adrian43211234 commented Oct 30, 2024

@chrmarti yes the chat do work (sometimes)
copilot text completions show the same error like diagnostics

2024-10-30 09:25:33.921 [error] [ghostText] Error on ghost text request: FetchError: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
    at fetch (/home/a/.vscode-server/extensions/github.copilot-1.243.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
    at cachingFetch (/home/a/.vscode-server/extensions/github.copilot-1.243.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
    at cue.fetch (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/network/helix.ts:93:22)
    at XW.fetchWithParameters (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/openai/fetch.ts:451:26)
    at XW.fetchAndStreamCompletions (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/openai/fetch.ts:354:26)
    at genericGetCompletionsFromNetwork (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/ghostText/ghostText.ts:149:21)
    at getGhostText (/home/a/.vscode-server/extensions/github.copilot-1.243.0/lib/src/ghostText/ghostText.ts:698:23)
    at calculateInlineCompletions (/home/a/.vscode-server/extensions/github.copilot-1.243.0/extension/src/ghostText/ghostText.ts:77:20)
    at provideInlineCompletions (/home/a/.vscode-server/extensions/github.copilot-1.243.0/extension/src/ghostText/ghostText.ts:140:20)
    at Iue.provideInlineCompletionItems (/home/a/.vscode-server/extensions/github.copilot-1.243.0/extension/src/ghostText/ghostText.ts:153:27)
    at tU.provideInlineCompletions (file:///home/a/.vscode-server/bin/384ff7382de624fb94dbaf6da11977bba1ecd427/out/vs/workbench/api/node/extensionHostProcess.js:137:139184) {
  type: 'system',
  _name: 'FetchError',
  code: undefined,
  errno: undefined,
  erroredSysCall: undefined
}

Compared without WSL:

## Copilot

- Version: 1.243.0
- Build: prod
- Editor: vscode/1.94.2

## Environment

- http_proxy: n/a
- https_proxy: n/a
- no_proxy: n/a
- SSL_CERT_FILE: n/a
- SSL_CERT_DIR: c:\Users\xxxxx\.vscode\extensions\ukoloff.win-ca-3.5.1\node_modules\win-ca\pem
- OPENSSL_CONF: n/a

## Feature Flags

- Send Restricted Telemetry: disabled
- Chat: enabled
- Content exclusion: unavailable

## Node setup

- Number of root certificates: 147
- Operating system: Windows_NT
- Operating system version: 10.0.22621
- Operating system architecture: x64
- NODE_OPTIONS: n/a
- NODE_EXTRA_CA_CERTS: n/a
- NODE_TLS_REJECT_UNAUTHORIZED: n/a
- tls default min version: TLSv1.2
- tls default max version: TLSv1.3

## Network Configuration

- Proxy host: n/a
- Proxy port: n/a
- Kerberos SPN: n/a
- Reject unauthorized: disabled
- Fetcher: HelixFetcher

## Reachability

- github.com: HTTP 200
- api.github.com: HTTP 200
- copilot-proxy.githubusercontent.com: HTTP 200
- api.githubcopilot.com: HTTP 200
- copilot-telemetry-service.githubusercontent.com: HTTP 200
- default.exp-tas.com: HTTP 200

## VS Code Configuration

- HTTP proxy: 
- HTTP proxy authentication: n/a
- Proxy Strict SSL: true
- Extension HTTP proxy support: override

## Extensions

- Is `win-ca` installed?: true
- Is `mac-ca` installed?: false

## Authentication

- GitHub username: xxxxx
2024-10-30 09:28:50.333 [info] [certificates] Removed 11 expired certificates
2024-10-30 09:28:51.081 [info] [fetcher] Using Helix fetcher.
2024-10-30 09:28:51.081 [info] [auth] Successfully authenticated
2024-10-30 09:28:58.510 [info] [fetchCompletions] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 1958 ms
2024-10-30 09:28:58.511 [info] [streamChoices] solution 0 returned. finish reason: [stop]
2024-10-30 09:28:58.512 [info] [streamChoices] request done: headerRequestId: [074529d9-b1bd-4c65-89a3-f1f06695810c] model deployment ID: [d134-20240927181300]
2024-10-30 09:28:59.344 [info] [fetchCompletions] request.response: [https://copilot-proxy.githubusercontent.com/v1/engines/copilot-codex/completions] took 230 ms
2024-10-30 09:28:59.345 [info] [streamChoices] solution 0 returned. finish reason: [stop]
2024-10-30 09:28:59.346 [info] [streamChoices] request done: headerRequestId: [5efcef7c-0b3f-4436-ac88-1aa69a6b76f2] model deployment ID: [d134-20240927181300]

@Adrug
Copy link

Adrug commented Oct 30, 2024

@Adrug Maybe post the same diagnostics from when you are using a Windows folder, that will show us the Windows side. (E.g., I wonder if the DNS lookups succeed there.) I suggest you also check with your IT admins for a solution as this seems to be related to how networking is set up on your machine / WSL.

Yeah, I've raised a ticket to IT support.
On windows it looks better but still can't lookup DNS

GitHub Copilot Chat

  • Extension Version: 0.21.2 (prod)
  • VS Code: vscode/1.94.2
  • OS: Windows

Network

User Settings:

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

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

  • DNS ipv4 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
  • Electron Fetcher (configured): HTTP 200 (18 ms)
  • Node Fetcher: HTTP 200 (104 ms)
  • Helix Fetcher: Error: tunneling socket could not be established, statusCode=400

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

  • DNS ipv4 Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.githubcopilot.com
  • Electron Fetcher (configured): HTTP 200 (93 ms)
  • Node Fetcher: HTTP 200 (1049 ms)
  • Helix Fetcher: Error: tunneling socket could not be established, statusCode=400

Documentation

In corporate networks: Troubleshooting firewall settings for GitHub Copilot.

@devm33
Copy link

devm33 commented Oct 31, 2024

@chrmarti yes that's correct, we don't yet have a http2 module fetcher yet.

Looking at the per domain resolution, it looks like some domains are getting through ok. Presumably excepted by the proxy rules:

- github.com: HTTP 200
- api.github.com: HTTP 200
- copilot-proxy.githubusercontent.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
- api.githubcopilot.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
- copilot-telemetry-service.githubusercontent.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)
- default.exp-tas.com: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

The Kerberos error returned indicates the proxy is returning a 407 response.

@chrmarti
Copy link

@Adrian43211234 You could check with your IT admins if they could apply the same exceptions that seem to apply for github.com and api.github.com also for the other domains above to make Copilot work.

@SamuelSaxo
Copy link

@Adrian43211234 You could check with your IT admins if they could apply the same exceptions that seem to apply for github.com and api.github.com also for the other domains above to make Copilot work.

We've tried this and still have the issue.

@viettrangha
Copy link

viettrangha commented Nov 8, 2024

I confirmed the issue still happen. I've added domains in this article to Windows proxy whitelist setting.

## GitHub Copilot Chat

- Extension Version: 0.22.2 (prod)
- VS Code: vscode/1.95.2
- OS: Linux
- Remote Name: wsl

## Network

User Settings:
json
  "github.copilot.advanced": {
    "debug.useElectronFetcher": true,
    "debug.useNodeFetcher": true
  }


Connecting to https://api.github.com:
- DNS ipv4 Lookup: 20.205.243.168 (3 ms)
- DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.github.com
- Electron Fetcher: Unavailable
- Node Fetcher (configured): HTTP 200 (184 ms)
- Helix Fetcher: Error: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

Connecting to https://api.business.githubcopilot.com/_ping:
- DNS ipv4 Lookup: 140.82.114.21 (3 ms)
- DNS ipv6 Lookup: Error: getaddrinfo ENOTFOUND api.business.githubcopilot.com
- Electron Fetcher: Unavailable
- Node Fetcher (configured): HTTP 407 (688 ms)
- Helix Fetcher: Error: No credentials were supplied, or the credentials were unavailable or inaccessible: No Kerberos credentials available (default cache: FILE:/tmp/krb5cc_1000)

Update: it works after I set http.proxy on VsCode

@chrmarti
Copy link

@tranghvfpt That (HTTP 200 and HTTP 407 for the two URLs together with setting http.proxy fixing it) might be explained by a proxy auto-config (PAC) script that returns different proxies for https://api.github.com and https://api.business.githubcopilot.com/_ping. Such a script would be maintained by your IT. Could you check with them and make sure these URLs get the same proxy?

If you want to investigate further yourself, you could install the Network Proxy Test extension (https://marketplace.visualstudio.com/items?itemName=chrmarti.network-proxy-test) and run F1 > Network Proxy Test: Test Connection for both URLs. The output should show which proxy is being used for each URL (look for the output line starting with vscode-proxy-agent:).

@viettrangha
Copy link

you're right, it's use different connection for https://api.github.com and https://api.business.githubcopilot.com/_ping.
Here is my Test Connection results:

Sending GET request to https://api.github.com...
vscode-proxy-agent: DIRECT
Received response:
- Status: 403 Forbidden
Sending GET request to https://api.business.githubcopilot.com/_ping...
vscode-proxy-agent: PROXY <proxy-url>
Received response:
- Status: 200 OK

After I add an internal cert the Copilot [Chat] work as expected.

@chrmarti
Copy link

@tranghvfpt Just for my own understanding (and maybe others who face the same issue): What kind of certificate did you have to add to make this work? Did you not need to change the proxy setting anymore?

Copy link

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@vs-code-engineering vs-code-engineering bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 22, 2024
@viettrangha
Copy link

viettrangha commented Nov 25, 2024

@chrmarti they send me a document with steps:

@Adrug
Copy link

Adrug commented Dec 18, 2024

Hi there,

I have reported this issue recently. For me it was completely WSL issue.
WSL version was 2.2.4 with kernel verion 5.10.16.3
After update it become 2.3.5 with 5.15.167.4.
So the issue is gone.

@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Jan 6, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests