Bug 39723 - The "MTouch" task failed unexpectedly. Xamarin.Messaging.Exceptions.ClientDisconnectedException
Summary: The "MTouch" task failed unexpectedly. Xamarin.Messaging.Exceptions.ClientDis...
Status: CLOSED NOT_REPRODUCIBLE
Alias: None
Product: Visual Studio Extensions
Classification: Xamarin
Component: iOS ()
Version: 4.3.1 (15.1)
Hardware: PC Windows
: --- normal
Target Milestone: 15.1
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-03-17 13:25 UTC by Kevin Horvatin
Modified: 2017-09-11 14:47 UTC (History)
13 users (show)

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


Attachments
Log file attached (6.89 KB, text/plain)
2017-02-28 15:24 UTC, Saurabh Paunikar
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:
CLOSED NOT_REPRODUCIBLE

Description Kevin Horvatin 2016-03-17 13:25:23 UTC
Severity	Code	Description	Project	File	Line	Source	Suppression State
Error		The "MTouch" task failed unexpectedly.
Xamarin.Messaging.Exceptions.ClientDisconnectedException: The client build30788Kevin has been disconnected while waiting a post response to topic xvs/Build/4.0.0.1717/execute-task/KiioMobileiOS/ecc1f5c/MTouch
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__2`2.MoveNext() in C:\Users\builder\data\lanes\2599\1390b70a\source\XamarinVS\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 185
--- 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__1`2.MoveNext() in C:\Users\builder\data\lanes\2599\1390b70a\source\XamarinVS\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 0
--- 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__5`2.MoveNext() in C:\Users\builder\data\lanes\2599\1390b70a\source\XamarinVS\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 0
--- End of stack trace from previous location where exception was thrown ---
   at Xamarin.Messaging.Client.IMessagingClientExtensions.Execute[T](Func`1 postFunction) in C:\Users\builder\data\lanes\2599\1390b70a\source\XamarinVS\src\Messaging\Xamarin.Messaging.Client\Extensions\IMessagingClientExtensions.cs:line 216
   at Xamarin.Messaging.Client.IMessagingClientExtensions.Post[TRequest,TResponse](IMessagingClient client, TRequest message, Boolean retain, Int32 timeoutSecs) in C:\Users\builder\data\lanes\2599\1390b70a\source\XamarinVS\src\Messaging\Xamarin.Messaging.Client\Extensions\IMessagingClientExtensions.cs:line 170
   at Xamarin.VisualStudio.Build.BuildClient.ExecuteTask(String task, String inputs) in C:\Users\builder\data\lanes\2599\1390b70a\source\XamarinVS\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 46
   at Xamarin.VisualStudio.Build.TaskRunner.Run(Task task) in C:\Users\builder\data\lanes\2599\1390b70a\source\XamarinVS\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 74
   at Xamarin.iOS.Tasks.MTouch.Execute() in C:\Users\builder\data\lanes\2599\1390b70a\source\XamarinVS\src\MSBuild\Xamarin.iOS.Tasks\Tasks\MTouch.cs:line 55
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__26.MoveNext()	Kiio.Mobile.iOS			Build
Comment 1 Kevin Horvatin 2016-03-17 13:41:48 UTC
Windows 10
VS2015 14.0.24720.00 Update 1
Xamarin 4.0.0.1717
Xamarin.iOS 9.3.99.3 (ea30b32)

MacOS 10.11.3
Xamarin Studio
Version 5.10.3 (build 26)
Installation UUID: da859469-e11d-4f3d-bb33-83f26d2994be
Runtime:
	Mono 4.2.3 (explicit/832de4b)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 402030004

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

Xamarin.Android
Version: 6.0.2.1 (Business Edition)
Android SDK: /Users/khorvati/Library/Android/sdk
	Supported Android versions:
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		5.0    (API level 21)
		5.1    (API level 22)
		6.0    (API level 23)

SDK Tools Version: 25.0.6 rc7
SDK Platform Tools Version: 23.1.0
SDK Build Tools Version: 23.0.2

Java SDK: /usr
java version "1.7.0_79"
Java(TM) SE Runtime Environment (build 1.7.0_79-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.79-b02, mixed mode)

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

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

Apple Developer Tools
Xcode 7.2.1 (9548.1)
Build 7C1002

Xamarin.Mac
Version: 2.4.1.7 (Starter Edition)

Xamarin.iOS
Version: 9.4.2.27 (Business Edition)
Hash: 58ba2bc
Branch: master
Build date: 2016-03-03 09:05:19-0500

Build Information
Release ID: 510030026
Git revision: ac9b7fcba9ee92ac30c8eb90f20c2228ce033efa
Build date: 2016-03-01 18:02:09-05
Xamarin addins: 633fde3bf405e3c402a51980976c431c204cf4f6
Build lane: monodevelop-lion-cycle6-c6sr2

Operating System
Mac OS X 10.11.3
Comment 2 Enzo Heredia 2016-04-11 14:42:37 UTC
Hi Kevin,
can you download and try latest alpha? we have some improvements on build server connection.
Comment 3 Kevin Horvatin 2016-04-21 14:41:34 UTC
Sorry I haven't been able to try the latest alpha, and probably won't for quite some time. I am in crunchtime so it might be a month or two...
Comment 4 Jose Gallardo 2016-12-23 00:22:25 UTC
Hi,
As we've added several improvements to our build system and deploying/debugging mechanism since the bug was reported, I'm resolving it tentatively as Fixed.
That said, if you're still facing this issue with current bits, please feel free to reopen the bug.
Thanks
Comment 5 Chris 2017-02-22 15:06:44 UTC
Enzo,

can you please specify in which version of Xamarin this bug is fixed? "latest alpha" is a moving target.

Thanks!

Chris
Comment 6 Saurabh Paunikar 2017-02-28 15:24:12 UTC
Created attachment 20033 [details]
Log file attached

Warning	1	The client build16204suman has been disconnected while waiting a post response to topic xvs/Build/4.3.1.1/copy-item/SingleIphone/bceca6d%2FSystem.Core.dll.mdb	SingleIphone
Warning	2	The underlying client has been disconnected by the remote host	SingleIphone
Warning	3	The client build16204suman has been disconnected while waiting a post response to topic xvs/Build/4.3.1.1/copy-item/SingleIphone/bceca6d%2FSystem.Core.dll.mdb
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__23`2.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 172	SingleIphone
Error	4	The "MTouch" task failed unexpectedly.
System.AggregateException: One or more errors occurred. ---> Xamarin.Messaging.Exceptions.ClientDisconnectedException: The client build16204suman has been disconnected while waiting a post response to topic xvs/Build/4.3.1.1/copy-item/SingleIphone/bceca6d%2FSystem.Core.dll.mdb
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__23`2.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 194
--- 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__27`2.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 0
--- 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__33`1.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 325
--- 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.VisualStudio.Build.BuildClient.<UploadItemAsync>d__22.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 128
--- 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.VisualStudio.Build.BuildClient.<UploadItemAsync>d__21.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 115
--- 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.Build.TaskRunner.<CopyRequiredInputFilesAsync>d__7.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 158
   --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at Xamarin.VisualStudio.Build.TaskRunner.Run(Task task) in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 44
   at Xamarin.iOS.Tasks.MTouch.Execute() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\MSBuild\Xamarin.iOS.Tasks\Tasks\MTouch.cs:line 45
   at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
   at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__20.MoveNext()
---> (Inner Exception #0) Xamarin.Messaging.Exceptions.ClientDisconnectedException: The client build16204suman has been disconnected while waiting a post response to topic xvs/Build/4.3.1.1/copy-item/SingleIphone/bceca6d%2FSystem.Core.dll.mdb
   at Xamarin.Messaging.Client.MessagingClient.<PostAsync>d__23`2.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 194
--- 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__27`2.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 0
--- 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__33`1.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\Messaging\Xamarin.Messaging.Client\MessagingClient.cs:line 325
--- 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.VisualStudio.Build.BuildClient.<UploadItemAsync>d__22.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 128
--- 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.VisualStudio.Build.BuildClient.<UploadItemAsync>d__21.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\BuildClient.cs:line 115
--- 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.Build.TaskRunner.<CopyRequiredInputFilesAsync>d__7.MoveNext() in C:\data\lanes\4471\3b21f70e\source\xamarinvs\src\MSBuild\Xamarin.VisualStudio.Build\TaskRunner.cs:line 158<---
	SingleIphone
Comment 7 Saurabh Paunikar 2017-02-28 15:29:04 UTC
Window 7/VS 2013 Version 12.0.40629.00 Update 5 and Xamarin 4.3.1.1(3b21f70)
Comment 8 Jose Gallardo 2017-03-10 12:13:07 UTC
Hi Saurabh,

Can you please share some more details:

1. Full environment information on Windows (in case information from Comment 7 has changed) and Mac (we do need to know what Xamarin.iOS and Xcode is installed on that machine).

2. If you create a new iPhone Single View App from scratch, does it build without issues?

3. If you're still having this issue, I would really like you to share with us the Diagnostic Build Output
Go to the menu "Tools - Options" and from the left panel: "Projects And Solutions - Build And Run" and change "MSBuild Output Verbosity" to "Diagnostic", and then build the solution. Copy the Build Output from the Output window and share it (maybe in a gist or as a zip file).

4. Xamarin Logs: As there is a known issue that might break the regular procedure, please do the following
- Ensure you're not connected to the Mac, if you are, please click on the Mac Server button and disconnect by right clicking on the Mac Server and selecting Disconnect. Then go to the menu "Help - Xamarin - Zip Logs". Please attach that zip file to the bug report.
As you're not connected to the Mac, can you please zip and attach the content of the log files from the Mac located at "~/Library/Logs/Xamarin-4.3/"?.

Thanks!
Comment 9 Saurabh Paunikar 2017-03-10 12:56:05 UTC
Hi Jose,

I tried to reproduce this issue once again but it is not getting reproduced.
(Reproducible 0 out of 5 times )

Environment I used

Windows Machine
Visual Studio Ultimate Version 12.0.40629.00 Update 5
Xamarin 4.3.1.2 (486e68a)


Mac 
Xamarin.iOS version:10.8.0.10
Xcode 8.2.1(11766.1)
Comment 10 Jose Gallardo 2017-03-10 18:48:58 UTC
Hi Saurabh,

Thanks for your confirmation.
Resolving the bug as not_reproducible.
Comment 11 Michael Warnes 2017-07-20 10:52:39 UTC
if you do a search for this, loads of people are having this problem, how can you say its not a bug?
Comment 12 Michael Warnes 2017-07-20 10:54:55 UTC
I get this all the time, but if I hold my breath and say a few hail marys, and restart my dev and build machine sevral times it sometimes works.....feels very slack to close this just because you have not made enough effort to reproduce it
Comment 13 Michael Warnes 2017-09-05 13:52:46 UTC
can you re-open this I am getting it all the time