Bug 60037 - Mac Agent Not Working - Connects briefly then disconnects
Summary: Mac Agent Not Working - Connects briefly then disconnects
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA (show other bugs)
Version: unspecified
Hardware: PC Windows
: --- normal
Target Milestone: 15.5
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-10-07 15:17 UTC by alex2_wernick
Modified: 2017-10-27 11:37 UTC (History)
3 users (show)

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


Attachments
Logs (22.32 KB, application/x-zip-compressed)
2017-10-07 15:17 UTC, alex2_wernick
Details

Description alex2_wernick 2017-10-07 15:17:20 UTC
Created attachment 25206 [details]
Logs

Using Visual Studio Community 2017 with Windows 7
Mac is running IOS 10.13

When connecting to the MAC using the XMA the connection briefly connects then disconnects. The time the connection lasts for can vary but is generally around 15mins. Once the connection is lost reconnecting often does not work.

The relevant logs on the Windows and Mac side are attached.

I have tried the solutions found https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/troubleshooting/#knownissues with no success.
Comment 1 mag@xamarin.com 2017-10-18 15:35:17 UTC
Hi,
From what I can see in the logs, the disconnections are caused by the SSH session being aborted because of a socket disconnection. We can see that in both SSH log on the Mac and also on the VS log in Windows:

- Mac:

Oct  7 15:51:28 RebeccasMacBook com.apple.xpc.launchd[1] (com.openssh.sshd.F8DD9ED7-216C-425D-BE4F-350CC3D69138[6777]): 
Service exited with abnormal code: 255

Oct  7 15:55:01 RebeccasMacBook sshd: rebeccagrant [priv][4231]: DEAD_PROCESS: 4325 ttys002

Oct  7 15:55:01 RebeccasMacBook com.apple.xpc.launchd[1] (com.openssh.sshd.11598EAE-4A78-4DDE-99F7-ACB72B7CFA0E[4231]): 
Service exited with abnormal code: 255

- Windows:

Xamarin.Messaging.Ssh.SshMessagingConnection|Error|0|An unexpected error occurred with the current SSH Session
Renci.SshNet.Common.SshOperationTimeoutException: Socket read operation has timed out after -1 milliseconds.
   at Renci.SshNet.Abstractions.SocketAbstraction.Read(Socket socket, Byte[] buffer, Int32 offset, Int32 size, TimeSpan timeout)
   at Renci.SshNet.Session.SocketRead(Int32 length, Byte[] buffer)
   at Renci.SshNet.Session.ReceiveMessage()
   at Renci.SshNet.Session.MessageListener()

There is no single cause or solution for unexpected SSH disconnections, but they are mostly related to network glitches; which can happen in a network based or distributed application. 
What I see in this particular issue is that what affects the experience is not the unexpected disconnection itself but how we react against it. As you mentioned, the reconnection often doesn't work.

That is a problem that we identified some time ago and that we have been working on to fix and improve, together with the hole connection process itself.
That said, from the next 15.5 release we will introduce many improvements and fixes around these topics: XMA connection workflow, better user experience and UI feedback, build timeouts, reconnections experience after unexpected disconnections, etc.

With a correct reconnection mechanism, for the most of the cases you shouldn't even notice that there was a disconnection because XMA will reconnect silently and you should keep working as if nothing happens.

I'm confident that all those changes (specially the reconnection and build ones) will help in this case to "at least" reconnect fine and let you continue working without problems.

For this reason I mark this issue as Resolved and ask you to please give it a try and compare the experience from the upcoming 15.5 release.

If you still see problems or have feedback about the mentioned things, please feel free to re open this issue or open another one.

Thanks,

Note You need to log in before you can comment on or make changes to this bug.