Bug 58410 - After a disconnection from Mac Build Agent, can reconnect only after a restart of Visual Studio
Summary: After a disconnection from Mac Build Agent, can reconnect only after a restar...
Status: RESOLVED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-07-26 10:41 UTC by steott
Modified: 2017-09-23 22:16 UTC (History)
6 users (show)

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

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:
RESOLVED FIXED

Description steott 2017-07-26 10:41:56 UTC
Maybe this is a following of issue #36063

This "disconnection" issue is still happening to me several times per day.

I've noticed that a lot of times the disconnection happens during a strange situation that I have with Parallels Desktop.
Every one or two hours, my Windows virtual machine changes automatically time just for a few seconds (e.g. if it's 8:30 AM, it goes to 10:30 AM), and then it goes automatically back to the right time. 
I haven't understood yet what is causing this problem, I've even opened a ticket on Parallels Forum, but I haven't solved yet the problem.

Anyway, when this issue happens, Visual Studio disconnects from the Mac Build Agent (hosted in the same physical machine), and there is no way to reconnect to it without closing Visual Studio.
As soon as I close Visual Studio and open again the project, it reconnects to the Mac Build Agent, but then I have to execute at least a rebuild (sometimes even more than one) to have the correct version compiled.

This "disconnection" issue is not a stopping one (I can solve it by closing Visual Studio, open again the project, do a rebuild), but it's quite frustrating, because it makes me lose some minutes and, worst of all, concentration :(  
If Visual Studio could reconnect automatically to the host, and don't require the rebuild, it would be way better.

I have the last stable version of every software (Windows 10, MacOS X, Visual Studio 2017, Xamarin iOS, ...).

This are the logs from Visual Studio:

Starting connection to Mac 10.211.55.2...
Starting Broker 4.5.0.486 in port 55066...
Connection successfully established with the Mac 10.211.55.2:55066
Starting agents on Mac Stefano’s MacBookPro (10.211.55.2)
Starting Agent IDB 4.5.0.486...
Starting Agent Build 4.5.0.486...
Agent Build 4.5.0.486 is running
Agent IDB 4.5.0.486 is running
Connected to the Mac Stefano’s MacBookPro (10.211.55.2) with Full support.
Disconnected from the Mac Stefano’s MacBookPro (10.211.55.2)
The underlying client has been disconnected by the remote host
Starting reconnection...
Starting connection to Mac 10.211.55.2...
Disconnected from the Mac Stefano’s MacBookPro (10.211.55.2)
Starting connection to Mac 10.211.55.2...
Starting Broker 4.5.0.486 in port 52938...
Disconnected from the Mac Stefano’s MacBookPro (10.211.55.2)
Comment 1 Prashant [MSFT] 2017-07-26 11:43:58 UTC
Thanks so much for taking the time to submit this report! 
I’m unable to reproduce this issue using the latest Visual Studio 2017 Preview version 15.3. 

Could you try turn off `Set time automatically` in Windows? to see if it solves the issue

Please attach the following to help us reproduce this issue: 
-Detailed reproduction steps 
-Version information (Help → About Microsoft Visual Studio → Copy Info) 
-Logs (Help → Xamarin → Zip Logs (last 7 days)) 
-Optional: project to reproduce your issue
Comment 2 mag@xamarin.com 2017-08-24 18:09:46 UTC
We introduced improvements on the auto re connection handling when something unexpected happens. We also detected and fixed some issues that were preventing the connection to work again if the reconnection didn't work. So you shouldn't need to restart VS to get it working.

These changes and fixes are by now available on the latest Alpha channel version.

If you test with this version and still notice unexpected behavior, please let us know and also attach the Ide.log from '%LOCALAPPDATA%\Xamarin\Logs\<version>\', which will help us to see what is really happening.

By now and given that we didn't receive more details, I will mark this issue as Resolved.
Comment 3 DmytroBondarenko 2017-09-23 22:16:17 UTC
I have also similar problem. 
https://bdfss.blob.core.windows.net/shots/2017-09-24_01-01-30-d7a02569-55f9-4b23-9908-271175f3ee62.png
In general after 10-20minutes of activity or inactivity, after VS and project were opened, VS loose it's connection to the OSx. 

VS 15.3.5
Xamarin ios 11.0.0.0
xamarin 4.7.9.54

OSX 
VS 7.1.5.b2
Xamarin ios 11


zipped log - 
https://bdfss.blob.core.windows.net/shots/09.24.2017-7days-xamarin-logs-rnd123231.zip