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
Login with Github Fails, even when VSCode Launched as Admin #1005
Comments
What is exception logged in the developer console? @arnohovhannisyan can assist us on this :) |
@shanalikhan I am not sure I saw one. Where would I see this? In VS Code or in Chrome? |
In VSCode, Help Menu > Toogle Developer Tools Clear the console there and take a screenshot of exceptions when you reproduce the above steps. |
Hi @shanalikhan I had to allow code.exe to communicate through Windows Firewall (all allowed) but as soon as I click to add a gist, I get stuck on the callback screen and get the exact same error in the browser. In Code, the following gets logged to the console:
|
I am having the exact same issue Settings Sync: V3.4.2 Any solutions? my error: Error: FetchError: request to https://github.com/login/oauth/access_token failed, reason: unable to get local issuer certificate at e. (C:\Users\kzhang.vscode\extensions\shan.code-settings-sync-3.4.2\out\extension.js:560:73883) at C:\Users\kzhang.vscode\extensions\shan.code-settings-sync-3.4.2\out\extension.js:560:71803 at Object.module.exports.i [as throw] (C:\Users\kzhang.vscode\extensions\shan.code-settings-sync-3.4.2\out\extension.js:560:71908) at s (C:\Users\kzhang.vscode\extensions\shan.code-settings-sync-3.4.2\out\extension.js:560:70705) at process._tickCallback (internal/process/next_tick.js:68:7) |
Okay, so tried again today. I have no extensions enabled in Chrome while attempting this. The error I get in VS Code is:
The error in Chrome is only this:
It appears we are all getting different errors, lol. Interesting. My versions of everything |
Same issue here, plain VS Code 1.37.1 , Sync 3.4.2 (as only extension), using Chrome or Edge.
|
@8thHalfHour As a temporary workaround, you can try manually creating an access token with the |
I'm getting the same issue. I installed settings sync on my work computer and it worked fine, then I installed it on my home computer and I can't login with github. Both Windows 10. I noticed this URL param "&redirect_uri=http://localhost:54321/callback" in the authorization url, is that intentional? I didn't notice it the first time I installed it. The browser redirects to http://localhost:54321/callback?code=xxxxxxxxx and therefore can't complete the process. I tried removing the URL param from the authorization URL, but it still redirects. Then I tried the same thing in incognito mode, which gets me to the github login screen, and begins to authorize, but then redirects to the localhost URL and can't complete the process. VS Code console error: ERR listen EACCES 0.0.0.0:54321: Error: listen EACCES 0.0.0.0:54321 |
I had the exact same issue here. Thank you all! |
I had this same problem, in the console it showed the error "failed, reason: certificate has expired" and in google chrome the same error of @rm-bergmann appeared. I removed some unknown certificates from my keychain and the problem was solved, apparently these blocked access. Cheers, and I hope it helps you. |
I had a similar issue on Chromebook + crostini - i.e., I get the github auth, validate it and then the redirection to localhost:54321/callback?code=xxx fails. The trick in that case (Chromebook/crostini specific) is to just replace "localhost" by "penguin.linux.test" (the address of the crostini VM) - works perfectly from there. |
Manjaro Linux user. |
having the same issue and this is the error logs in console workbench.desktop.main.js:sourcemap:3611 [[object Object]]listen EADDRINUSE: address already in use :::54321 |
Having the same issue when clicking "login with github" button. this is the error log from console. Error: listen EADDRINUSE: address already in use :::54321 |
manjaro user, too. Same problem and your solution works.Thanks! |
I can confirm that this works perfectly well when running from a chromebook. |
This worked as well for me on my chromebook setup. |
I meet the same problem.I confirm that the first time to sign in github is OK, the first time to download setting is also OK. But upload is not good, when I reset the sync setting and second-sign-in Github, the problem appreas as same as everybody here. |
I'm on ubuntu 19.10 | VSCode 1.44.0-insider when i try to login via github, it passes the permissions page, and then fails on the http://localhost.etcetc. As well it won't connect to my private gist.
I do not have any proxy setup. |
Hi, I'm seeing this identical issue on a fresh installation of Windows 10 Pro where there are no proxies or corporate/enterprise firewalls. Upon clicking “Login with Github”, I’m redirected to the following URL: Which is automatically followed by a 302 redirection to the following erroneous callback URL: http://localhost:54321/callback?code=1c00f98da01ed9cbab23 Note, I’m already logged in to complete GitHub authentication. Although nothing is present in the browser’s console, the following error is logged in VS Code’s console upon clicking the button.
Do let me know if any further information is required to help troubleshooting. Thanks for your time. This is my environment setup versions:
|
Curiously, this appears to have resolved itself the next day after a cold reboot. Worth mentioning that this time, upon clicking the "Login with GitHub" button, VS Code opened a new Windows Security Alert dialog where Windes Defender Firewall explicitly requested access to private or public networks on behalf of VS Code, similar to this screenshot. Thanks! |
My default browser has a proxy set by the corporate environment, and cannot access localhost. I just copy the URL like http://localhost:54321/callback?code=xxxxxx to another browser without a proxy, then I can get "Success! You may now close this tab." |
have same problem
|
Same. I just did my i3 window manager setup.
My export XDG_CONFIG_HOME="$HOME/.config"
export XDG_DATA_HOME="$HOME/.local/share"
export XDG_CACHE_HOME="$HOME/.cache"
export XINITRC="${XDG_CONFIG_HOME:-$HOME/.config}/x11/xinitrc"
#export XAUTHORITY="$XDG_RUNTIME_DIR/.Xauthority" # This line will break some DMs.
export ICEAUTHORITY="$XDG_CACHE_HOME"/ICEauthority
export GTK2_RC_FILES="${XDG_CONFIG_HOME:-$HOME/.config}/gtk-2.0/gtkrc-2.0"
export PASSWORD_STORE_DIR="${XDG_DATA_HOME:-$HOME/.local/share}/password-store"
export GNUPGHOME="${XDG_DATA_HOME:-$HOME/.local/share}/gnupg"
export VSCODE_PORTABLE="$XDG_DATA_HOME"/vscode
export BASH_COMPLETION_USER_FILE="$XDG_CONFIG_HOME"/bash-completion/bash_completion Error I'm getting: |
Some time ago VSCode has released the official Settings Sync: https://code.visualstudio.com/docs/editor/settings-sync |
in 2021 i'm still getting this error. |
Same here, it worked after a cold reboot |
Use official one guys + no gist will be used |
I have the same issue.
Either chrome or firefox. |
same issue |
I had the same issue and I think it might be because I run tunnels using sshuttle. I restarted my machine to be doubly sure I killed them all and then it worked. So either killing tunnels or just restarting fixed it |
Still getting this error in 2024 |
🐛 Describe the bug
"Login with Github" fails on Win 10 Pro, even when VS Code is launched as admin.
🌴 Visual Studio Code Version : 1.37.0
🌴 Code Settings Sync Version : 3.4.1
🌴 Standard or Insiders : Standard
🌴 Portable or Installed : Installed
🌴 OSS or Official Build : Official
🌴 Operating System : Win 10 Pro
🌴 Occurs On: Help Configuring
🌴 Proxy Enabled: No
🌴 Gist Id: Didn't get to get that far
📰 To Reproduce
Steps to reproduce the behavior:
https://github.com/login/oauth/authorize?scope=gist%20read:user&client_id=cfd96460d8b110e2351b&redirect_uri=http://localhost:54321/callback
http://localhost:54321/callback?code=161f703d663c9664cd9e
ending in error:💪 Expected behavior
I expect to be logged into GitHub and for setup to continue.
The text was updated successfully, but these errors were encountered: