Bug 43239 - Unable to debug on on real on device
Summary: Unable to debug on on real on device
Status: VERIFIED FIXED
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: PC Mac OS
: Normal major
Target Milestone: 4.2.0 (C8)
Assignee: Bugzilla
URL:
: 42842 ()
Depends on:
Blocks:
 
Reported: 2016-08-10 16:59 UTC by John Wilkins
Modified: 2017-01-10 20:03 UTC (History)
19 users (show)

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

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:
VERIFIED FIXED

Description John Wilkins 2016-08-10 16:59:10 UTC
I'm unable to debug on a real device, although I can debug in the simulator.

This looks like a duplicate of 41655 which is marked as verified fixed.

Seems there are lots of users in the forums complaining that this bug is not fixed. All of the logs in that bug apply - they match my situation exactly and I can reproduce this every time I try.
Comment 1 Alex Soto [MSFT] 2016-08-11 04:44:03 UTC
Hello John thanks for contacting us!

In order to better assist you we need you to include your full build logs, crash reports (if any), test case (to reproduce) and all version informations.

The easiest way to get exact version information is to use the 
"Xamarin Studio" menu, "About Xamarin Studio" item, "Show Details" 
button and copy/paste the version informations (you can use the 
"Copy Information" button).
Comment 2 John Wilkins 2016-08-11 07:41:27 UTC
Hi Alex,

Here’s the info from Xamarin Studio on my Windows 10 machine:

=== Xamarin Studio Community ===

Version 6.0.2 (build 73)
Installation UUID: 9b2be406-9265-47a0-aa2a-e9d8d006e774
Runtime:
	Microsoft .NET 4.0.30319.42000
	GTK+ 2.24.26 (Light theme)
	GTK# 2.12.38

=== Xamarin.Profiler ===

Not Installed

=== Xamarin.Android ===

Version: 6.1.2.21 (Xamarin Studio Community)
Android SDK: C:\Program Files (x86)\Android\android-sdk
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		5.1   (API level 22)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.0.1
SDK Build Tools Version: 23.0.1

Java SDK: C:\Program Files (x86)\Java\jdk1.7.0_55
java version "1.7.0_55"
Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
Java HotSpot(TM) Client VM (build 24.55-b03, mixed mode, sharing)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

=== Xamarin Android Player ===

Not Installed

=== Build Information ===

Release ID: 600020073
Git revision: a6f7a24a9723a2d4f5d33c176615b0d44703ab5b
Build date: 2016-07-26 13:34:40-04
Xamarin addins: f5acb37866a0141bc5ddbe95118f18dae4014568
Build lane: monodevelop-windows-cycle7-sr1

=== Operating System ===

Windows 10.0.10586.0 (64-bit)


I have a Business subscription as part of my Visual Studio 2015 Pro licence. Within VS2015 I have the following version details:

Microsoft Visual Studio Enterprise 2015
Version 14.0.25425.01 Update 3
Microsoft .NET Framework
Version 4.6.01038

Installed Version: Enterprise

Architecture and Modeling Tools   00322-90000-49595-AA776
Microsoft Architecture and Modeling Tools

UML® and Unified Modeling Language™ are trademarks or registered trademarks of the Object Management Group, Inc. in the United States and other countries.

LightSwitch for Visual Studio 2015   00322-90000-49595-AA776
Microsoft LightSwitch for Visual Studio 2015

Microsoft Visual Studio Tools for Applications 2015   00322-90000-49595-AA776
Microsoft Visual Studio Tools for Applications 2015

Visual Basic 2015   00322-90000-49595-AA776
Microsoft Visual Basic 2015

Visual C# 2015   00322-90000-49595-AA776
Microsoft Visual C# 2015

Visual C++ 2015   00322-90000-49595-AA776
Microsoft Visual C++ 2015

Visual F# 2015   00322-90000-49595-AA776
Microsoft Visual F# 2015

Windows Phone SDK 8.0 - ENU   00322-90000-49595-AA776
Windows Phone SDK 8.0 - ENU

Application Insights Tools for Visual Studio Package   7.2.00808.2
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2015.1   14.1.20624.0
ASP.NET and Web Tools 2015.1

ASP.NET Web Frameworks and Tools 2012.2   4.1.41102.0
For additional information, visit http://go.microsoft.com/fwlink/?LinkID=309563

ASP.NET Web Frameworks and Tools 2013   5.2.40314.0
For additional information, visit http://www.asp.net/

Azure App Service Tools v2.9   14.0.20316.0
Azure App Service Tools v2.9

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.0.6000.0
Microsoft Azure Data Lake Tools for Visual Studio

Bridge.NET   1.0
Bridge.NET

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

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

DataFactoryProject   1.0
Microsoft Data Factory Package

Debugging Tools for Windows   10.0.10586.0
Integrates the Windows Debugger functionality (http://go.microsoft.com/fwlink/?linkid=223405) in Visual Studio.

GitHub.VisualStudio   1.0
A Visual Studio Extension that brings the GitHub Flow into Visual Studio.

JavaScript Language Service   2.0
JavaScript Language Service

JavaScript Project System   2.0
JavaScript Project System

KofePackagePackage Extension   1.0
KofePackagePackage Visual Studio Extension Detailed Info

Microsoft .NET Core Tools (Preview 2)   14.1.20624.0
Microsoft .NET Core Tools (Preview 2)

Microsoft Azure Data Factory Node Node   1.0
Azure Data Factory extension for Visual Studio Server Explorer.

Microsoft Azure HDInsight HQL Service   2.0.6000.0
Language service for Hive query

Microsoft Azure HDInsight Tools for Visual Studio   2.0.6000.0
An integrated development environment for HDInsight application development.

Microsoft Azure Mobile Services Tools   1.4
Microsoft Azure Mobile Services Tools

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.9.40323.3

Microsoft Azure Tools   2.8
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.8.40211.2

Microsoft Azure Tools   2.7
Microsoft Azure Tools for Microsoft Visual Studio 2015 - v2.7.30818.1601

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

NuGet Package Manager   3.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

Office Developer Tools for Visual Studio 2015 ENU   14.0.23928
Microsoft Office Developer Tools for Visual Studio 2015 ENU

PreEmptive Analytics Visualizer   1.2
Microsoft Visual Studio extension to visualize aggregated summaries from the PreEmptive Analytics product.

Python Tools for Visual Studio   2.2.40623.00
Python Tools for Visual Studio provides IntelliSense, projects, templates, Interactive windows, and other support for Python developers.

Python Tools for Visual Studio - Django Integration   2.2.40623.00
Provides templates and integration for the Django web framework.

Python Tools for Visual Studio - Profiling Support   2.2.40623.00
Profiling support for Python projects.

SQL Server Analysis Services   13.0.1605.88
Microsoft SQL Server Analysis Services Designer 
Version 13.0.1605.88

SQL Server Data Tools   14.0.60629.0
Microsoft SQL Server Data Tools

SQL Server Integration Services   
Microsoft SQL Server Integration Services Designer
Version 13.0.1601.5

SQL Server Reporting Services   13.0.1605.88
Microsoft SQL Server Reporting Services Designers 
Version 13.0.1605.88

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript   1.8.36.0
TypeScript tools for Visual Studio

Visual C++ for Cross Platform Mobile Development (Android)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (Android)

Visual C++ for Cross Platform Mobile Development (iOS)   14.0.25401.00
Visual C++ for Cross Platform Mobile Development (iOS)

Visual Studio Tools for Apache Cordova   Update 10
Visual Studio Tools for Apache Cordova

Visual Studio Tools for Universal Windows Apps   14.0.25527.01
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

Web Compiler   1.11.319
Compiler for LESS, Sass and CoffeeScript files

Web Essentials 2015.3   3.0.230
Adds many useful features to Visual Studio for web developers. Requires Visual Studio 2015

Windows Driver Kit   10.0.10586.0
Headers, libraries, and tools needed to develop, debug, and test Windows drivers (msdn.microsoft.com/en-us/windows/hardware/gg487428.aspx)

Workflow Manager Tools 1.0   1.0
This package contains the necessary Visual Studio integration components for Workflow Manager.

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

Xamarin.Android   6.1.2.21 (1cf254d)
Visual Studio extension to enable development for Xamarin.Android.

Xamarin.iOS   9.8.2.22 (f37444a)
Visual Studio extension to enable development for Xamarin.iOS.


On my Mac build host I have the following from Xamarin Studio

=== Xamarin Studio Business ===

Version 6.0.2 (build 73)
Installation UUID: 8eb1c71d-374a-4b91-9266-e526147af1a2
Runtime:
	Mono 4.4.2 (mono-4.4.0-branch-c7sr1/f72fe45) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404020011

=== Xamarin.Profiler ===

Not Installed

=== Apple Developer Tools ===

Xcode 7.3.1 (10188.1)
Build 7D1014

=== Xamarin.Mac ===

Version: 2.8.2.22 (Xamarin Business)

=== Xamarin.iOS ===

Version: 9.8.2.22 (Xamarin Business)
Hash: f37444a
Branch: cycle7-sr1
Build date: 2016-07-28 12:17:02-0400

=== Xamarin.Android ===

Not Installed

=== Xamarin Android Player ===

Version: 0.6.5
Location: /Applications/Xamarin Android Player.app

=== Build Information ===

Release ID: 600020073
Git revision: a6f7a24a9723a2d4f5d33c176615b0d44703ab5b
Build date: 2016-07-26 13:36:15-04
Xamarin addins: f5acb37866a0141bc5ddbe95118f18dae4014568
Build lane: monodevelop-lion-cycle7-sr1

=== Operating System ===

Mac OS X 10.11.6
Darwin Johns-MBP.millstonehouse.homeip.net 15.6.0 Darwin Kernel Version 15.6.0
   Thu Jun 23 18:25:34 PDT 2016
   root:xnu-3248.60.10~1/RELEASE_X86_64 x86_64



I’ve checked the provisioning profiles, certificates etcs - everything is correct for the device I’m using.

To reproduce, I simply build any of my iOS projects and try to run them in debug mode on my iPhone, which fails. The build completes successfully, the IDE initially goes into runtime mode and within VS I see the usual messages about the app being successfully launched.

The app is being copied to the device but then it does not start and VS reports that the app was terminated.

Deleting the app from the phone proves that the image is being copied over. If I run the image manually everything works - I just cannot debug through VS.

Here are the logs showing the moment of failure:


System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-08-10 17:39:13.5257] Client vs3384John - No packet has been sent in 10 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-08-10 17:39:23.5098] Client vs3384John - No packet has been sent in 10 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-08-10 17:39:36.5566] Client vs3384John - No packet has been sent in 10 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-08-10 17:39:46.5718] Client vs3384John - No packet has been sent in 10 seconds. Sending Ping to Server to maintain Keep Alive
Xamarin.Messaging.Client.MessagingClient Error: 0 : [2016-08-10 17:39:51.4464] An error occured on the receiver while executing a post for topic xvs/idb/4.1.2.18/launch-app and client vs3384John
Xamarin.Messaging.Exceptions.MessagingRemoteException: An error occured on client IDB41218 while executing a reply for topic xvs/idb/4.1.2.18/launch-app ---> Xamarin.Messaging.Exceptions.MonotouchException: warning HE0041: Error while processing device notifications: NotificationCallback with unknown message: 5
warning HE0041: Error while processing device notifications: Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError)
warning HE0041: Error while processing device notifications: NotificationCallback with unknown message: 5

 at Xamarin.Messaging.IDB.MTouch+<RunAsync>d__6.MoveNext () <0x76c2988 + 0x007e3> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18ab6f0 + 0x00035> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a8f10 + 0x000b7> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a8e70 + 0x00087> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a8e20 + 0x0003f> in <filename unknown>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x1bd7530 + 0x0001f> 25562 in <filename unknown>:0 
 at Xamarin.Messaging.IDB.MTouch+<DeployAsync>d__4.MoveNext () <0x76f8f70 + 0x0032f> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18ab6f0 + 0x00035> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a8f10 + 0x000b7> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a8e70 + 0x00087> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a8e20 + 0x0003f> in <filename unknown>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x1bd7530 + 0x0001f> 25562 in <filename unknown>:0 
 at Xamarin.Messaging.IDB.Handlers.LaunchAppMessageHandler+<RunMTouchAsync>d__17.MoveNext () <0x76f87d0 + 0x0021b> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18ab6f0 + 0x00035> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a8f10 + 0x000b7> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a8e70 + 0x00087> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a8e20 + 0x0003f> in <filename unknown>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x1bd7530 + 0x0001f> 25562 in <filename unknown>:0 
 at Xamarin.Messaging.IDB.Handlers.LaunchAppMessageHandler+<ExecuteOnPhysicalDeviceWithoutAssetsAsync>d__16.MoveNext () <0x76f7238 + 0x001db> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18ab6f0 + 0x00035> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a8f10 + 0x000b7> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a8e70 + 0x00087> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a8e20 + 0x0003f> in <filename unknown>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x1bd7750 + 0x0001f> 25569 in <filename unknown>:0 
 at Xamarin.Messaging.IDB.Handlers.LaunchAppMessageHandler+<ExecuteOnPhysicalDeviceAsync>d__14.MoveNext () <0x76f6640 + 0x004b7> in <filename unknown>:0
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18ab6f0 + 0x00035> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a8f10 + 0x000b7> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a8e70 + 0x00087> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a8e20 + 0x0003f> in <filename unknown>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x1bd7750 + 0x0001f> 25569 in <filename unknown>:0 
 at Xamarin.Messaging.IDB.Handlers.LaunchAppMessageHandler+<ExecuteAsync>d__12.MoveNext () <0x76f5ea0 + 0x0039f> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18ab6f0 + 0x00035> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a8f10 + 0x000b7> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a8e70 + 0x00087> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a8e20 + 0x0003f> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () <0x18a92a0 + 0x00024> in <filename unknown>:0 
 at Xamarin.Messaging.Client.RequestHandler`2+<HandleAsync>d__5[TMessage,TResult].MoveNext () <0x76bce00 + 0x003d7> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18ab6f0 + 0x00035> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a8f10 + 0x000b7> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a8e70 + 0x00087> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a8e20 + 0x0003f> in <filename unknown>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x18a9720 + 0x00024> in <filename unknown>:0 
 at Xamarin.Messaging.Client.MessageHandlerManager+<>c__DisplayClass17_0`2+<<RegisterHandlerAsync>b__1>d[TMessage,TResult].MoveNext () <0x76bc440 + 0x002bb> in <filename unknown>:0 
--- End of stack trace from previous location where exception was thrown ---
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <0x18ab6f0 + 0x00035> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) <0x18a8f10 + 0x000b7> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) <0x18a8e70 + 0x00087> in <filename unknown>:0 
 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) <0x18a8e20 + 0x0003f> in <filename unknown>:0 
 at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () <0x18a9720 + 0x00024> in <filename unknown>:0 
 at Xamarin.Messaging.Client.MessagingClient+<ReplyAsync>d__34`2[TRequest,TResponse].MoveNext () <0x76bb378 + 0x00383> in <filename unknown>:0 
  --- End of inner exception stack trace ---
  at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__23`2.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 Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__22`2.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 Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__26`2.MoveNext()
System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-08-10 17:39:58.4463] Client vs3384John - No packet has been sent in 10 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-08-10 17:40:06.5871] Client vs3384John - No packet has been sent in 10 seconds. Sending Ping to Server to maintain Keep Alive
System.Net.Mqtt.Client.ClientPacketListener Warning: 0 : [2016-08-10 17:40:16.6024] Client vs3384John - No packet has been sent in 10 seconds. Sending Ping to Server to maintain Keep Alive
Comment 3 Alex Soto [MSFT] 2016-08-12 22:30:51 UTC
Moving to VS Team
Comment 4 Mark Erickson 2016-08-14 05:41:21 UTC
I too am having this issue after updating to latest.  I am running a Window 10 machine. I can replicate this issue every time and can provide logs and details if needed.
Comment 5 John Wilkins 2016-08-17 10:25:08 UTC
Any update on progress with this - or even a temporary workaround.

This is seriously impacting my development workflow and there are plenty of users on the Xamarin Forum reporting the same issue?
Comment 6 Joaquin Jares 2016-08-17 16:37:24 UTC
@Alex this looks like something in mlaunch:
warning HE0041: Error while processing device notifications: Failed to communicate with the device. Please ensure the cable is properly connected, and try rebooting the device (error: 0xe8000065 kAMDMuxConnectError)

Do you know of possible root causes for that warning? Per the error, the debugger server is not starting on the device.
Comment 7 Jose Gallardo 2016-08-17 20:20:14 UTC
*** Bug 42842 has been marked as a duplicate of this bug. ***
Comment 8 Fredrik Haglund 2016-08-17 21:07:58 UTC
I also got "Launch failed" with same detailed errors in the log as above after upgrading from 4.0.4/9.6.2 (PC/Xamarin.iOS on Mac) to latest stable 4.1.2/9.8.1. 

I can attach the debugger to the device if I use Xamarin on the Mac. I can attach the debugger to the simulator.

Downgrading to 4.1.1/9.8.1 and the issue is also present. (Cleaning cache in C:\Users\%username%\AppData\Local\Microsoft\VisualStudio\14.0\ComponentModelCache manually)

Downgrading to 4.1.0/9.8.0 and the issue is also present.

Restarting the device makes no difference. Neither restarting computers.

Downgrading to 4.0.4/9.6.2 where I started (manually deleting rsa files in %localappdata%/Xamarin/Monotouch) and I can attach the debugger to a device from Visual Studio again.
Comment 9 Jose Gallardo 2016-08-18 13:17:31 UTC
We're verifying a potential patch for this issue, based on the logs provided.
Thanks for reporting!
Comment 11 Fredrik Haglund 2016-08-18 13:47:53 UTC
@Jose - Can you let us impacted by the issue test and verify the patch if possible, please? Either by posting instructions here or through support.
Comment 12 John Wilkins 2016-08-18 13:49:59 UTC
I can run a test right now if you can post instructions. I'm able to repeat this on every one of my projects, so should be a fairly conclusive test.
Comment 13 Jose Gallardo 2016-08-18 17:10:19 UTC
@Fredrik, @John, I'll upload a patched build and share a link so you can check if it actually fixes the issue in your env and provide feedback about it.

It's based (and quite close) to what we currently have on Beta and Alpha channels, so you will need to switch to the Beta channel before installing the patched .msi on Windows.

As usual, you will need to update to latest Beta Xamarin builds not only Windows but the Mac server as well.

I'll add a comment with the link to download the patched build in some minutes.

Thanks!
Comment 14 Jose Gallardo 2016-08-18 17:19:40 UTC
This is the patched build:

http://xvs.xamarin.com/patcheddrops/Xamarin.VisualStudio_4.2.0.537.msi

Please keep in mind that this installer hasn't passed our regular QA process and it's shared with the sole purpose of collecting feedback about the patch.

Thanks!
Comment 15 Fredrik Haglund 2016-08-18 20:44:09 UTC
I have tested have this patch and I can confirm that it resolves the issue for me.

I had to install a matching build of Xamarin.iOS on my mac to get it to work: http://download.xamarin.com/MonoTouch/Mac/xamarin.ios-9.99.3.8.pkg

I also had to delete $HOME/Library/Caches/Xamarin/XMA folder manually because Visual Studio failed to connect to the mac.
Comment 16 John Wilkins 2016-08-18 21:02:00 UTC
Not had chance this evening to carry out a test. I will repeat the steps Fredrik took and feedback my results here tomorrow.
Comment 17 Ben Beckley 2016-08-19 18:46:28 UTC
I have verified the fix in XVS version 4.2.0.537 (cycle8/7920a7c)

Here is the stack trace from my reproduction using XVS verion 4.1.2.18 (cycle7/fcbe082)
https://gist.github.com/BenBeckley/1050ae346061a0197a14d7b405d087b5
Comment 18 John Wilkins 2016-08-20 13:01:58 UTC
Installed Xamarin 4.2.0.537 followed by a compatible Xamarin.iOS on the Mac side - I used 9.99.3.8 as suggested by Fredrik.

Clean and rebuild, and then run on device. Works fine. Verified.

Thanks guys. Now to fix some of my own bugs.
Comment 19 lnaie 2016-08-21 14:41:03 UTC
A visual studio notification for a newer version is popping up in win10 although this is the newest. Should be fixed.
Comment 20 Brendan Zagaeski (Xamarin Team, assistant) 2016-08-29 07:13:59 UTC
## Release status update

The same fix from the patched build in Comment 14 is now also included in the current Beta channel version Xamarin 4.2.0.584 (August 24).




## Side note about Comment 19

> A visual studio notification for a newer version is popping up

The notification indicates that the currently selected channel under "Tools > Options > Xamarin > Other" contains a version _other_ than the currently installed version.  This for example allows switching to Beta and then back to Stable directly via the updater feature.  If no one beats me to it, I'll aim to file a small bug to request a little wording change for accuracy in that scenario.
Comment 21 Fredrik Haglund 2016-08-29 07:58:00 UTC
There is also a hotfix upon current stable available for download (buidl 4.1.2.20). I'm not sure if I have the right to post it here myself so contact support to get it.
Comment 22 r 2016-08-31 08:50:30 UTC
The beta update doesn't work.

On VS the status says it launched successfully but on device the app doesn't launch. After around a minute the VS debug session ends itself.

Please check, thanks!

Updated both VS and Mac to latest beta on 31 Aug 2016.
Comment 23 r 2016-08-31 08:54:19 UTC
ok my bad, i haven't set trust the developer in profiles. Works afterwards. Thanks!
Comment 24 adrianknight89 2016-09-02 14:50:45 UTC
how do you set developer trust?
Comment 25 Leo 2016-09-30 14:18:15 UTC
I'm having this problem too. @r how did you solved it?
Comment 26 Leo 2016-09-30 14:40:53 UTC
I solved the problem by closing VS, deleting the contents of %AppData%\Local\Xamarin\MonoTouch\ on my windows machine
and
$HOME/Library/Caches/Xamarin/XMA on my mac machine

I do not know if both of those steps are necessary but after this, I can run and debug the app on the device.
Comment 27 Hermann Scharitzer 2016-11-30 15:02:37 UTC
I had a symptom-wise equal problem.

After some research and looking at XCode, it turns out that XCode needed an update.

After updating XCode, the error went away for me.
Comment 28 James 2017-01-10 19:57:46 UTC
I have this issue, I'm using visual studio 2015 and xamarin mac agent (a remote mac computer). 

Error is

Launching 'App.iOS' on 'iPhone 6 iOS 10.2'...
Launch failed. The app 'App.iOS' could not be launched on 'iPhone 6 iOS 10.2'. Error: The post for client vs4064jwier on topic xvs/idb/4.2.1.64/launch-app has been cancelled. Please check the logs for more details.
The app has been terminated.

It worked for me once, then I terminated it. Each subsequent attempt fails with that error.
Comment 29 Brendan Zagaeski (Xamarin Team, assistant) 2017-01-10 20:03:23 UTC
This exact bug report can be considered closed at this time based on the user verifications from Comment 15 and Comment 18.  For any appearances of similar issues in versions higher than 4.2.0.584, please file new bug reports and be sure to include as many details [1] as possible.  Thanks in advance!

[1] https://developer.xamarin.com/guides/cross-platform/troubleshooting/questions/howto-file-bug/