Created attachment 24324 [details]
Image showing the connection error.
I often get the error that the connection with the Mac server is lost. It happens most of the time after a longer period of inactivity. The only way to reestablish the connection is by closing VS2017 and start it again.
Microsoft Visual Studio Professional 2017
Microsoft .NET Framework
Xamarin 126.96.36.1995 (306f76a)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.
Xamarin.Android SDK 188.8.131.52 (0cd0214)
Xamarin.Android Reference Assemblies and MSBuild support.
Xamarin.iOS and Xamarin.Mac SDK 10.12.0.14 (bf350ba)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
After this disconnection happens, please upload and attach the logs from the Help -> Xamarin -> Zip Xamarin Logs. That might contain more information about what happened.
Also, during this inactivity, is your computer locked? i.e. The same as pressing Windows Key + L.
Created attachment 24354 [details]
This is happening to me as well. Interestingly, it looks connected. This is immediately following a VS reboot. For me, to get this working I seem to need to reboot the Mac.
Also, I do see the connected target iPad in the Devices list, etc.
Output > Xamarin
Starting connection to Mac iMac...
Starting Broker 184.108.40.2069 in port 54771...
Connection successfully established with the Mac iMac:54771
Starting agents on Mac iMac (192.168.0.87)
Starting Agent IDB 220.127.116.119...
Starting Agent Build 18.104.22.1689...
Agent Build 22.214.171.1249 is running
Agent IDB 126.96.36.1999 is running
Connected to the Mac iMac (192.168.0.87) with Full support.
Severity Code Description Project File Line Suppression State
Error The Xamarin Build Agent is not running on the Mac. An active Build Agent is required to perform the build PTR-App-iOS-FilterExplorer
An update appeared on the Mac side for Android 188.8.131.52 (from .19), iOS 10.12.0.20 (from .18), and Mac 184.108.40.206 (from .17) and after a reboot of both the Mac and the Windows machine, I now get this error immediately and so can no longer build at all.
Have done a full re-install of VS on both Mac and Win machines and it's still happening
I've attached info about the environments as well as Ide logs from both machines.
From the Mac side IDE log, this appears:
ERROR [2017-08-23 21:12:22Z]: An unhandled exception has occured. Terminating Visual Studio? False
System.Net.Sockets.SocketException (0x80004005): Success
at Microsoft.ServiceHub.Utility.SocketClient+<ConnectAsync>d__0.MoveNext () [0x00231] in <77315aa4fd5d49b8add7ad003b8a13a2>:0
While on the Windows side, this appears
Xamarin.VisualStudio.Remote.State.DisconnectedState|Error|0|An unexpected error occurred while configuring SSH for the user gdignard
Xamarin.Messaging.Exceptions.MessagingException: An unexpected error occurred while configuring SSH for the user gdignard ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
With the former likely explaining the latter.
Created attachment 24388 [details]
Logs and environment descriptions
Paul & Gilles,
While I investigate this issue could you try reading through the troubleshooting docs https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/troubleshooting/
Yes; passes all these tests/recommendations. Short form: I can ssh into the mac using the same credentials and successfully "do stuff". That mac also has a drive mounted from the Windows machine with the VS running on it.
I have the same problem. Any updates?
when that happens I can disconnect from MAC Agent but when I press Connect nothing happens, I don't see in the status bar that VS is starting an agent. I need to exit VS and start it again. Then everything works again
VS for Mac logs are not required because to develop iOS apps from Windows, we don't require VS for Mac IDE at all. Just VS logs on Windows are fine.
Related to the attached logs and that particular case, I see that the SSH server couldn't be reached successfully. The error is the typical error message that applies when the SSH daemon is not active on the Mac (which means Remote Login is not enabled). It could also means a network error between Windows and the Mac. See the error:
"Xamarin.Messaging.Exceptions.MessagingException: An unexpected error occurred while configuring SSH for the user gdignard ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond
at Renci.SshNet.Abstractions.SocketAbstraction.Connect(IPEndPoint remoteEndpoint, TimeSpan connectTimeout)"
However, the comment above mentions that all the recommendations has been applied and that an SSH connection using another client than Xamarin can be established.
In general, we have been working on several fixes around unexpected disconnections and the recovery process to reconnect or fail with the correct feedback.
We also introduced important improvements around the connection process, including useful visual feedback on the Xamarin Mac Agent dialog about the current executing step, the status, the required actions if any, warning, errors, etc.
The mentioned changes will be available from the next 15.5 release.
For the mentioned reasons, I mark this bug as Resolved. If any connection issue is experienced after the 15.5 version, please feel free to re open this bug or report another one (if applies better), to analyze the particular problem.
15.5 of what? I am starting to get lost in all those versions. Is stable version out with those fixes?
Apologies, I agree the versions are super confusing! In "stable" right now for Visual Studio on Windows, we have 15.3.5. If you download the "preview" (more on this here: https://blog.xamarin.com/3-reasons-to-try-visual-studio-2017-version-15-4-previews/), we are currently on 15.4 Preview 4.
Once 15.4 is promoted to stable, then the 15.5 release mentioned here will be promoted to preview, and the fix above should be available via the Visual Studio preview builds. After this preview undergoes sufficient testing, it will be promoted to stable.
Hope this helps to clear things up. :)