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

Cannot sign in to github and got an undefined error #137160

Closed
sheey11 opened this issue Nov 14, 2021 · 6 comments
Closed

Cannot sign in to github and got an undefined error #137160

sheey11 opened this issue Nov 14, 2021 · 6 comments
Assignees
Labels
info-needed Issue requires more information from poster

Comments

@sheey11
Copy link

sheey11 commented Nov 14, 2021

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.62.2
  • OS Version: Windows 10 20H2

Steps to Reproduce:

  1. Just click Sign in with Github to use Copilot

Details:

  1. Click the Sign in and vscode opened a web page, which is correct.
    image
  2. In the opened page, click Continue and the vscode-auth.github.com responds with empty.
    image
  3. After a while, vscode report Sign in failed: undefined.
    image

log of Github Authentication ext:

[Info  - 10:28:14.785] Reading sessions from keychain...
[Info  - 10:28:14.805] Getting sessions for all scopes...
[Info  - 10:28:14.805] Getting sessions for all scopes...
[Trace  - 10:28:14.805] Token acquired from secret storage.
[Info  - 10:28:14.805] Got stored sessions!
[Trace  - 10:28:14.805] Read the following session from the keychain with the following scopes: read:user,user:email,repo
[Info  - 10:28:14.810] Got 1 verified sessions.
[Info  - 10:28:14.810] Got 1 sessions for all scopes...
[Info  - 10:28:14.810] Got 1 sessions for all scopes...
[Info  - 10:28:14.996] Getting sessions for read:user,user:email,repo...
[Info  - 10:28:14.998] Got 1 sessions for read:user,repo,user:email...
[Info  - 10:28:15.110] Getting sessions for read:user,user:email,repo...
[Info  - 10:28:15.110] Got 1 sessions for read:user,repo,user:email...
[Info  - 10:28:16.833] Getting sessions for read:user,user:email...
[Info  - 10:28:16.834] Got 0 sessions for read:user,user:email...
[Info  - 10:28:20.272] Getting sessions for read:user...
[Info  - 10:28:20.272] Got 0 sessions for read:user...
[Info  - 10:28:33.738] Getting sessions for read:user...
[Info  - 10:28:33.738] Got 0 sessions for read:user...
[Info  - 10:28:34.777] Logging in for the following scopes: read:user
[Info  - 10:59:32.427] Getting sessions for all scopes...
[Info  - 10:59:32.427] Got 1 sessions for all scopes...
[Info  - 10:59:33.826] Logging in for the following scopes: read:user
[Info  - 11:00:07.883] Getting sessions for all scopes...
[Info  - 11:00:07.883] Got 1 sessions for all scopes...
[Info  - 11:00:08.794] Logging in for the following scopes: read:user
[Info  - 11:00:20.784] Getting sessions for all scopes...
[Info  - 11:00:20.784] Got 1 sessions for all scopes...
[Error  - 11:00:33.849] undefined

log of Github Copilot ext:

(empty)

@sheey11 sheey11 changed the title Github authentication failed with undefind error Github authentication failed with undefined error Nov 14, 2021
@sheey11 sheey11 changed the title Github authentication failed with undefined error Cannot sign in to github and got an undefined error Nov 14, 2021
@rgoubet
Copy link

rgoubet commented Nov 15, 2021

Possibly related, it is impossible to push/pull to/from a private repo since 1.62.2 (authentication failed). See here for other reports.

@TylerLeonhardt
Copy link
Member

@rgoubet git authorization doesn't use this flow so that's unrelated.

@rgoubet
Copy link

rgoubet commented Nov 15, 2021

OK. Submitted as a separate issue.

@TylerLeonhardt
Copy link
Member

@sheey11 were there any additional webpages displayed between the two you have shown above? Can you share the full url of the error page?

@TylerLeonhardt TylerLeonhardt added the info-needed Issue requires more information from poster label Nov 15, 2021
@sheey11
Copy link
Author

sheey11 commented Nov 16, 2021

There might be pages but seems browser not shown, I found something might useful.

I tried this using another browser(Edge InPrivate, without any extension) that is not signed into github, after clicking Continue, it redirects me to github.com to let me sign in. and after that, it redirects me to the following url:

https://vscode-auth.github.com/?browser_session_id=random_hash_with_length_64&code=random_hash_with_length_20&state=some_random_string%2FeyJhdXRoU2VydmVyIjoiaHR0cHM6Ly9naXRodWIuY29tIiwiY2FsbGJhY2tVcmkiOiJ2c2NvZGU6Ly92c2NvZGUuZ2l0aHViLWF1dGhlbnRpY2F0aW9uL2RpZC1hdXRoZW50aWNhdGU_d2luZG93aWQ9MSIsInJlc3BvbnNlVHlwZSI6ImNvZGUiLCJzdGF0ZSI6InNvbWUtdXVpZCIsImlkIjoibXktaXAtZ29lcy1oZXJlIn0

this probably is the real request which got the ERR_EMPTY_RESPONSE

@sheey11
Copy link
Author

sheey11 commented Nov 16, 2021

I finally managed to sovle this!

the reason I got error is I visit github.com through a http proxy.
to solve this, just set a rule letting all *.github.com requests using proxy except vscode-auth.github.com.

@sheey11 sheey11 closed this as completed Nov 16, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Dec 31, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

3 participants