4

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'
  1. Sometimes it fixes itself after an unknown period of time.
  2. Sometimes I do nothing during that period of time.
  3. Sometimes I click around and check out other branches and do pull requests and then it works again.
  4. 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.

Community
  • 1
  • 1
Nateous
  • 757
  • 9
  • 23
  • Same problem, im not using 2factor. – Sven van den Boogaart Aug 25 '16 at 16:34
  • at least that takes away the variable of 2fa being a possible reason – Nateous Aug 25 '16 at 18:38
  • So far our network team says it is DNS, at least that is what Microsoft told them. I'm trying to put in a `hosts` entry now to see if that helps. – Nateous Sep 01 '16 at 17:49
  • This is most likely NOT a DNS issue, as I've entered a `hosts` entry and I am still receiving this error. Going to open a ticket with MS next. – Nateous Sep 06 '16 at 13:50
  • i dont havd the problem anymore only had it for An hour – Sven van den Boogaart Sep 06 '16 at 13:53
  • Thats interesting. We have about ten people having the issue. I'm still trying to figure out if it is happening to each machine, or if everyone would be having the issue at the same time. – Nateous Sep 06 '16 at 14:08
  • did you try it with a laptop on a different network? – Sven van den Boogaart Sep 06 '16 at 14:11
  • Good point. We don't have any laptops with VS, but that would be a good test. I'll see if we can set that up. – Nateous Sep 06 '16 at 14:14
  • I also get `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.` error when I start up. So perhaps the github.com auth is getting broken. – Nateous Sep 06 '16 at 14:24
  • Sounds like network problems – Sven van den Boogaart Sep 06 '16 at 14:25
  • Microsoft won't help either. Saw that coming. We sometimes get the same error on nuget package servers and even TFS. – Nateous Sep 07 '16 at 18:24
  • Do the test with a different lan/wan, im 99% sure it's a problem in your network. – Sven van den Boogaart Sep 07 '16 at 18:26
  • this is not a network issue, connection to github.com never goes down, you can browse to it in the browser. but Visual Studio loses the connection and you can not use the built in browser in Visual Studio to browse to github.com. so the issue is in Visual Studio. – Nateous Oct 03 '16 at 21:29

1 Answers1

0

After back and forth with Microsoft support and the release of VS 2017.

The answer is to upgrade!

Nateous
  • 757
  • 9
  • 23