When I try to connect to the Mac Agent I get the following error: An unexpected error occurred while configuring SSH for the user [MY_USER] (full log below)
I've tried everything on the Troubleshooting page: https://developer.xamarin.com/guides/ios/getting_started/installation/windows/connecting-to-mac/troubleshooting/
Including "UseDNS no".
There are 3 Mac Minis on the network running Xamarin. We have another development machine that can connect to all 3 using the same credentials. From the Windows machine in question, I can ping the mac, I can SSH to it successfully using Putty and Git Bash. SSH seems to work fine. I've tried a different user account on the Windows machine (nothing) I've tried using the Mac from the list, entering the machine name manually, using the IP address. (nothing) The Mac has no firewall setup. I've tried disabling the firewall on the Windows machine. I can confirm, when I try to use bad credentials, Visual Studio will correctly alert me of that, but using the correct credentials gives me the "unexpected error". I am not sure what is different between the two machines.
I've restarted all machines involved multiple times. I've tried reinstalling Visual Studio on the Dev machine.
I am out of ideas.
Any help would be appreciated.
Full Log from Visual Studio:
Xamarin Information: 0 : [2016-06-13 18:19:35.0373] Xamarin - 4.1.0.530-cycle7-baseline+2e39740
Xamarin.VisualStudio.Activation.AccountManager Information: 0 : [2016-06-13 18:19:35.1813] VS2015 Professional
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-13 18:19:35.2483] No license found for iOS
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-13 18:19:35.3113] Running license sync for iOS
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-13 18:19:35.3783] Not logged in, using iOS VSProfessional
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-13 18:19:35.4803] No license found for Android
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-13 18:19:35.6165] Running license sync for Android
Xamarin.VisualStudio.ActivationManager Information: 0 : [2016-06-13 18:19:35.7116] Not logged in, using Android VSProfessional
Xamarin.VisualStudio.IOS.MonoTouchDeviceSettings Verbose: 0 : [2016-06-13 18:21:35.3445] BeginEdit
Xamarin.VisualStudio.IOS.MonoTouchDeviceSettings Verbose: 0 : [2016-06-13 18:21:35.4495] EndEdit
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-06-13 18:21:35.5355] Hooked up SDB tracing adapter
Xamarin.VisualStudio.TastyPackage Information: 0 : [2016-06-13 18:21:35.6155] Initialization finished
Xamarin.VisualStudio.IOS.XamarinIOSPackage Warning: 0 : [2016-06-13 18:21:35.6975] Initializing Xamarin.VisualStudio.IOS.XamarinIOSPackage.
Xamarin.VisualStudio.IOS.XamarinIOSPackage Information: 0 : [2016-06-13 18:21:35.7815] MDAddinsHash: 33f406fa2dcf214012c78cb846585f062b2e1d24
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-13 18:21:56.2158] MacServer State transition from DisconnectedState to SshConnectingState on PLA-DEV-MAC03.local (MY.IP.ADDRESSS)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-13 18:22:12.7090] MacServer State transition from SshConnectingState to DisconnectedState on PLA-DEV-MAC03.local (MY.IP.ADDRESSS)
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Error: 0 : [2016-06-13 18:22:12.8170] An unexpected error occurred while trying to log in. Please try again.
Xamarin.VisualStudio.IOS.Messaging.State.ServerStateContext Information: 0 : [2016-06-13 18:22:12.9140] Disconnected from Mac PLA-DEV-MAC03.local (MY.IP.ADDRESSS)
Xamarin.VisualStudio.IOS.Messaging.State.DisconnectedState Error: 0 : [2016-06-13 18:22:13.0160] An unexpected error occurred while configuring SSH for the user [MY_USER]
Xamarin.Messaging.Exceptions.MessagingException: An unexpected error occurred while configuring SSH for the user [MY_USER] ---> Renci.SshNet.Common.SshOperationTimeoutException: Session operation has timed out
at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle, TimeSpan timeout)
at Renci.SshNet.Session.WaitOnHandle(WaitHandle waitHandle)
at Renci.SshNet.KeyboardInteractiveAuthenticationMethod.Authenticate(Session session)
at Xamarin.Messaging.Client.Ssh.MessagingAuthenticationMethod.Authenticate(Session session)
at Renci.SshNet.AuthenticationMethod.Renci.SshNet.IAuthenticationMethod.Authenticate(ISession session)
at Renci.SshNet.ClientAuthentication.TryAuthenticate(ISession session, AuthenticationState authenticationState, ICollection`1 allowedAuthenticationMethods, SshAuthenticationException& authenticationException)
at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
at Renci.SshNet.ConnectionInfo.Authenticate(ISession session)
at Renci.SshNet.Session.Connect()
at Renci.SshNet.BaseClient.Connect()
at Xamarin.Messaging.Client.Ssh.SshMessagingConnection.ConnectSsh()
at Xamarin.Messaging.VisualStudio.MessagingService.<ConfigureHostAsync>d__70.MoveNext()
--- End of inner exception stack trace ---
at Xamarin.Messaging.VisualStudio.MessagingService.<ConfigureHostAsync>d__70.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
at Xamarin.VisualStudio.IOS.Messaging.State.DisconnectedState.<ConnectAsync>d__8.MoveNext() in C:\Users\builder\data\lanes\3345\2e397405\source\XamarinVS\src\Core\VisualStudio.IOS\Messaging\State\DisconnectedState.cs:line 64
It worked for me after I entered IP Address manually in Add Mac in Xamarin Mac Agent Window (instead of using the default one with machine name).
Make sure you are not connected to a VPN, if so, it will not be connected. I had similar issue.
The fix for me was to back-up and then delete the following files from %LOCALAPPDATA%\Xamarin\MonoTouch
.
After that, when I paired to my mac it asked me to reauthenticate and I no longer got the error.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With