-
Notifications
You must be signed in to change notification settings - Fork 53
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
In WSL intermittently VS Code is not able to connect to different extensions requiring access to Github APIs like Github Copilot, Gitlens Launchpad #1577
Comments
I have similar issue, copilot worked well previously, but it seems that sinice one month or two, it doesn't work anymore in WSL.
2024-06-24 11:11:11.714 [info] [FetcherService] Using the Helix fetcher.
2024-06-24 11:11:11.714 [info] [gitExtensionService] Initializing Git extension service.
2024-06-24 11:11:11.714 [info] [gitExtensionService] Successfully activated the vscode.git extension.
2024-06-24 11:11:11.714 [info] [gitExtensionService] Enablement state of the vscode.git extension: true.
2024-06-24 11:11:11.714 [info] [gitExtensionService] Successfully registered Git commit message provider.
2024-06-24 11:11:11.714 [info] [auth] Logged in as copdips |
Very strange, I retested by changing my internet access to mobile phone, and it worked. It seems to be an internet firewall issue, which is very strange. Can we check the IP? I can share it with you with a private message. please find hereunder the outputs when using mobile phone internet which worked:
2024-06-24 14:58:10.644 [error] [auth] Extension activation failed: "FetchError"
2024-06-24 14:58:14.316 [error] [default] Error sending telemetry FetchError:
at fetch (/home/xiang/.vscode-server/extensions/github.copilot-1.206.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:99:11)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at runNextTicks (node:internal/process/task_queues:64:3)
at listOnTimeout (node:internal/timers:540:9)
at processTimers (node:internal/timers:514:7)
at cachingFetch (/home/xiang/.vscode-server/extensions/github.copilot-1.206.0/node_modules/@adobe/helix-fetch/src/fetch/index.js:288:16)
at xq.fetch (/home/xiang/.vscode-server/extensions/github.copilot-1.206.0/lib/src/network/helix.ts:88:22) {
type: 'system',
_name: 'FetchError',
code: 'ETIMEDOUT',
errno: undefined,
erroredSysCall: undefined
}
2024-06-24 14:58:15.853 [error] [auth] Retrying auth
2024-06-24 14:58:31.586 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2024-06-24 14:58:31.586 [info] [code-referencing] Public code references are enabled.
2024-06-24 14:58:31.594 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2024-06-24 14:58:31.594 [info] [code-referencing] Public code references are enabled.
2024-06-24 14:58:31.599 [info] [fetcher] Using Helix fetcher, Electron fetcher is not available.
2024-06-24 14:58:31.599 [info] [code-referencing] Public code references are enabled.
2024-06-24 14:58:08.996 [info] [FetcherService] Using the Helix fetcher.
2024-06-24 14:58:08.996 [info] [gitExtensionService] Initializing Git extension service.
2024-06-24 14:58:08.996 [info] [gitExtensionService] Successfully activated the vscode.git extension.
2024-06-24 14:58:08.996 [info] [gitExtensionService] Enablement state of the vscode.git extension: true.
2024-06-24 14:58:08.996 [info] [gitExtensionService] Successfully registered Git commit message provider.
2024-06-24 14:58:08.996 [info] [auth] Logged in as copdips
2024-06-24 14:58:10.785 [info] [extension] GitHub Copilot could not connect to server. Extension activation failed: "ate"
2024-06-24 14:58:14.438 [info] [auth] Logged in as copdips
2024-06-24 14:58:15.619 [info] [chat] copilot token chat_enabled: true
2024-06-24 14:58:15.619 [info] [githubTitleAndDescriptionProvider] Initializing GitHub PR title and description provider provider.
2024-06-24 14:58:15.659 [info] [auth] Got Copilot token for copdips
2024-06-24 14:58:15.994 [info] [auth] Logged in as copdips
2024-06-24 14:58:16.010 [info] [chat] copilot token chat_enabled: true
2024-06-24 14:58:16.010 [info] [auth] Got Copilot token for copdips
2024-06-24 14:58:17.499 [info] [RemoteAgents] Failed to load remote slash commands: ate
2024-06-24 14:58:17.718 [info] [githubTitleAndDescriptionProvider] Successfully activated the GitHub.vscode-pull-request-github extension.
2024-06-24 14:58:17.718 [info] [githubTitleAndDescriptionProvider] Successfully registered GitHub PR title and description provider.
2024-06-24 14:58:30.678 [info] [auth] Logged in as copdips
2024-06-24 14:58:30.684 [info] [auth] Logged in as copdips
2024-06-24 14:58:31.427 [info] [chat] copilot token chat_enabled: true
2024-06-24 14:58:31.428 [info] [auth] Got Copilot token for copdips
2024-06-24 14:58:31.459 [info] [chat] copilot token chat_enabled: true
2024-06-24 14:58:31.459 [info] [auth] Got Copilot token for copdips And please find the diag info: Details## Copilot
Environment
Feature FlagsNode setup
Network Configuration
Reachability
VS Code Configuration
Extensions
Authentication
|
I am getting exactly the same issue. Sometimes it works on mobile internet. And on Wi-Fi it stops. Rarely it connects via wifi. But the issue happens only on WSL. |
let me recap some tests from the same laptop (Windows 11):
|
ok, I just did more tests, it seems to be a WSL DNS issue. > cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 10.255.255.254
search home I added Now, I have. > cat /etc/resolv.conf
nameserver 1.1.1.1
nameserver 10.255.255.254
search home > cat /etc/wsl.conf
[boot]
systemd=true
[user]
default=xiang
[network]
generateResolvConf = false With |
Well this is very bizarre. @aeschli or @connor4312 with your WSL experience, have you seen something like this before/have any ideas? |
Exactly same for me, it works on Mobile internet connection, but does not work on Fixed Internet connection. In fact, once I restart wsl, by running the |
yes you need to generate by yourself the file resolv.conf after altering wsl.conf |
Thank you. Do I need to regenerate manually everytime wsl is restarted? |
no just once |
I notice that, the DNS server Meanwhile, my Windows OS' DNS server is the one of my home internet box (WIFI with DHCP) which is What're the default contents of your WSL: $ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet 10.255.255.254/32 brd 10.255.255.254 scope global lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 00:15:5d:4c:0d:65 brd ff:ff:ff:ff:ff:ff
inet 172.27.15.111/20 brd 172.27.15.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::215:5dff:fe4c:d65/64 scope link
valid_lft forever preferred_lft forever Windwos OS: PS C:\Users\xiang> Get-NetIPConfiguration
InterfaceAlias : Wi-Fi
InterfaceIndex : 4
InterfaceDescription : Intel(R) Wi-Fi 6 AX201 160MHz
NetProfile.Name : poslsfmwianciq
IPv6Address : 2a01:xxxxxxxxxxx
IPv4Address : 192.168.111.47
IPv6DefaultGateway : fe80::d6f8:29ff:fe80:78c0
IPv4DefaultGateway : 192.168.111.1
DNSServer : 2a01:cb08:e25:1700:d6f8:29ff:fe80:78c0
fe80::d6f8:29ff:fe80:78c0
192.168.111.1
InterfaceAlias : Ethernet 2
InterfaceIndex : 5
InterfaceDescription : Realtek USB GbE Family Controller microsoft/vscode#2
NetAdapter.Status : Disconnected
InterfaceAlias : Connexion réseau Bluetooth
InterfaceIndex : 8
InterfaceDescription : Bluetooth Device (Personal Area Network)
NetAdapter.Status : Disconnected
InterfaceAlias : Connexion au réseau local 2
InterfaceIndex : 23
InterfaceDescription : OpenVPN Data Channel Offload
NetAdapter.Status : Disconnected
InterfaceAlias : Astrill VPN
InterfaceIndex : 25
InterfaceDescription : Wintun Userspace Tunnel
NetAdapter.Status : Disconnected |
Hi,
Same as yours.
|
@copdips It looks like you've found a workaround to the DNS problem and are unblocked. @NehalDamania Is your fixed connection configured to use proxies or something special? Can you try to run from inside WSL |
We have seen reports suggesting that something with ipv6 changed in WSL. Could you run these commands to see if they use (or see) ipv6 addresses:
|
hello, I tested in the 2 senarios (DNS handled by 10:55 $ curl -v my.ip.fi
* Trying 91.198.120.42:80...
* TCP_NODELAY set
* Connected to my.ip.fi (91.198.120.42) port 80 (#0)
> GET / HTTP/1.1
> Host: my.ip.fi
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< Server: nginx/1.18.0
< Date: Fri, 28 Jun 2024 08:55:46 GMT
< Content-Type: text/html;charset=utf-8
< Content-Length: 12
< Connection: keep-alive
< X-XSS-Protection: 1; mode=block
< X-Content-Type-Options: nosniff
< X-Frame-Options: SAMEORIGIN
< Strict-Transport-Security: max-age=3600
< Upgrade-Insecure-Requests: 1
<
[my public IPv4 (not IPv6) masked]
* Connection #0 to host my.ip.fi left intact
✔ /mnt/c/Users/xiang
10:55 $ curl -v https://api.githubcopilot.com/_ping
* Trying 140.82.114.21:443...
* TCP_NODELAY set
* Connected to api.githubcopilot.com (140.82.114.21) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: /etc/ssl/certs
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
* TLSv1.3 (IN), TLS handshake, Server hello (2):
* 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
* ALPN, server accepted to use h2
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.githubcopilot.com
* start date: Aug 16 00:00:00 2023 GMT
* expire date: Aug 16 23:59:59 2024 GMT
* subjectAltName: host "api.githubcopilot.com" matched cert's "*.githubcopilot.com"
* issuer: C=US; O=DigiCert Inc; CN=DigiCert Global G2 TLS RSA SHA256 2020 CA1
* SSL certificate verify ok.
* Using HTTP2, server supports multi-use
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x55b34f4a50e0)
> GET /_ping HTTP/2
> Host: api.githubcopilot.com
> user-agent: curl/7.68.0
> accept: */*
>
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
* old SSL session ID is stale, removing
* Connection state changed (MAX_CONCURRENT_STREAMS == 100)!
< HTTP/2 200
< date: Fri, 28 Jun 2024 08:55:59 GMT
< content-length: 2
< content-type: text/plain; charset=utf-8
< x-github-backend: Kubernetes
< x-github-request-id: CF04:18C6F0:1182239:1870D88:667E7A9F
<
* Connection #0 to host api.githubcopilot.com left intact
OK✔ /mnt/c/Users/xiang
10:55 $ cat /etc/resolv.conf
# This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
# [network]
# generateResolvConf = false
nameserver 10.255.255.254
search home |
it is returning OK, on fixed line.
But VS Code Copilot plugin not working though inside WSL |
|
Could you install the latest VS Code Insiders (https://code.visualstudio.com/insiders/) and the latest GitHub Copilot Chat pre-release (currently v0.17.2024062801), run |
Github Copilot Chat and Github copilot is working perfectly fine in VS Code Insiders. GitHub Copilot Chat
NetworkUser Settings: "github.copilot.advanced": {
"debug.useElectronFetcher": false,
"debug.useNodeFetcher": false
} DNS Lookup api.githubcopilot.com: 140.82.113.21 Fetching https://api.githubcopilot.com/_ping:
|
@NehalDamania Not sure what might make the difference. VS Code 1.91 is expected later this week. Maybe you can use VS Code Insiders until then. If it then doesn't work in 1.91 it might be a configuration issue or maybe another extension causing it. |
Thank you @chrmarti . Yes, I am using insiders now. It is working fine. Once, 1.91 releases, I will post an update on whether the issue gets resolved or not. Once again thanks |
Hello, Just installed the latested vscode v1.91.0, the issue persists, I must set by myself a public DNS server to workaround. |
@copdips Are you getting different IP addresses from the two DNS servers? (Sorry if I missed that above.) |
both resolve to the same ip: $ ping api.githubcopilot.com
PING glb-db52c2cf8be544.github.com (140.82.112.22) 56(84) bytes of data.
64 bytes from lb-140-82-112-22-iad.github.com (140.82.112.22): icmp_seq=1 ttl=47 time=90.8 ms
64 bytes from lb-140-82-112-22-iad.github.com (140.82.112.22): icmp_seq=2 ttl=47 time=91.7 ms
^C
--- glb-db52c2cf8be544.github.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 90.840/91.245/91.650/0.405 ms |
This is really a strange issue. For me Github Copilot Chat is working when connected to one fixed internet connection where as it's not working when connected to the other one (both are from different internet service providers). |
We have seen differences when connecting with ipv6 vs. ipv4. Could you run the following commands from within WSL both when Copilot is working and when it is not working:
|
When it's working:
When it's NOT working
|
@arnabbiswas1 Thanks, that seems to confirm that the ipv6 connectivity might be part of the problem. Could you also share the output of |
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! |
type: 'system', I am not able to connect to the copilot getting this error in WSL |
@Rajvardhan222 Please check the output of I'm adding an ipv6 address lookup to this command to get better insight into the network setup. |
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! |
Does this issue occur when all extensions are disabled?: Yes/No
Steps to Reproduce:
Why I think this might be VS Code issue and not plugin issue:
The text was updated successfully, but these errors were encountered: