microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.38k stars 28.61k forks source link

Sign in with GitHub Failure #217249

Closed xyytgae closed 2 months ago

xyytgae commented 2 months ago

Type: Bug

Hi, Support Team

Recently, I have been unable to signin with GitHub. I've already reinstalled VSCode and reset VSCode local config, but I couldn't solve the problem I am not familiar with Proxy and did not know what to do.

I would appreciate it if you could help me solve this problem. Thank you in advance.

Below is GithubAuthentication log.

2024-06-25 00:55:28.782 [info] Getting sessions for user:email...
2024-06-25 00:55:28.782 [info] Got 0 sessions for user:email...
2024-06-25 00:55:29.744 [info] Logging in for the following scopes: user:email
2024-06-25 00:55:29.748 [info] Trying without local server... (user:email)
2024-06-25 00:55:32.424 [info] Exchanging code for token...
2024-06-25 00:55:42.516 [error] request to https://github.com/login/oauth/access_token failed, reason: socket hang up

Below is Network Proxy Test log.

VS Code 1.90.2 (5437499feb04f7a586f677b155b039bc2b3669eb)
Network Proxy Test 0.0.11
win32 10.0.26120 x64

Settings:
- http.proxy: 
- http.proxyAuthorization: null
- http.proxyStrictSSL: true
- http.proxySupport: override
- http.systemCertificates: true

Environment variables:

Sending GET request to https://github.com...
vscode-proxy-agent: DIRECT
Received error: socket hang up (ECONNRESET)
Retrying while ignoring certificate issues to collect information on the certificate chain.

Sending GET request to https://github.com (allowing unauthorized)...
vscode-proxy-agent: DIRECT
Received error: socket hang up (ECONNRESET)
TylerLeonhardt commented 2 months ago

@chrmarti could you take this one first? Does it mean anything to you?

chrmarti commented 2 months ago

Could this be the firewall (or transparent proxy) denying access to github.com?

xyytgae commented 2 months ago

@chrmarti
Thank you for your reply! I have turned off Domain network, Private network, and Public network in reference to the following, but nothing has changed and I get the same error as above. https://support.microsoft.com/en-us/windows/turn-microsoft-defender-firewall-on-or-off-ec0844f7-aebd-0583-67fe-601ecf5d774f What specific action should I take?

chrmarti commented 2 months ago

@xyytgae Can the web browser access https://github.com? Do any other applications have network issues? ECONNRESET seems to be the remote end of the connection hanging up.

xyytgae commented 2 months ago

@chrmarti
I changed the Types of NAT on my LAN Router and now I have access!! I was able to sign in to GitHub with VSCode!! VSCode was irrelevant! Sorry for the inconvenience.

Sorry VSCode! Thanks to @chrmarti and @TylerLeonhardt for support!

chrmarti commented 2 months ago

@xyytgae Out of curiosity: What was the NAT type that didn't work and which one now does work?

xyytgae commented 2 months ago

@chrmarti
Symmetric NAT didn't work, but Cone NAT did.

chrmarti commented 2 months ago

From what I read, the main difference is that Cone NAT allows other hosts than the original destination host to respond to UDP requests. 🤔