Bug 28177 - Inaccurate error message when build host connection fails because Windows proxy is enabled
Summary: Inaccurate error message when build host connection fails because Windows pro...
Status: CLOSED INVALID
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 3.9
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Brendan Zagaeski (Xamarin Team, assistant)
URL:
Depends on:
Blocks:
 
Reported: 2015-03-18 21:10 UTC by Brendan Zagaeski (Xamarin Team, assistant)
Modified: 2016-01-26 20:54 UTC (History)
8 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
Log files and packet capture (6.04 KB, application/zip)
2015-03-18 21:10 UTC, Brendan Zagaeski (Xamarin Team, assistant)
Details


Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
CLOSED INVALID

Description Brendan Zagaeski (Xamarin Team, assistant) 2015-03-18 21:10:13 UTC
Created attachment 10405 [details]
Log files and packet capture

Inaccurate error message when build host connection fails because Windows proxy is enabled.

Regression status: NOT a regression.



## Steps to reproduce

1. Install Fiddler [1] on the Windows machine.
> [1] http://www.telerik.com/fiddler

2. Launch Fiddler. By default this should enable the Windows manual proxy settings to redirect HTTP traffic through Fiddler.

3. Ensure the Xamarin.iOS Build Host app and `mtbserver` are running on the Mac build host.

4. Attempt to pair with the Mac build host from Visual Studio.



## Results

The "Error List" in Visual Studio displays the following _inaccurate_ message:

> Build server with address 172.16.5.1 is too old to be used with this version
> of Xamarin.iOS extension. Double click here to select a new server.



### Corresponding error from `mtbserver.log`

> [18-Mar-2015 20:41:21] Got connection from Visual Studio (log)
> [18-Mar-2015 20:41:21] Error: An error occurred (no details available)



### Corresponding messages from `devenv*.log`

> Xamarin.VisualStudio.IOS.Utilities.BuildServer Information: 0 : [2015-03-18 20:41:17.7] Opening control connection
> Xamarin.VisualStudio.IOS.Utilities.BuildServer Information: 0 : [2015-03-18 20:41:20.7] Control connection to 172.16.5.1 established
> Xamarin.VisualStudio.IOS.Utilities.BuildServer Error: 0 : [2015-03-18 20:41:21.4] Exception caught.
> Xamarin.VisualStudio.IOS.Utilities.BuildServer Error: 0 : [2015-03-18 20:41:21.7] Server returned an error. The remote server returned an error: (400) Bad Request.
> Server error code: 400
> Bad Request
> 
> Xamarin.VisualStudio.IOS.Utilities.BuildServer Error: 0 : [2015-03-18 20:41:21.9] Build server control connection failed
> Xamarin.VisualStudio.IOS.Utilities.BuildServer Error: 0 : [2015-03-18 20:41:22.1] Server 172.16.5.1 hung up connection. Unable to read data from the transport connection: A blocking operation was interrupted by a call to WSACancelBlockingCall. (System.IO.IOException)



### Packet capture

The network traffic shows that the process completes all of the steps for a "good" handshake (see 28018, comment 0). So bug 28018 is _not_ a duplicate of this problem. In _this_ bug, the problem happens _after_ the Windows side has started exchanging HTTP traffic with the Mac build host via one of the MTBSERVERPORTS. In this precise example, the port used on the Mac build host is 62936.



## Possible improvements

The error messages displayed in the "Error List" should reflect the actual error returned by the server. For example, perhaps it would be acceptable to show the error message as it appears in the `devenv*.log`:

> Server returned an error. The remote server returned an error: (400) Bad Request.


And include the additional 2 lines of the error message in the error details:
> Server error code: 400
> Bad Request


If there's some generalized way it might be possible to give more detailed information about why the build host thinks the request is "bad," all the better. But that can be filed as a separate bug report at some other time. In this particular case, we know that the problem is that the Fiddler proxy is modifying the HTTP traffic in some way, and that's interfering with the normal HTTP process.


Thanks!



## Version information

Microsoft Visual Studio Professional 2013
Version 12.0.30723.00 Update 3
Microsoft .NET Framework
Version 4.5.51641

Xamarin   3.9.523.0 (d58edc4)
Xamarin.Android   4.20.0.38 (38ac51a9d0866c7726a7484d82632c82c8221594)
Xamarin.iOS   8.8.1.0 (61fa2c6e0f2ef51eb98b8810de13b4469f379cc7)


### OS X 10.9.5, MacBook Air
Xamarin.iOS 8.8.1.9 (Business Edition)
Hash: 7e1f69e
Build date: 2015-03-12 15:35:49-0400

Xcode 6.1.1 (6611), Build 6A2008a
Comment 1 Brendan Zagaeski (Xamarin Team, assistant) 2015-03-18 21:14:40 UTC
As discussed (back in early 2014) on the forums:
http://forums.xamarin.com/discussion/comment/45440/#Comment_45440
Comment 2 mag@xamarin.com 2016-01-26 15:03:57 UTC
As old MTBS is not supported anymore and new XMA works directly on top of TCP protocol and not HTTP, I consider this bug not valid anymore
Comment 3 Brendan Zagaeski (Xamarin Team, assistant) 2016-01-26 20:54:23 UTC
Agreed that this is no longer an issue with the new SSH-based build host connection. Closing.