Xamarin-macios: Broker error - Can't connect from VS 2019

Created on 25 Feb 2020  ·  6Comments  ·  Source: xamarin/xamarin-macios

Steps to Reproduce

  1. Connect to MAC from VS 2019

Expected Behavior

Valid connection

Actual Behavior

Can't connect to MAC

I think, the problem starts here:
Xamarin.Messaging.Ssh.MessagingScpClient|Warning|0|An error occurred while using SCP Client. Trying again with a new SCP connection... Renci.SshNet.Common.ScpException: scp: error: unexpected filename:

Environment

MacOS: Catalina 10.15.4
Xamarin.iOS: 13.10.0.17
VS For Mac: 8.4.6 (build 36)
VS (Windows): 2019 16.4.5

Logs

Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking Mono installation... Xamarin.Messaging.Ssh.SshCommandRunner|Warning|0|Failed to execute 'which mono64': ExitStatus = 1 Xamarin.Messaging.Ssh.SshCommands|Information|0|A valid Mono installation has been found at '/Library/Frameworks/Mono.framework/Versions/Current/bin/mono64' Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking Xamarin iOS installation... Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Checking host configuration for connecting to '{{MY_MAC_IP_ADDRESS}}'... Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from ConfiguringState to ConfiguredState on {{MY_MAC_IP_ADDRESS}} ({{MY_MAC_IP_ADDRESS}}) Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Host '{{MY_MAC_IP_ADDRESS}}' is configured correctly Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from ConfiguredState to ConnectingState on {{MY_MAC_IP_ADDRESS}} ({{MY_MAC_IP_ADDRESS}}) Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Starting connection to '{{MY_MAC_IP_ADDRESS}}'... System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory|Error|0|An error occurred while connecting via TCP to the endpoint address {{MY_MAC_IP_ADDRESS}} and port 53419, to establish an MQTT connection System.Net.Sockets.SocketException (0x80004005): Nemohlo být vytvořeno žádné připojení, protože cílový počítač je aktivně odmítl {{MY_MAC_IP_ADDRESS}}:53419 at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.<CreateAsync>d__4.MoveNext() System.Net.Mqtt.Sdk.MqttClientImpl|Error|0|System.Net.Mqtt.MqttException: An error occurred while connecting via TCP to the endpoint address {{MY_MAC_IP_ADDRESS}} and port 53419, to establish an MQTT connection ---> System.Net.Sockets.SocketException: Nemohlo být vytvořeno žádné připojení, protože cílový počítač je aktivně odmítl {{MY_MAC_IP_ADDRESS}}:53419 at System.Net.Sockets.Socket.InternalEndConnect(IAsyncResult asyncResult) at System.Net.Sockets.Socket.EndConnect(IAsyncResult asyncResult) at System.Net.Sockets.TcpClient.EndConnect(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.<CreateAsync>d__4.MoveNext() --- End of inner exception stack trace --- at System.Net.Mqtt.Sdk.Bindings.TcpChannelFactory.<CreateAsync>d__4.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.Net.Mqtt.Sdk.PacketChannelFactory.<CreateAsync>d__5.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.Net.Mqtt.Sdk.MqttClientImpl.<InitializeChannelAsync>d__39.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.Net.Mqtt.Sdk.MqttClientImpl.<ConnectAsync>d__29.MoveNext() Xamarin.Messaging.Ssh.MessagingService|Information|0|Starting Broker 16.4.000.311 in port 53419... Xamarin.Messaging.Ssh.SshCommandRunner|Warning|0|Failed to execute 'which mono64': ExitStatus = 1 Xamarin.Messaging.Ssh.SshCommands|Information|0|A valid Mono installation has been found at '/Library/Frameworks/Mono.framework/Versions/Current/bin/mono64' Xamarin.Messaging.Ssh.MessagingScpClient|Warning|0|An error occurred while using SCP Client. Trying again with a new SCP connection... Renci.SshNet.Common.ScpException: scp: error: unexpected filename: at Renci.SshNet.ScpClient.CheckReturnCode(Stream input) at Renci.SshNet.ScpClient.UploadFileModeAndName(IChannelSession channel, Stream input, Int64 fileSize, String serverFileName) at Renci.SshNet.ScpClient.Upload(Stream source, String path) at Xamarin.Messaging.Ssh.MessagingScpClient.<>c__DisplayClass16_0.<Upload>b__0() in E:\A\_work\471\s\External\messaging\src\Xamarin.Messaging.Ssh\MessagingScpClient.cs:line 73 at Xamarin.Messaging.Ssh.MessagingScpClient.Execute(Action action, Boolean retry) in E:\A\_work\471\s\External\messaging\src\Xamarin.Messaging.Ssh\MessagingScpClient.cs:line 166 Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Starting connection to '{{MY_MAC_IP_ADDRESS}}'... Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from ConnectingState to DisconnectingState on {{MY_MAC_IP_ADDRESS}} ({{MY_MAC_IP_ADDRESS}}) Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Starting disconnection from {{MY_MAC_IP_ADDRESS}}... Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Starting disconnection from {{MY_MAC_IP_ADDRESS}}... Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|Server State transition from DisconnectingState to DisconnectedState on {{MY_MAC_IP_ADDRESS}} ({{MY_MAC_IP_ADDRESS}}) Xamarin.Messaging.Integration.State.ServerStateContext|Information|0|The connection to '{{MY_MAC_IP_ADDRESS}}' has been finished Xamarin.Messaging.Integration.State.ServerStateContext|Error|0|Couldn't connect to {{MY_MAC_IP_ADDRESS}}. Please try again. System.TimeoutException: The Broker initialization exceeded the timeout of 60000 millisecs without receiving confirmation from the Broker. at Xamarin.Messaging.Ssh.BrokerCommands.<StartProcessAsync>d__8.MoveNext() in E:\A\_work\471\s\External\messaging\src\Xamarin.Messaging.Ssh\BrokerCommands.cs:line 80 --- 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 Xamarin.Messaging.Ssh.MessagingService.<StartBrokerAsync>d__85.MoveNext() in E:\A\_work\471\s\External\messaging\src\Xamarin.Messaging.Ssh\MessagingService.cs:line 635 --- 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 Xamarin.Messaging.Ssh.MessagingService.<ConnectMqttAsync>d__79.MoveNext() in E:\A\_work\471\s\External\messaging\src\Xamarin.Messaging.Ssh\MessagingService.cs:line 499 --- 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.Messaging.Ssh.MessagingService.<ConnectAsync>d__64.MoveNext() in E:\A\_work\471\s\External\messaging\src\Xamarin.Messaging.Ssh\MessagingService.cs:line 200

VS bug #1073554

external-xamarin-vs

Most helpful comment

Hi,
This is a known issue that we are having with newer versions of OpenSSH on the Mac, caused by macOS updates. We are currently working on getting a fix as soon as possible.
We will keep you updated and let you know when it's ready.
Thanks.

All 6 comments

Any progress on this? I cannot build iOS apps

I have the same issue, and reported on https://github.com/xamarin/xamarin-macios/issues/7882.
Any news?

Hi,
This is a known issue that we are having with newer versions of OpenSSH on the Mac, caused by macOS updates. We are currently working on getting a fix as soon as possible.
We will keep you updated and let you know when it's ready.
Thanks.

Hi,
This issue has been identified as a duplicate of an earlier reported feedback in the VS Feedback Community, linked here: https://developercommunity.visualstudio.com/content/problem/928605/an-error-occurred-while-generating-the-ssh-keys-pl.html.
Everyone can add their vote directly at the above linked feedback. Voting helps increase the priority of the issue by consolidating customer impact under one feedback.
We are currently working on a solution for this bug and will keep you posted about the status.
Thank you!

Even if this is closed, it seems that more and more users (including me) have this problem. Everyone coming here should upvote the VS Feedback post to speed things up.

For Microsofties: Please share at least a workaround (if there is one).

Hi everybody,
I've had the same issue. Installing the latest version of VST 2019 (version 16.5.3) has fixed the issue.
Hope this wil help.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

nickplee picture nickplee  ·  3Comments

jzeferino picture jzeferino  ·  3Comments

wcoder picture wcoder  ·  3Comments

sharmashiv picture sharmashiv  ·  4Comments

rolfbjarne picture rolfbjarne  ·  4Comments