Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Unable to signin #247

Closed
sguti opened this issue Jun 2, 2017 · 8 comments
Closed

Unable to signin #247

sguti opened this issue Jun 2, 2017 · 8 comments

Comments

@sguti
Copy link

sguti commented Jun 2, 2017

Whenever I am trying to use this extension I am getting below error.
image

Though it's not showing any error message when I am providing the PAT to signin.

The log file shows below error-
2017-06-02T08:38:28.182Z - error: [41244] connect ETIMEDOUT someazureserverip:443 Error: Error: connect ETIMEDOUT someazureserverip:443

My workspace settings -

"http.proxy": "http://corporateproxyserver/",
"http.proxyStrictSSL": false,


"tfvc.location" : "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\Common7\\IDE\\TF.exe",
"tfvc.restrictWorkspace": true,
"team.logging.level": "error",
"team.remoteUrl": "https://vstsrepo.visualstudio.com"
@jeffyoung
Copy link
Contributor

Hi @guti007. That message is one that I added to make it a bit clearer in certain scenarios (when users sign out and need to sign back in) but it also appears to be displayed when we can't create a connection to the server. That's what appears to be happening in this case.

Since you've got a proxy server set up, it appears (for whatever reason) that the connection to team services is timing out. First, is it required in your scenario to use a proxy server (could you attempt it without it)? Second, could you set the "team.logging.level" to "debug" and provide the rest of the log file (feel free to scrub it beforehand)? I'd just like to get an indication of what's going on before and after the error.

@sguti
Copy link
Author

sguti commented Jun 5, 2017

Hi @jeffyoung. Thanks for quick response. 👍
I have tried w/ and w/o proxy but no luck. I am always getting the same connection timed out error.
Here are the log files-
team-extension-log2.txt
team-extension-log1.txt

@jeffyoung
Copy link
Contributor

Thanks for the logs @sguti.

So there are a couple of proxies that we're talking about here. There's the proxy you need to use to get access to Team Services (I assume that's why you've set http.proxy in the VS Code settings). There's also something called a "TFS Proxy". That's a machine responsible for locally caching source code from a remote TFS server. If you had a TFS proxy at your location, that's the only time you'd set tfvc.proxy. If you don't have one of those, there's no need to set tfvc.proxy. (I suspect you don't.)

Unfortunately, the library the extension uses to communicate with TFS/Team Services doesn't use the VS Code http.proxy settings. For the extension to use your proxy, you need to set the http_proxy and https_proxy environment variables for the VS Code process that's running the extension. Its value takes the same form as you've shown here.

I went ahead and tried this myself with "FreeProxy". Using the two environment variables routed the traffic through FreeProxy. If the proxy wasn't available, the extension would display a It appears the configured proxy is not reachable. Please check your connection and try again. error message. If I didn't set those two env vars at all, traffic would be routed normally (on our corp network we don't need a proxy so even that traffic was successful).

Based on the rest of the log files, it appears the extension is just trying to contact a URL like
https://xplatalm.visualstudio.com/_apis/tfvc/branches to get some information. I'd speculate that your organization is requiring all internet traffic to go through the proxy and, since the extension requires the 2 env vars and they aren't set, perhaps the request goes out and simply times out because the proxy is never contacted. Try setting those 2 env vars and see if you can connect.

I'll also add that the library used by the extension doesn't support authenticated proxies (as there's no way to supply the credentials). So if your proxy requires authentication (I don't see any indication that it might) the extension wouldn't be able to reach any servers.

@sguti
Copy link
Author

sguti commented Jun 14, 2017

Hi @jeffyoung.
First of all thanks for the detailed explaination which helped us to find the root cause of this connectivity issue.

We are finally able to connect. There was some security policy which was blocking the connection to the server.

Sorry for delayed response.

@sguti sguti closed this as completed Jun 14, 2017
@russmeine
Copy link

@jeffyoung

For the extension to use your proxy, you need to set the http_proxy and https_proxy environment variables for the VS Code process that's running the extension.

Could you specify how to set these two variables for the VS Code process?

@sguti
Copy link
Author

sguti commented Jul 8, 2017

@russmeine

For windows, you have to add those(http and https proxy) in your Environment Variables section.
Steps: (windows+R) -> type "rundll32 sysdm.cpl,EditEnvironmentVariables" and hit enter-> add those varibales.

Not sure about Mac.

@siliond
Copy link

siliond commented Oct 4, 2017

@jeffyoung I'm getting a ETIMEDOUT 104.214.111.103:443 error, being behind a proxy configured via environmental variables, log
team-extension.log

Please advise.

@Srinivas289
Copy link

@sguti, @jeffyoung , how did you solve the issue, I am having same issue, even after entering username and password, it does not connect, and not showing any errors. Also How can we see logs for it??
In my case, TFS is onpremise server.
Thanks.

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

No branches or pull requests

5 participants