microsoft / vscode-pull-request-github

GitHub Pull Requests for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github
MIT License
2.29k stars 573 forks source link

Unable to sign in - Error code 801 #1221

Closed kbakk closed 2 years ago

kbakk commented 5 years ago

Steps to Reproduce:

  1. Add extension to VS Code, click prompt to sign in
  2. Approve app in GitHub.com
  3. On page https://vscode-auth.github.com/authorize?..., select Continue

Expected:

Extension is authenticated

Actual:

Message in browser is shown:

Oh no! An error occurred!

Please restart the sign in process from the editor.

Error code 801

Is not logged in in VS Code.

Have tried:

Neither work, is not able to log in.

smarnach commented 5 years ago

Same issue for me on Ubuntu 19.04, Firefox 68.0.2, vscode 1.37.1, extension version 0.10.0.

The only workaround I found was to make Chrome my default browser temporarily, so apparently the login workflow is broken in Firefox.

AFZ31 commented 4 years ago

Same thing for me on Ubuntu 18.04.3 LTS, Firefox 69.0, vscode 1.37.1, extension 0.10.0

LarnuUK commented 4 years ago

Having this problem as well on Ubuntu 19.04. I either get "Error code 801" or the address wasn't understood by Firefox. Disappointing that this issue has been ignored for 3 months, as seems that using GitHub from VSCode is therefore impossible.

LarnuUK commented 4 years ago

I got around this, however, by clicking the Sign in button, and then going to the bottom where it where "Signing into GitHub", where VSCode then asks you for a token. Go to https://github.com/settings/tokens and create a new token and paste that into then screen box. Then type Github.com in the next box. You are then connected.

silwrkbnch commented 4 years ago

I faced the same issue on Win10 with Edge and found the following workaround: Restart the sing in procedure from vs code. When Edge is opened, do not continue the procedure on Edge. Instead, copy the URL that from Edge to Internet Explorer and continue the process in internet explorer. That worked for me.

LarnuUK commented 4 years ago

I faced the same issue on Win10 with Edge and found the following workaround: Restart the sing in procedure from vs code. When Edge is opened, do not continue the procedure on Edge. Instead, copy the URL that from Edge to Internet Explorer and continue the process in internet explorer. That worked for me.

Edge and Internet Explorer don't work on Mac or Ubuntu though. It's a Windows only Browser. :) The problem appears to extend from the functionality not working on other OSes.

silwrkbnch commented 4 years ago

Edge and Internet Explorer don't work on Mac or Ubuntu though. It's a Windows only Browser. :) The problem appears to extend from the functionality not working on other OSes.

Of course you are right. Just thinking that the issue may be related to the browser and not to vscode. My 2 cents...

Ayivugwe commented 4 years ago

Hi there. I was facing the same problem and now I'm signed in.

Steps :

1) Click Sign in to github.com 2) Edge( in my case) opens the athaurization link 3) Copy the link 4) In my case, I pasted it in Firefox Developer Edition and hint Enter 5) Success message : Authorization was successful 6) Then I was redirected to VS Code. 7) That's all and now I'm signed in.

ericblade commented 4 years ago

Same problem here on a new laptop that I'm configuring. No matter what browser I used, if it was the default browser, it wouldn't work. Started with Edge, tried Chrome, Vivaldi. Ended up pasting the URL into Vivaldi and that got it to work.

gorandp commented 4 years ago

I got that problem but I fixed it. OS: Ubuntu 18.04.3 Browser: Firefox 72.0.1 VS Code version: 1.41.1 Extension version: 0.14.0

Try this:

  1. Log out from "github.com" in your default browser if you are already
  2. Go to VS Code and try to sign in with the extension.
  3. Press continue and then try to log in
  4. Success page

But after that I got an error message inside the VS Code extension. And I get stuck there for a while. Tried it again applying same procedure (because if not, I get the error page). Uninstall, Install, Disable, Enable the extension. Same error inside VS Code. I gave up.

When I was writing this comment I wanted to share my error message from inside de code editor, so I enabled the extension (and without restarting the code editor) I applied the procedure of above, got the success page and clicked on open in the pop-up box. It then logged in. Don't know why.

Hope it is helpful.

wolftales commented 4 years ago

I got around this, however, by clicking the Sign in button, and then going to the bottom where it where "Signing into GitHub", where VSCode then asks you for a token. Go to https://github.com/settings/tokens and create a new token and paste that into then screen box. Then type Github.com in the next box. You are then connected.

I am experiencing this same issue with Ubuntu 20.04 Dev, Mozilla, and VS Code. I kept getting a popup asking me to let Mozilla know it crashed.

Following LarnuUK worked for me.

  1. Download extension
  2. get popup - clear it
  3. Create token @ Github
  4. Click "Signing into github.com message for the extension"
  5. inputing the token Add: 6. Typing in "github.com" (It doesn't default) Add: 7. Ignoring the login error message the plugin says.

It appears to work after that.

Only thing I'd add is:

nixs108 commented 4 years ago

I got around this, however, by clicking the Sign in button, and then going to the bottom where it where "Signing into GitHub", where VSCode then asks you for a token. Go to https://github.com/settings/tokens and create a new token and paste that into then screen box. Then type Github.com in the next box. You are then connected.

Worked for me. Thanks a bunch!

owpm commented 4 years ago

Is this going to be fixed anytime soon? Concerning that you need to workaround a forced oauth signin.

Any way to use normal git remotes like you'd do for all other remotes like GitLab through vscode or are you completely forced to oauth?

kas commented 4 years ago

Ubuntu 20.04 LTS, Firefox 76.0.1, Visual Studio Code 1.45.1

I can't explain what exactly fixed this for me, but after trying the process three times, it finally worked. When I'd get the error web page, I'd completely close out of Visual Studio Code each time and try the process again. I was trying to access a private GitHub repository.

Edit: Just to be clear, I did not have to use a different web browser and I did not need to follow any mitigations recommended in this issue. Just try a few times!

Ryuno-Ki commented 4 years ago

Visual Studio Code 1.45.1 Firefox 75.0 Chromium 81.0.4044.138 Sabayon Linux

Same here. Custom Protocol was not detected. Chromium asked for opening with xdg-open.

The format looks like vscode://vscode.github-authentication/did-authenticate?windowId=1&code=<hexcode>&state=<uuid> (had to make Chromium my default browser because Firefox failed)

Using Personal Access Token failed with invalid format in VS Code.

Xmetalfanx commented 4 years ago

seeing the same thing here .... currently on Arch Linux .. vscode 1.45.1 ... Firefox 77.0.1 ... not sure this has anything to do with it but i cleared temp internet data including cookies too and it doesn't seem to help ... at least not yet

Ryuno-Ki commented 4 years ago

From the format, my first point of investigation would be, whether the vscode: protocol was correctly registered in Firefox.

erikmonroy commented 4 years ago

Visual Studio Code: 1.45.1 Electron: 7.2.4 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Linux x64 (chrome os linux)

I too have tried a Personal Access Token, as well as a chrome settings reset. Neither have worked, nor has copying the access token provided when the authorization fails in the browser.

Caleb-Irwin commented 4 years ago

Interestingly I also got the same error in brave (a chromium based browser), but when I disabled the default ad blocker and ublock origin it worked.

xxpedro commented 4 years ago

Hi there. I was facing the same problem and now I'm signed in.

Steps :

1. Click Sign in to github.com

2. Edge( in my case) opens the athaurization  link

3. Copy the link

4. In my case, I pasted it in Firefox Developer Edition and hint Enter

5. Success message : Authorization was successful

6. Then I was redirected to VS Code.

7. That's all and now I'm signed in.

Thaaaankkk Youu

zaxhutchinson commented 4 years ago

VSCodium: 1.47 Firefox: 78.0.1 Xubuntu: 20.04

Fresh OS install. Experience is similar to the above trying to push to a private repo. Popup says I need to sign-in with Github. When I click the affirmative button, Firefox opens asking to authorize. Clicking the green button produces the "oops, something went wrong".

I tried the solution above that says to close everything out several times. That worked. But then when I close codium and try again, the pop-up returns. However, I noticed that if click Cancel on the popup or hit the "x" to close it, an entry text box opens at the top of codium asking for my git username and then a second asking for the password. That works. But this is clunky.

viniciusov commented 4 years ago

In VS Code -> Settings, search for Github. You will find the following option:

Github: Git Authentication

- [x] Controls whether to enable automatic GitHub authentication for git commands within VS Code.

Uncheck this box to enter the Github credentials on VS Code everytime you need (instead of using your browser).

zaxhutchinson commented 4 years ago

In VS Code -> Settings, search for Github. You will find the following option:

Github: Git Authentication

- [x] Controls whether to enable automatic GitHub authentication for git commands within VS Code.

Uncheck this box to enter the Github credentials on VS Code everytime you need (instead of using your browser).

Perfect! Thanks.

makeable commented 4 years ago

Seems like its broken in Edge Legacy. Surely stock windows 10, vscode, and github would be a tested combination at ms... How embarrassing!

r-pankevicius commented 4 years ago

@makeable Same issue with Edge Legacy. Workaround: Let default browser to open github page. Copy URL, open Chrome, paste URL there and go. That worked for me, no need to change default browser.

ghtmtt commented 4 years ago

I also have the same problem. The default browser is Firefox but even if I copy/paste the link into Chrome I always get a broken link:

Version: 1.47.2 Commit: 17299e413d5590b14ab0340ea477cdd86ff13daf Date: 2020-07-17T10:49:51.211Z Electron: 7.3.2 Chrome: 78.0.3904.130 Node.js: 12.8.1 V8: 7.8.279.23-electron.0 OS: Linux x64 5.7.0-1-amd64

makeable commented 4 years ago

Is there a project we can contribute to for this auth endpoint? Its clearly broken, and would like to fix it!

GoToSeattle commented 4 years ago

Step 1 In VS Code -> Settings, search for Github. You will find the following option (Uncheck this box): Github: Git Authentication

Step 2 Go to https://github.com/settings/applications and then click tab "Authorized OAuth Apps", then click QQ图片20200803061605 QQ图片20200803062154 QQ图片20200803062256 QQ图片20200803062341

jeffswt commented 4 years ago

Confirmed on Windows 10 1909 18363.959, Firefox 79.0.

nvmnghia commented 4 years ago

macOS 10.14.6, latest VSCode, cannot use Chrome 85 to sync. Copy paste the link to Safari works though.

pavel-francirek commented 4 years ago

Confirmed, no need to set other browser (other than Firefox) default. Just copy Github confirmation page's URL to Safari and continue without error (tested with latest Firefox, Safari, VScode, macOS).

DiegoRosas12 commented 4 years ago

I had no problems pasting the token in vscode but it only worked when I pasted my personal access token generated in GitHub.com not the one that your browser windows tells you to copy.

daveku commented 3 years ago

Lamentablemente tengo el mismo problema pero en Codespaces de GitHub.

oryws commented 3 years ago

Was having the same issue on OSX 10.15.6, no matter the browser. I finally got it to work by pulling both vscode and firefox dev edition from full screen mode into the same desktop then it simply worked

helloshomax commented 3 years ago

In VS Code -> Settings, search for Github. You will find the following option:

Github: Git Authentication

- [x] Controls whether to enable automatic GitHub authentication for git commands within VS Code.

Uncheck this box to enter the Github credentials on VS Code everytime you need (instead of using your browser).

Perfect! Thanks.

Thank you very much, worked. Windows 7 SP1. VS code Exploration.

oxdead commented 3 years ago

same problem on CentOS 8, Mozilla Firefox

yeetbit commented 3 years ago

I have experienced the same problem @ Arch Manjaro 20.2 Ubuntu 19.10 Ubuntu 20.04 Kernel version 5.8 VScode 1.51.1

It seems that if I try to authenticate via the integrated GIT extension, URL socket in VScode is not active during token transfer. What worked for me: 1: Choose copy adress @ the vscode prompt 2: restart VScode, paste adress in firefox
then it opens the VScode URL connection and you're done.

ggabriel96 commented 3 years ago

Just happened to me on a fresh Linux install. Reading the comments here, I tried simply removing GitHub for VSCode from my Authorized OAuth Apps and then signing in again. It worked :man_shrugging: Maybe the case where it is already authorized is not being handled correctly?

cmolina commented 3 years ago

I finally got it working.

  1. Opened any vscode extension in your default browser, for example change-case
  2. Click "Install" button. The browser will show an alert asking how do you want to handle vscode links. Select the Visual Studio Code app
  3. You now should see the extension page open in vscode

Now your browser should be able to complete the sign-in process: repeat the failed workflow and follow any alerts that instruct your browser to open vscode after the login.

Tested with macOS Big Sur, Firefox Developer Edition 85.

BexDunn commented 3 years ago

I have this issue working on a CentOS HPC machine that I don't have admin rights to, where I can't update firefox or use Chrome. So far none of the above solutions/workarounds have worked for me.

dotnetspec commented 3 years ago

git integration etc. issues with VSCode: I have fixed this: Upgrade Linux Mint from 18.3 to 20.0 Uninstall flatpack version of VSCode (I had to use that version with 18.3) Install official VSCode Linux version from: https://code.visualstudio.com/ Now no git integration issues.

AR-Student824 commented 3 years ago

Happening on Windows 10 Pro Insider w/ latest vsc

udondan commented 3 years ago

Thanks @cmolina, confirming this worked for me. Same scenario, Big Sur, Firefox. This was bugging my for months!

andrewufrank commented 3 years ago

the error still occurs on bullseye in feb 2021. impossible to fix? Version: 1.53.2 Commit: 622cb03f7e070a9670c94bae1a45d78d7181fbd4 Date: 2021-02-11T11:48:44.518Z Electron: 11.2.1 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Linux x64 5.10.0-3-amd64

pkrukp commented 3 years ago

Happened to me. Maybe related to multiple opened VSCode editors (with different workspaces)? I started sign-in in vscode 1, but after web browser asked to me open vscode, it opened vscode 2 (or I selected wrong one), and it signed in correct. I noticed it was the wrong one, signed out, tried signing in again from the first vscode, but now it didn't work (the error 801).

I closed all vscode, restarted browser, started 1 vscode and this time I was able to sign-in.

iamarkadyt commented 3 years ago

Managed to get around the issue in my browser by just reloading the page right after it showed that 801 error.

soredake commented 3 years ago

Solution for firefox:

  1. Set "system handler" for vscode protocol: Screenshot_20210304_095732
  2. Yay it redirects to vscode now! Screenshot_20210304_095747
Abdelfatahh commented 3 years ago

I had the same issue on ubuntu with firefox. The steps I did to solve this issue was the following -> 1- you go to the bottom left and click on the sync on button. 2- you sign in with github and it will open with your default browser (in my case was chrome) 3- you'll copy the link and open a new incognito tab (private window in firefox). 4- you'll login and it will success!

stuzenz commented 3 years ago

Same issue for me on Ubuntu 19.04, Firefox 68.0.2, vscode 1.37.1, extension version 0.10.0.

The only workaround I found was to make Chrome my default browser temporarily, so apparently the login workflow is broken in Firefox.

Workaround was good for me on archlinux. Thanks!

jcemerson commented 3 years ago

I just had this issue with Firefox on Linux Mint. It was resolved by just turning off Enhanced Tracking Protection in Firefox on the page where the error is presented. At that point, the page reloaded and authorization completed, after which I turned Enhanced Tracking Protection back on.

image

image

From what I can tell, all (or most at least) of the mentioned issues reported involve Firefox and the workarounds often consist of using a different browser for the authorization.

This isn't a case of Firefox being broken. It's just that Firefox (with Enhanced Tracking Protection on) is more restrictive of what websites can do (e.g. set cookies, run tracking scripts, capture canvas details) and some sites, for better or worse, require these things in order to function. In these cases, you just need to create (temporary or permanent) exceptions to the Protection rules.

To me, this isn't a bug at all, just a conflict of functionalities.