Bug 58686 - Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Unable to contact DeviceAgent
Summary: Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Unable to contact Device...
Status: RESOLVED DOWNSTREAM
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: unspecified
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2017-08-10 06:36 UTC by Dávid Kaya
Modified: 2017-08-10 16:39 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
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 or GitHub 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:
RESOLVED DOWNSTREAM

Description Dávid Kaya 2017-08-10 06:36:04 UTC
Hello,

I get following error in some test scenarios. However it is not always the same test scenario, it is really non-deterministic.

iOS Simulator 10.3.1
macOS 10.12
Xamarin SDKs all updated to last version

10-Aug-2017 01:41:38	1) Error : RegressionTests.Features.SettingsFeature(iOS).UserTriesToSignOut
10-Aug-2017 01:41:38	Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Unable to contact DeviceAgent
10-Aug-2017 01:41:38	  ----> System.AggregateException : One or more errors occurred.
10-Aug-2017 01:41:38	  ----> Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Unable to contact DeviceAgent on 127.0.0.1
10-Aug-2017 01:41:38	  ----> System.Threading.Tasks.TaskCanceledException : A task was canceled.
10-Aug-2017 01:41:38	TearDown : System.NullReferenceException : Object reference not set to an instance of an object
10-Aug-2017 01:41:38	  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<LaunchTestAsync>c__async6.MoveNext () [0x003d9] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	--- End of stack trace from previous location where exception was thrown ---
10-Aug-2017 01:41:38	  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x0020a] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchApp (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, Xamarin.UITest.TestCloud.TestCloudiOSAppConfiguration testCloudAppConfiguration, Xamarin.UITest.Shared.Http.HttpClient testCloudWsClient, Xamarin.UITest.Shared.Http.HttpClient xtcServicesClient, System.Boolean testCloudUseDeviceAgent) [0x0007a] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x002de] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	  at RegressionTests.AppInitializer.ConfigureiOSApp () [0x00036] in <d952867980084d27a2e474e793efcf15>:0 
10-Aug-2017 01:41:38	  at RegressionTests.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x00009] in <d952867980084d27a2e474e793efcf15>:0 
10-Aug-2017 01:41:38	  at RegressionTests.Features.FeatureBase.BeforeEachTest () [0x00000] in <d952867980084d27a2e474e793efcf15>:0 
10-Aug-2017 01:41:38	  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
10-Aug-2017 01:41:38	  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	--AggregateException
10-Aug-2017 01:41:38	
10-Aug-2017 01:41:38	--DeviceAgentException
10-Aug-2017 01:41:38	  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<PingAsync>c__async8.MoveNext () [0x000fe] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	--TaskCanceledException
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x00026] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Net.Http.HttpClientHandler+<SendAsync>d__63.MoveNext () [0x004c6] in <68ba4a0a54764b819b8b058de1b791f4>:0 
10-Aug-2017 01:41:38	--- End of stack trace from previous location where exception was thrown ---
10-Aug-2017 01:41:38	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Net.Http.HttpClient+<SendAsyncWorker>d__47.MoveNext () [0x000ca] in <68ba4a0a54764b819b8b058de1b791f4>:0 
10-Aug-2017 01:41:38	--- End of stack trace from previous location where exception was thrown ---
10-Aug-2017 01:41:38	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.XDB.Services.HttpService+<GetAsync>c__async1`1+<GetAsync>c__AnonStoreyB+<GetAsync>c__asyncA[T].MoveNext () [0x00089] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	--- End of stack trace from previous location where exception was thrown ---
10-Aug-2017 01:41:38	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.XDB.Services.HttpService+<ExecuteRequestAsync>c__async5.MoveNext () [0x0008b] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	--- End of stack trace from previous location where exception was thrown ---
10-Aug-2017 01:41:38	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.XDB.Services.HttpService+<RequestAsync>c__async4`1[T].MoveNext () [0x0031b] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	--- End of stack trace from previous location where exception was thrown ---
10-Aug-2017 01:41:38	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.XDB.Services.HttpService+<GetAsync>c__async1`1[T].MoveNext () [0x00117] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	--- End of stack trace from previous location where exception was thrown ---
10-Aug-2017 01:41:38	  at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0001a] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <ffb99659fc1c47faa4d5f883014d08aa>:0 
10-Aug-2017 01:41:38	  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService+<PingAsync>c__async8.MoveNext () [0x000cf] in <fa598dbf7e4f4135a0540da575019504>:0 
10-Aug-2017 01:41:38	--TearDown
10-Aug-2017 01:41:38	  at RegressionTests.Features.FeatureBase.TestFixtureTearDown () [0x0000a] in <d952867980084d27a2e474e793efcf15>:0 
10-Aug-2017 01:41:38	  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
10-Aug-2017 01:41:38	  at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <ffb99659fc1c47faa4d5f883014d08aa>:0 

Any idea where is the problem?

Thanks,

David
Comment 1 Dávid Kaya 2017-08-10 06:49:52 UTC
Xamarin.TestCloud.Agent version 0.20.6
Xamarin.UITest version 2.0.9.1637
Comment 2 John Miller [MSFT] 2017-08-10 16:39:21 UTC
Hi David,

Thanks for reporting this issue. It looks like this could be related to UITest instead of Xamarin.iOS. I would suggest using the Support link at the top of https://testcloud.xamarin.com/login to report this issue and work with the team there to get them the information they need to file an issue. There also was a new version of UITest released today that would be good to confirm with: 2.0.10. I'll resolve this issue as downstream as it's not identifiable as an issue in Xamarin.iOS but instead UITest. 

Thank you!