Bug 45248 - "Couldn't connect to {build hostname}. Please try again." after downgrading Xamarin
Summary: "Couldn't connect to {build hostname}. Please try again." after downgrading X...
Status: RESOLVED ANSWERED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA ()
Version: 4.2.0 (C8)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-10 19:58 UTC by Kyle White
Modified: 2016-12-27 21:45 UTC (History)
3 users (show)

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


Attachments
verbose logs (10.61 KB, application/x-zip-compressed)
2016-10-10 19:58 UTC, Kyle White
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:
RESOLVED ANSWERED

Description Kyle White 2016-10-10 19:58:59 UTC
Created attachment 17960 [details]
verbose logs

I was running master/C9 builds on both my mac and pc and everything was working fine (XMA connected with full support). I downgraded both the mac and the pc to Cycle8 builds and suddenly the pc was unable to connect to the mac. 

The Xamarin Output window only says these three lines:

Starting connection to Mac kyles-mbp...
Couldn't connect to kyles-mbp. Please try again.
Disconnected from Mac kyles-mbp (10.1.16.22)

When it happened, I was running devenv via "devenv /log" so verbose logs should be attached. There was _no_ new logs on the mac host in ~/Library/Logs/Xamarin-4.2/..

Next, I went to the XMA dialog in VS and chose "Forget this Mac" for 'kyles-mbp' and then tried connecting again, and it magically worked.




Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-10-10 15:38:49.5785] MacServer State transition from DisconnectedState to SshConnectingState on kyles-mbp (10.1.16.22)
Xamarin.Messaging.VisualStudio.MessagingService Information: 0 : [2016-10-10 15:38:50.5883] Starting connection to Mac kyles-mbp...
Xamarin.VisualStudio.IOS.Messaging.State.DisconnectedState Error: 0 : [2016-10-10 15:38:52.4246] username
System.ArgumentException: username
   at Renci.SshNet.AuthenticationMethod..ctor(String username)
   at Xamarin.Messaging.Client.Ssh.MessagingAuthenticationMethod..ctor(String username, Func`1 passwordProvider, ISshInformationProvider sshInformationProvider)
   at Xamarin.Messaging.VisualStudio.MessagingService.GetMessagingConnection(Int32 boundPort, Func`1 passwordProvider, ISshInformationProvider sshInformationProvider)
   at Xamarin.Messaging.VisualStudio.MessagingService.<ConnectAsync>d__71.MoveNext()
Xamarin.VisualStudio.IOS.Messaging.State.DisconnectedState Error: 0 : [2016-10-10 15:38:52.7156] Couldn't connect to kyles-mbp. Please try again.
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-10-10 15:38:52.9066] MacServer State transition from SshConnectingState to DisconnectedState on kyles-mbp (10.1.16.22)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-10-10 15:38:53.0896] Disconnected from Mac kyles-mbp (10.1.16.22)
Comment 1 Ben Beckley 2016-10-10 21:13:33 UTC
I was able to reproduce this when downgrading from 4.3.0.13 (master) to 4.2.0.703 (xvs-win-cycle8-sr0)

IDE Log: https://gist.github.com/BenBeckley/d6aa1ff4a4e7261f3782f50f3ecb5df6
Comment 2 Jose Gallardo 2016-12-27 21:45:08 UTC
This is a known issue, and the way to avoid it is to forget the mac and add it again.
Unfortunately, it cannot be avoided and is listed already as part of the release notes.
https://developer.xamarin.com/releases/vs/xamarin.vs_4/xamarin.vs_4.3/