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

Visual Studio crashes trying to login to a 2FA-enabled account #837

Closed
skalldri opened this issue Feb 6, 2017 · 5 comments
Closed

Visual Studio crashes trying to login to a 2FA-enabled account #837

skalldri opened this issue Feb 6, 2017 · 5 comments
Assignees
Labels

Comments

@skalldri
Copy link

skalldri commented Feb 6, 2017

GitHub Extension for Visual Studio version: 2.2.0.6
Visual Studio version: 14.0.25431.01 Update 3

When I try to login to my 2FA-enabled account, Visual Studio locks up and crashes. If I disable 2FA on my Github account, I can login and publish repo's as you would expect. When it crashes it does not generate any extension logs in either %LocalAppData%\GitHubVisualStudio\extension.log or %LocalAppData%\Temp\extension.log.

This bug first happened on my old install of Windows 10. I then re-installed Windows 10 (for unrelated reasons) and this bug repros with a brand new Windows 10 installation with a brand new copy of Visual Studio Community Edition.

@skalldri
Copy link
Author

skalldri commented Feb 6, 2017

My repro steps:

  1. Install Visual Studio Community 2015
  2. Enable 2FA on Github account. Setup a Yubikey
  3. Create a project in VS2015 and then try to add it to your Github account.
  4. You are not logged in to Github yet so you will be asked for your Github account username and password.
  5. Observe VS2015 locks up immediately after you input the username / password correctly, and crashes a short time after that. Steps 1-5 can be repeated indefinitely for the same result.
  6. Disable 2FA on your Github account.
  7. Repeat steps 3-4.
  8. Observe that you are able to login to your Github account in the VS2015 extension now.

@grokys grokys added the crash label Feb 6, 2017
@grokys
Copy link
Contributor

grokys commented Feb 6, 2017

Thanks for the report @skalldri. When you say "try to add [the project] to your Github account", how are you doing this? There are various ways to achieve that.

@skalldri
Copy link
Author

skalldri commented Feb 6, 2017

Hi @grokys

Here's the step's I'm using to add the project to my account.

  1. Create the project in VS via File-> New -> Project.... Check the "Add to source control" box on the project creation page.
  2. At the top of the screen there's a search bar called "Quick Launch". I type "Github" into the search bar and select "View -> Other Windows -> Github". The Github view opens in the right sidebar.
  3. Click "Get Started" in the Github view pane.
  4. VS switches to the "Team Explorer" tab on the right sidebar. Under "Publish to Github", it will ask you to sign in now.
  5. Enter the credentials for a 2FA-enabled account, crash occurs.

Note that if I look in my Github security logs online I can see the 2FA login attempt:

user.two_factor_requested

but nothing happens on the PC-side, Visual Studio just crashes and restarts.

Note that I'm using Win10 V 15025.rs_prerelease.170127-1750 (this is the most recent insider flight) on brand new copies of Windows, and this reproduces on two separate machines (a custom built Desktop PC and a Surface Book).

@grokys
Copy link
Contributor

grokys commented Feb 7, 2017

Ah, is login form opening under "Publish to GitHub" in the pane on the right sidebar? Like this: #839

If so, yeah, it shouldn't be doing that ;) it should be opening in a dialog box. I hope to have a fix soon.

@skalldri
Copy link
Author

skalldri commented Feb 7, 2017

That's exactly what it does: the sign in page opens inside the "Publish to GitHub" pane in the sidebar.

Sounds like you've got a handle on why this is happening!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants