github extension for visual studio 2015 loses connection - github

I keep getting this error occasionally. It is really annoying because sometimes it fixes itself, but mostly I just have to close VS and reopen and then it will work again for a while.
It happens when I try to pull from a branch (or any other git network interaction).
Error encountered while fetching: An error occurred while sending the request.
Inner Exception:
The remote name could not be resolved: 'github.com'
Sometimes it fixes itself after an unknown period of time.
Sometimes I do nothing during that period of time.
Sometimes I click around and check out other branches and do pull requests and then it works again.
Mostly I have to restart VS to get it working again.
Has anyone else had this issue? How did you resolve?
I am also using two factor auth. if that is the issue. (Doesn't appear to be the issue)
I also receive this error when starting up VS sometimes:
We were unable to automatically populate your Visual Studio Team Services accounts.
The following error was encountered: TF400813:
Resource not available for anonymous access. Client authentication required.
So perhaps it is that the github.com authentication is being lost at some point during interactions and restarting VS fixes it.
Another clue is that when github.com can't be reached, it can't be browsed to in the browser in Visual Studio. It can be browsed to fine in Chrome (or FireFox or IE). Visual Studio also seems to lose connection to nuget.org occasionally as well, the effect appears to be the same.
Possible related issue:
Visual Studio/C#: Nuget Unable to connect to remote server
UPDATE: This happens on two different ISPs and one of them was not on the corporate firewall (this rules out network issues). When the issue happens it actually shuts down ALL network communication from within Visual Studio, so this isn't just a github.com issue. I have a ticket open with Microsoft, hopefully we will get it resolved and I can post the answer for everyone.

After back and forth with Microsoft support and the release of VS 2017.
The answer is to upgrade!

Related

How to deal with this error: Extension activation failed: "Timed out waiting for authentication provider to register"?

I have passed the Copilot student certification and can use it normally in the Jetbrains department software. But I cannot connect to the GitHub account and the Copilot server in VSCode, also cannot use the Copilot plugin. Tried to switch different versions of VSCode and Copilot but the issue was not resolved.
Tried to switch different versions of VSCode and Copilot but the issue was not resolved.
Check first, as in this discussion, if this is linked to your internet connection.
I found that the problem may be caused by the internet environment.
After I connected my computer to my phone's hot spot, it worked successfully.
Maybe you guys can try it out by checking out your devices' internet condition.
Or, different cause:
I had 2 accounts signed in VS Code, signed out the non-GitHub account (in my case it was Outlook account).
Signed in from GitHub account this time it is working.
In my case I received preview on my Outlook account still I had to remove it and use my GitHub account that was created using the Outlook account.

ERR_CONNECTION_RESET in Log(main) on startup

Came back to VS Code after a while and I'm met with the following error in Log(Main):
[error] Error: net::ERR_CONNECTION_RESET
at SimpleURLLoaderWrapper.<anonymous> (electron/js2c/browser_init.js:109:7068)
at SimpleURLLoaderWrapper.emit (events.js:315:20)
In the bar at the bottom it says: Internet not connected or can't connect to GitHub. In the Recommended box under Extensions it says We cannot connect to the Extensions Marketplace at this time, please try again later.
Firefox, Chrome and Edge can connect fine as can VS Code on a XUbuntu Virtualbox on the same machine, but I am having similar problems with Discord and Signal Desktop: failed connections due to ECONNRESET errors. The only thing I've found in common so far is that all 3 are Electron apps. Signal, just like beta versions of Discord I tried, only managed to connect once.
Things I've tried:
disabling ExpressVPN/Windows Firewall/Kaspersky AV (free)
full scan with Kaspersky and MalwareBytes
changing DNS settings from automatic to Google to CloudFlare
ipconfig release-renew-flushdns-registerdns
netsh winsock reset
windows system file checker
reset home network
I logged the issue on VS Code GitHub but they sent me here so I'm hoping someone can help me with this. Been losing my mind on this for days now and really hoping to avoid a fresh install.
Edit1: I just tried safe mode with network and all problems seem to be solved. Not sure what this points to though... Faulty drivers, some conflicting startup service or program?
Well I feel like a fool..
Turns out I didn't completely shutdown Kaspersky..

VS Code : Sign In Error :You appear to be offline. Please check your network connection

In VS Code when i try to run the below command for sign in
I get below error message and it is not able to login
I had the same issue due to working behind a company proxy. I could solve it by writing the http proxy in the settings (instead of leaving it empty and inheriting from environment variables).
I had the same issue - the problem was that my VS code was still remotely connected to my office server via SSH. I killed that connection ("close remote connection") and it allowed me to sign in.
Same exact issue for me, caused (most likely) by my company's proxy blocking the sign-in request. What fixed it was:
closing Visual Studio Code (previously opened through code . in WSL in my case);
opening Visual Studio Code again directly in Windows;
Login to Azure (then finally the browser opened with the login page and I could get in)
Of course your log-in will be saved also when you close VSCode in windows and reopen in WSL.

(out of the blue) "not authorized" message when trying to do push/pull/fetch

I tried to do a push of a commit to a git repository with egit in eclipse yesterday, and since then I'm getting "not authorized" popup (All of a sudden). This is not machine related, as I checked couple hours later(when error persisted) on my laptop, which I didn't touch in 2 days (and it was working perfectly then), and I am getting the same error.
I can connect with Team Foundation Server just fine, and my access was not reverted. Would any of you have any idea what might be the cause of the problem?
Just for further information, when doing operations (in Eclipse) on a project that is under TFVC (Team Foundation Version Control), I can do check-in just fine, so that is a proof my authorization to the server was not reverted.
Thankfully I found the cause.
For those who will encounter the same problem, there must have been a change (a bug fix most likely) in TFS server implementation on Microsoft servers. Previously I logged in using my webbrowser login, and also my password did not fullfill the requirements - I did not have at least 1 uppercase letter. Once I change my password and entered my alternate credential in eclipse, all worked correctly.

Eclipse unable to connect to TFS Server

I am using eclipse with Microsoft Visual Studio Team Explorer Everywhere 2010. I was able to successfully import my Project, but every time I open eclipse, The progress window gets stuck at 60% while trying to "Refresh TFS Server Information for http://my.server".
Eventually I will get an error from eclipse:
An internal error occured during:"refreshing server item information for project MyProject".
com.ctc.wstc.exc.WstxIOException: Connection reset.
Also I get this messagewhen trying to refresh manually:
An internal error occured during:"Refreshing TFS Server information for http://my.server".
[com.ctc.wstx.exc.Wstx.LazyException] Connection reset.
Any help is greatly appreciated!
The "Connection reset" is coming from TEE's network communication layer and message points to a network problem. Can you use any TFS features from the plug-in (is "Refresh Server Item Information" the only thing that fails)? If you can't use any TFS features from the plug-in, check that Eclipse's HTTP proxy configuration is correct.
If you can use some TFS features, but the server item information refresh feature is failing, check that you don't have an HTTP proxy, firewall, or NAT device between your client and TFS that is dropping TCP sockets after a short time. Refreshing information for a large number of files, or from a heavily loaded server, may take a while (perhaps minutes). A network device that "drops" the active TCP socket without notifying the client would cause this behavior.
First, install TEE SP1 if you didn't already.
If the error persists, it might be a potential bug so post it on connect or on the TEE forum.
I ended up uninstalling and re-installing eclipse and TEE plug-in. After that everything connects and works as far as TFS is concerned.