microsoft / vscode

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

Github Authentication: Login Failure #182110

Closed lepastiche closed 1 year ago

lepastiche commented 1 year ago

Type: Bug

Hi, support team.

I have been trying to login to VSCode via Github, and I couldn't. I have been getting the message: " Error while turning on Settings Sync. No auth flow succeeded" and "Sign in failed: Error: No auth flow succeeded." I also wanted to install extensions, but the window shows me the message: "Error fetching extensions. XHR timeout: undefinedms".

I've already tried re-installing VSCode, and it has not helped me.

I hope you can assist me with this issue. Thank you in advance.

VS Code version: Code 1.78.1 (6a995c4f4cc2ced6e3237749973982e751cb0bf9, 2023-05-04T09:48:08.683Z) OS version: Windows_NT x64 10.0.22621 Modes: Sandboxed: No

System Info |Item|Value| |---|---| |CPUs|Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2208)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: disabled_off
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
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|15.85GB (7.16GB free)| |Process Argv|--crash-reporter-id ea72dce7-1fed-47a0-99bd-2f1ec2694b48| |Screen Reader|no| |VM|0%|
Extensions: none
TylerLeonhardt commented 1 year ago

Can you follow these steps so that we can get more information on what's going on?

lepastiche commented 1 year ago

Hi Tyler, Here are the requested logs:

2023-05-11 10:52:26.871 [info] Reading sessions from keychain... 2023-05-11 10:52:26.871 [info] Getting sessions for all scopes... 2023-05-11 10:52:26.871 [info] Getting sessions for all scopes... 2023-05-11 10:52:26.871 [info] Getting sessions for user:email... 2023-05-11 10:52:26.871 [info] Got stored sessions! 2023-05-11 10:52:26.871 [info] Got 0 verified sessions. 2023-05-11 10:52:26.871 [info] Got 0 sessions for ... 2023-05-11 10:52:26.871 [info] Got 0 sessions for ... 2023-05-11 10:52:26.871 [info] Got 0 sessions for user:email... 2023-05-11 10:52:27.072 [info] Getting sessions for all scopes... 2023-05-11 10:52:27.074 [info] Got 0 sessions for ... 2023-05-11 10:54:18.742 [info] Getting sessions for user:email... 2023-05-11 10:54:18.742 [info] Got 0 sessions for user:email... 2023-05-11 10:54:20.190 [info] Logging in for the following scopes: user:email 2023-05-11 10:54:20.192 [info] Trying without local server... (user:email) 2023-05-11 10:54:37.344 [info] Exchanging code for token... 2023-05-11 10:54:58.398 [error] FetchError: request to https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token failed, reason: connect ETIMEDOUT 192.168.0.9:3128 at ClientRequest. (d:\Programs\Microsoft VS Code\resources\app\extensions\github-authentication\dist\extension.js:2:621383) at ClientRequest.emit (node:events:525:35) at onerror (d:\Programs\Microsoft VS @.\proxy-agent\node_modules\https-proxy-agent\node_modules\agent-base\dist\src\index.js:115:21) at callbackError (d:\Programs\Microsoft VS @.\proxy-agent\node_modules\https-proxy-agent\node_modules\agent-base\dist\src\index.js:134:17) at process.processTicksAndRejections (node:internal/process/task_queues:96:5) 2023-05-11 10:55:04.732 [info] Trying with local server... (user:email) 2023-05-11 10:55:05.576 [info] Exchanging code for token... 2023-05-11 10:55:26.636 [error] request to https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token failed, reason: connect ETIMEDOUT 192.168.0.9:3128 2023-05-11 10:55:32.763 [info] Trying device code flow... (user:email) 2023-05-11 10:55:53.812 [error] request to https://github.com/login/device/code?client_id=01ab8ac9400c4e429b23&scope=user:email failed, reason: connect ETIMEDOUT 192.168.0.9:3128 2023-05-11 10:55:53.812 [error] Error: No auth flow succeeded. at t.GitHubServer.login (d:\Programs\Microsoft VS Code\resources\app\extensions\github-authentication\dist\extension.js:2:594177) at process.processTicksAndRejections (node:internal/process/task_queues:96:5) at async t.GitHubAuthenticationProvider.createSession (d:\Programs\Microsoft VS Code\resources\app\extensions\github-authentication\dist\extension.js:2:590279)

2023-05-11 10:52:24.290 [info] Using settings sync service https://vscode-sync.trafficmanager.net/ 2023-05-11 10:52:24.290 [info] Auto Sync is disabled.

2023-05-11 10:52:20.552 [info] update#setState idle 2023-05-11 10:52:27.038 [info] Extension host with pid 18772 exited with code: 0, signal: unknown. 2023-05-11 10:52:33.085 [error] update#isLatestVersion(): failed to check for updates 2023-05-11 10:52:33.086 [error] Error: net::ERR_TIMED_OUT at SimpleURLLoaderWrapper. (node:electron/js2c/browser_init:2:49241) at SimpleURLLoaderWrapper.emit (node:events:513:28) 2023-05-11 10:52:33.405 [error] update#isLatestVersion(): failed to check for updates 2023-05-11 10:52:33.405 [error] Error: net::ERR_TIMED_OUT at SimpleURLLoaderWrapper. (node:electron/js2c/browser_init:2:49241) at SimpleURLLoaderWrapper.emit (node:events:513:28) 2023-05-11 10:52:50.572 [info] update#setState checking for updates 2023-05-11 10:52:58.584 [error] Error: net::ERR_TIMED_OUT at SimpleURLLoaderWrapper. (node:electron/js2c/browser_init:2:49241) at SimpleURLLoaderWrapper.emit (node:events:513:28) 2023-05-11 10:52:58.584 [info] update#setState idle

With thanks, Eda

On Thu, May 11, 2023 at 6:25 AM Tyler James Leonhardt < @.***> wrote:

Can you follow these steps so that we can get more information on what's going on?

  • Open the Command Palette
  • Run the Developer: Set Log Level... command
  • To the right of Trace, click the double check mark button. ✔️ ✔️ (enables trace logging as the default)
  • Wait for the issue to happen...
  • Open the Output pane (ctrl+shift+u I think on Windows)
  • drop in this issue he contents of the following:
    • GitHub Authentication Output channel
    • Log (Settings Sync) Output channel
    • Log (Main) Output channel
  • Open the Command Palette
  • Run the Developer: Set Log Level... command
  • To the right of Info, click the double check mark button. ✔️ ✔️ (to set the default back to info)

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/182110#issuecomment-1542887862, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCQEZ2SKLVDDF7TLBQEZHLXFQIUZANCNFSM6AAAAAAX5FGBEU . You are receiving this because you authored the thread.Message ID: @.***>

TylerLeonhardt commented 1 year ago

@lepastiche couple questions... it seems like VS Code can't make any network requests at all...:

  1. do you have any corporate proxies/firewalls on your machine?
  2. are you able to go to https://vscode.dev/ in your browser just fine?
  3. are you able to search for extensions within VS Code?

cc @chrmarti

lepastiche commented 1 year ago

Hi Tyler,

To answer your questions,

  1. I am not using a proxy. Although I do have a firewall, I have allowed VSCode through it.
  2. I was able to log in to https://vscode.dev/ just fine.
  3. I get the error message: "Error while fetching extensions. XHR timeout: undefinedms."

On Fri, May 12, 2023 at 1:00 AM Tyler James Leonhardt < @.***> wrote:

@lepastiche https://github.com/lepastiche couple questions... it seems like VS Code can't make any network requests at all...:

  1. do you have any corporate proxies/firewalls on your machine?
  2. are you able to go to https://vscode.dev/ in your browser just fine?
  3. are you able to search for extensions within VS Code?

cc @chrmarti https://github.com/chrmarti

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/182110#issuecomment-1544354299, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCQEZ7HXZO5NXY65P2S5GDXFULLDANCNFSM6AAAAAAX5FGBEU . You are receiving this because you were mentioned.Message ID: @.***>

chrmarti commented 1 year ago

The log suggests that there is local proxy:

2023-05-11 10:54:58.398 [error] FetchError: request to
https://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token
failed, reason: connect ETIMEDOUT 192.168.0.9:3128

Could you install the Network Proxy Test extension (https://marketplace.visualstudio.com/items?itemName=chrmarti.network-proxy-test) and check the output of F1 > Network Proxy Test: Test Connection in VS Code?

If you cannot install the extension through the Extensions viewlet in VS Code, you can use the Download Extension link on the above linked page and then install the downloaded VSIX with F1 > Extensions: Install VSIX....

lepastiche commented 1 year ago

Hi. I tried to install the extension from the link, but it just prompts me to open vscode. Once I click on open, vscode opens, but nothing else happens.

On Fri, May 12, 2023 at 6:21 PM Christof Marti @.***> wrote:

The log suggests that there is local proxy:

2023-05-11 10:54:58.398 [error] FetchError: request tohttps://vscode.dev/codeExchangeProxyEndpoints/github/login/oauth/access_token failed, reason: connect ETIMEDOUT 192.168.0.9:3128

Could you install the Network Proxy Test extension ( https://marketplace.visualstudio.com/items?itemName=chrmarti.network-proxy-test) and check the output of F1 > Network Proxy Test: Test Connection in VS Code?

If you cannot install the extension through the Extensions viewlet in VS Code, you can use the Download Extension link on the above linked page and then install the downloaded VSIX with F1 > Extensions: Install VSIX... .

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/182110#issuecomment-1545519965, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCQEZ557URMEN3GUPWE2KTXFYFJHANCNFSM6AAAAAAX5FGBEU . You are receiving this because you were mentioned.Message ID: @.***>

Tukutupap commented 1 year ago

Having the same issue. This is my log in case it helps:

chrmarti commented 1 year ago

Hi. I tried to install the extension from the link, but it just prompts me to open vscode. Once I click on open, vscode opens, but nothing else happens.

@lepastiche There is a Download Extension link on that webpage that should download the extension in the browser (it sounds like you might have clicked the 'install' button).

chrmarti commented 1 year ago

@Tukutupap ENOTFOUND vscode.dev indicates a problem with your machine's network configuration.

lepastiche commented 1 year ago

My bad. I am now able to download and install the extension. Before this, while waiting for a reply, I went to Settings>Application>Proxy and changed Proxy Support from 'on' to 'override' -- hoping it would help with the issue (unfortunately, it didn't).

Network Proxy Test Output:

VS Code 1.78.2 (b3e4e68a0bc097f0ae7907b217c1119af9e03435) Network Proxy Test 0.0.7 win32 10.0.22621 x64

Settings:

Environment variables: http_proxy=192.168.0.9:3128

Sending GET request to https://github.com... vscode-proxy-agent: PROXY 192.168.0.9:3128 Received error: connect ETIMEDOUT 192.168.0.9:3128 (ETIMEDOUT) Retrying while ignoring certificate issues to collect information on the certificate chain.

Sending GET request to https://github.com (allowing unauthorized)... vscode-proxy-agent: PROXY 192.168.0.9:3128 Received error: connect ETIMEDOUT 192.168.0.9:3128 (ETIMEDOUT)

--End of Output--

I've also tried tried running the following on my cmd:

C:\Windows\System32>netsh winhttp show proxyCurrent WinHTTP proxy settings: Direct access (no proxy server).--- Do you have any suggestions on what I should do next?

On Mon, May 15, 2023 at 2:57 PM Christof Marti @.***> wrote:

Hi. I tried to install the extension from the link, but it just prompts me to open vscode. Once I click on open, vscode opens, but nothing else happens.

@lepastiche https://github.com/lepastiche There is a Download Extension link on that webpage that should download the extension in the browser (it sounds like you might have clicked the 'install' button).

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/182110#issuecomment-1547288710, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCQEZZ5MM6TIZ7HZTHYDGLXGHHUBANCNFSM6AAAAAAX5FGBEU . You are receiving this because you were mentioned.Message ID: @.***>

chrmarti commented 1 year ago

@lepastiche The environment variable http_proxy is set to 192.168.0.9:3128. Could you remove that and retry? (I guess this is a leftover from when you were running a local proxy.)

Tukutupap commented 1 year ago

@Tukutupap ENOTFOUND vscode.dev indicates a problem with your machine's network configuration.

No issues with my network configuration at all. I was able to figure it out over the weekend though. Not sure if this is the way to go, but vscode required me log into vscode with my github account before it would let me log into github again through the extension. Once I did that my issue went away.

lepastiche commented 1 year ago

Hi Christof,

Can you please guide me with the steps on how to remove it? Sorry, I have been trying to figure it out on my own, but I can't find it on settings. The http_proxy field on my settings is empty and I can't find it on settings.json. I have also tried running '--no-proxy-server' on the command line, but I don't think the terminal recognizes it. I think I'm doing something wrong. I would really appreciate some instructions.

On Mon, May 15, 2023 at 8:20 PM Christof Marti @.***> wrote:

@lepastiche https://github.com/lepastiche The environment variable http_proxy is set to 192.168.0.9:3128. Could you remove that and retry? (I guess this is a leftover from when you were running a local proxy.)

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/182110#issuecomment-1547757102, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCQEZ2IBGY5LLDN2P3VOUTXGINRHANCNFSM6AAAAAAX5FGBEU . You are receiving this because you were mentioned.Message ID: @.***>

chrmarti commented 1 year ago

Press the Windows key and search for "environment variables", you should get two hits for the Control Panel, one is for account variables, the other is for system variables. Check both lists and remove the http_proxy variable. Restart VS Code after that.

lepastiche commented 1 year ago

Hello.

I removed the proxy and everything is working now. I couldn't have done it without your help. Thank you, guys! I hope you have an awesome day! :)

Sincerely, Eda

On Mon, May 15, 2023 at 10:50 PM Christof Marti @.***> wrote:

Press the Windows key and search for "environment variables", you should get two hits for the Control Panel, one is for account variables, the other is for system variables. Check both lists and remove the http_proxy variable.

— Reply to this email directly, view it on GitHub https://github.com/microsoft/vscode/issues/182110#issuecomment-1548016049, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADCQEZZOZLCVOBFV3PBCC7LXGI7DDANCNFSM6AAAAAAX5FGBEU . You are receiving this because you were mentioned.Message ID: @.***>