Bug 60024 - No operation can be performed on client because the underlying MQTT client was disconnected
Summary: No operation can be performed on client because the underlying MQTT client wa...
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: XMA ()
Version: unspecified
Hardware: Macintosh Windows
: --- normal
Target Milestone: ---
Assignee: mag@xamarin.com
Depends on:
Reported: 2017-10-06 14:34 UTC by PM Lemay
Modified: 2017-10-10 20:02 UTC (History)
3 users (show)

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

Stack trace (20.23 KB, application/octet-stream)
2017-10-06 14:34 UTC, PM Lemay
5404.IDB.log (16.44 KB, application/octet-stream)
2017-10-06 20:20 UTC, PM Lemay

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 for Bug 60024 on Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.
Related Links:

Description PM Lemay 2017-10-06 14:34:20 UTC
Created attachment 25172 [details]
Stack trace

After a random amount of time that my iOS simulator on MAC is debugging on VS2017 from my windows VM, the iPad crashes. (neither OS went in sleep mode as I was actively testing the app)

Here is the error in VS2017 console after the iPad simulator has crashed:
Launch failed. The app 'test' could not be launched on 'iPad Air 2 iOS 11.0'. Error: The client vs5404[user] has been disconnected while waiting a post response to topic xvs/idb/ Please check the logs for more details.
Failed to Stop app:  No operation can be performed on client  because the underlying MQTT client was disconnected

See the attachement for VS logs with the stacktrace.

VM windows:

Microsoft Visual Studio Professional 2017 
Version 15.3.5
Microsoft .NET Framework
Version 4.7.02053

Installed Version: Professional

Visual Basic 2017   00369-60000-00001-AA202
Microsoft Visual Basic 2017

Visual C# 2017   00369-60000-00001-AA202
Microsoft Visual C# 2017

ASP.NET and Web Tools 2017   15.0.30726.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services   1.0
Provides languages services for ASP.NET Core Razor.

ASP.NET Template Engine 2017   15.0.30726.0
ASP.NET Template Engine 2017

ASP.NET Web Frameworks and Tools 2017   5.2.50601.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   15.0.30728.0
Azure App Service Tools v3.0.0

Bundler & Minifier   2.5.359
Adds support for bundling and minifying JavaScript, CSS and HTML files in any project.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

JetBrains ReSharper Ultimate 2017.2.1    Build 109.0.20170920.170950
JetBrains ReSharper Ultimate package for Microsoft Visual Studio. For more information about ReSharper Ultimate, visit http://www.jetbrains.com/resharper. Copyright © 2017 JetBrains, Inc.

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.50719.1

Microsoft Continuous Delivery Tools for Visual Studio   0.3
Simplifying the configuration of continuous build integration and continuous build delivery from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Mono Debugging for Visual Studio   4.6.8-pre (ec7034f)
Support for debugging Mono processes with Visual Studio.

SQL Server Data Tools   15.1.61707.200
Microsoft SQL Server Data Tools

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Xamarin (bd7e3753c)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin.Android SDK (fb018c5)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK (152b654)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.


=== Visual Studio Community 2017 for Mac ===

Version 7.1.5 (build 2)
Installation UUID: ba7b910b-556d-4430-85ad-7dbcebd9100a
	Mono (d15-3/14f2c81) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000224

=== NuGet ===


=== .NET Core ===

Runtime: Not installed
SDK: Not installed
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.2.0/lib/mono/msbuild/15.0/bin/Sdks

=== Xamarin.Profiler ===

Version: 1.5.5
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

=== Xamarin.Android ===

Version: (Visual Studio Community)
Android SDK: /Users/pier-michael/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		6.0 (API level 23)

SDK Tools Version: 25.2.5
SDK Platform Tools Version: 25.0.5
SDK Build Tools Version: 25.0.3

Java SDK: /usr
java version "1.8.0_101"
Java(TM) SE Runtime Environment (build 1.8.0_101-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)

Android Designer EPL code available here:

=== Apple Developer Tools ===

Xcode 9.0 (13247)
Build 9A235

=== Xamarin.iOS ===

Version: (Visual Studio Community)
Hash: 152b654a
Branch: xcode9
Build date: 2017-09-15 02:25:56-0400

=== Xamarin Inspector ===

Version: 1.3.2
Hash: 461f09a
Branch: 1.3-release
Build date: Tue, 03 Oct 2017 18:26:57 GMT
Client compatibility: 1

=== Xamarin.Mac ===

Version: (Visual Studio Community)

=== Build Information ===

Release ID: 701050002
Git revision: 7afedcaef8e7542e70e3cf8f9bdb26938b8c0876
Build date: 2017-09-15 08:39:58-04
Xamarin addins: 3262aadf811a18c12eac6742532d052b0139a808
Build lane: monodevelop-lion-d15-3-xcode9

=== Operating System ===

Mac OS X 10.12.6
Darwin 16.7.0 Darwin Kernel Version 16.7.0
    Thu Jun 15 17:36:27 PDT 2017
    root:xnu-3789.70.16~2/RELEASE_X86_64 x86_64
Comment 1 mag@xamarin.com 2017-10-06 20:03:31 UTC

It would be useful if you can attach de log of the IDB Agent, which is in charge of handling messages related to app launching, simulators, etc. (as you can see in the message topic uri in the logs: xvs/idb/

The IDB.log can be retrieved directly from the Mac, under: ~/Library/Logs/Xamarin-xx/IDB.log.

Please be sure that the attached file corresponds to the session that had the error. In case of doubts, you can attach all the IDB.log files.

By having this log we can analyze if something particular happened during the handling of the "LaunchApp" message sent from Windows. What I can see based on the attached stack trace is that our TCP connection between Windows and Mac is going down, causing the protocol messages and information to not be sent anymore, aborting the launch action.

The TCP connection can go down for many reasons related to the network, but if your network is stable and the problem is consistent, it could mean something else related to the debug session itself, like a protocol timeout (MQTT under TCP) because of some thread freeze caused by the debugging session being paused, for example.

To investigate further, please provide the logs.

Comment 2 PM Lemay 2017-10-06 20:20:32 UTC
Created attachment 25180 [details]

I have attached the IDE.log
Comment 3 mag@xamarin.com 2017-10-10 20:02:37 UTC
Thanks. I can see an MQTT protocol timeout on the IDB Agent, which causes the connection to be aborted.

As I mentioned, I suspect of a timing issue caused by some thread being paused by the debugging session. I will investigate further trying to get a repro.