Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

2FA hangs without error message when Logging in with Unvalidated Email  #993

@weltan

Description

@weltan
  • GitHub Extension for Visual Studio version: all
  • Visual Studio version: all

What happened (with steps, logs and screenshots, if possible)
To reproduce:

  1. Create a GitHub account
  2. Turn on 2-factor authentication
  3. Do NOT validate your email
  4. In Visual Studio, sign in using your GitHub account and enter your 2-factor code
  5. Plugin hangs without showing error message.

You can see in the below logs that the error message is:

{
"message":"Validation Failed",
"errors": [ {"resource":"OauthAccess","code":"custom","field":"user","message":"user must have a verified email address in order to authenticate via OAuth"}],
"documentation_url":"https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app"
}

Logs:

2017-05-12 10:33:29.8456|INFO|thread: 1|LoginTabViewModel|Error logging into 'https://github.com/' as
Octokit.ApiValidationException: Validation Failed
   at Octokit.Connection.HandleErrors(IResponse response) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 577
   at Octokit.Connection.<RunRequest>d__53.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 558
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.Connection.<Run>d__52`1.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 543
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiConnection.<Put>d__27`1.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\ApiConnection.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.AuthorizationsClient.<GetOrCreateApplicationAuthentication>d__9.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Clients\AuthorizationsClient.cs:line 323
{"message":"Validation Failed","errors":[{"resource":"OauthAccess","code":"custom","field":"user","message":"user must have a verified email address in order to authenticate via OAuth"}],"documentation_url":"https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app"}    at Octokit.Connection.HandleErrors(IResponse response) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 577
   at Octokit.Connection.<RunRequest>d__53.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 558
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.Connection.<Run>d__52`1.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 543
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiConnection.<Put>d__27`1.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\ApiConnection.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.AuthorizationsClient.<GetOrCreateApplicationAuthentication>d__9.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Clients\AuthorizationsClient.cs:line 323
2017-05-12 10:36:15.6155|INFO|thread: 1|LoginTabViewModel|Error logging into 'https://github.com/'
Octokit.ApiValidationException: Validation Failed
   at Octokit.Connection.HandleErrors(IResponse response) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 577
   at Octokit.Connection.<RunRequest>d__53.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 558
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.Connection.<Run>d__52`1.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 543
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiConnection.<Put>d__27`1.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\ApiConnection.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.AuthorizationsClient.<GetOrCreateApplicationAuthentication>d__9.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Clients\AuthorizationsClient.cs:line 323
{"message":"Validation Failed","errors":[{"resource":"OauthAccess","code":"custom","field":"user","message":"user must have a verified email address in order to authenticate via OAuth"}],"documentation_url":"https://developer.github.com/v3/oauth_authorizations/#get-or-create-an-authorization-for-a-specific-app"}    at Octokit.Connection.HandleErrors(IResponse response) in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 577
   at Octokit.Connection.<RunRequest>d__53.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 558
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.Connection.<Run>d__52`1.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\Connection.cs:line 543
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.ApiConnection.<Put>d__27`1.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Http\ApiConnection.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Octokit.AuthorizationsClient.<GetOrCreateApplicationAuthentication>d__9.MoveNext() in Y:\jenkins\workspace\GitHub for Visual Studio speakeasy jenkinskeep\submodules\octokit.net\Octokit\Clients\AuthorizationsClient.cs:line 323


Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions