Bug 58957 - SetUp : Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to launch DeviceAgent ExitCode: 65
Summary: SetUp : Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to launch...
Alias: None
Product: iOS
Classification: Xamarin
Component: General ()
Version: XI 10.12 (d15-3)
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2017-08-22 17:57 UTC by Robert Vaselaar
Modified: 2017-08-23 22:30 UTC (History)
2 users (show)

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

ios packages.config (6.68 KB, application/octet-stream)
2017-08-22 17:57 UTC, Robert Vaselaar

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:

Description Robert Vaselaar 2017-08-22 17:57:36 UTC
Created attachment 24353 [details]
ios packages.config

This happened while running the latest version of Xamarin.UITest and trying to test on iPhone 6 using iOS 10.3.2

Visual Studio for Mac Enterprise is fully updated.
Xamarin.TestCloud.Agent version 0.20.7
Xamarin.UITest version 2.0.10

UI tests start successfully on iPhone simulator, Android simulator, and Android physical device

The full exception text follows:

SetUp : Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to launch DeviceAgent

ExitCode: 65

    IDEDerivedDataPathOverride = /var/folders/0n/ndx6z4qx4b99kwtlpbp8r2hh0000gp/T/xdb/logs/2017.08.22.112322/DerivedData
    IDETestRunSpecificationPath = /var/folders/0n/ndx6z4qx4b99kwtlpbp8r2hh0000gp/T/xdb/DeviceAgent.iOS.Dependencies/2450a6b29680a9ad62e5bb5816848ba8/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun
		} (10.3.2 (14F89))
		activityProgress:          -2
		applications:              (null)
		buildVersion:               14F89
		developerDiskMountError:   (null)
		deviceActivationState:      Activated
		deviceArchitecture:         arm64
		deviceAvailableCapacity:    57846710272
		deviceClass:                iPhone
		deviceIdentifier:           e60d53901f440522187a62a1d4476f1ff74c63f0
		deviceIsActivated:          YES
		deviceIsBusy:               NO
		deviceIsTransient:          NO
		deviceName:                 Jeff’s iPhone
		deviceSerialNumber:         DNPQ29QUG5MH
		deviceSoftwareVersion:      10.3.2 (14F89)
		deviceTotalCapacity:        60240023552
		deviceType:                 <DVTDeviceType:0x7fdd1e7067f0 Xcode.DeviceType.iPhone>
		hasInternalSupport:        NO
		identifier:                 e60d53901f440522187a62a1d4476f1ff74c63f0
		ignored:                    NO
		isPasscodeLocked:           NO
		isSupportedOS:             YES
		productVersion:             10.3.2
		provisioningProfiles:      (null)
		supportedDeviceFamilies:    (
	bootArgs:                  <unavailable>
2017-08-22 11:23:23.533 xcodebuild[4588:129463]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
2017-08-22 11:23:23.534 xcodebuild[4588:129429] [MT] IDETestOperationsObserverDebug: (8E256F48-BD30-48BE-BD94-79E805F0E667) Beginning test session Unnamed-Test-Run-8E256F48-BD30-48BE-BD94-79E805F0E667 at 2017-08-22 11:23:23.533 with Xcode 8E162 on target <DVTiOSDevice: 0x7fdd1e833c30> {
2017-08-22 11:23:31.283 xcodebuild[4588:129429] Error Domain=com.apple.platform.iphoneos Code=-12 "Unable to launch com.apple.test.DeviceAgent-Runner" UserInfo={NSLocalizedDescription=Unable to launch com.apple.test.DeviceAgent-Runner, NSUnderlyingError=0x7fdd1e697810 {Error Domain=DTXMessage Code=1 "(null)" UserInfo={DTXExceptionKey=The operation couldn’t be completed. Unable to launch com.apple.test.DeviceAgent-Runner because it has an invalid code signature, inadequate entitlements or its profile has not been explicitly trusted by the user. : Failed to launch process with bundle identifier 'com.apple.test.DeviceAgent-Runner'}}}
2017-08-22 11:23:31.283 xcodebuild[4588:129429] Error Domain=IDETestOperationsObserverErrorDomain Code=6 "Early unexpected exit, operation never finished bootstrapping - no restart will be attempted" UserInfo={NSLocalizedDescription=Early unexpected exit, operation never finished bootstrapping - no restart will be attempted}
User defaults from command line:
Comment 1 Robert Vaselaar 2017-08-22 21:29:38 UTC
=== Visual Studio Enterprise 2017 for Mac ===

Version 7.1 (build 1297)
Installation UUID: e3cd3467-9a4e-47d5-b621-7ff4ae86c90c
	Mono (d15-3/da80840) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 502000215

=== NuGet ===


=== .NET Core ===

Runtime: /usr/local/share/dotnet/dotnet
Runtime Version: 1.1.0
SDK: /usr/local/share/dotnet/sdk/1.0.0-preview2-1-003177/Sdks
SDK Version: 1.0.0-preview2-1-003177
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 Enterprise)
Android SDK: /Users/developer/Library/Android/sdk
	Supported Android versions:
		6.0 (API level 23)
		7.0 (API level 24)
		7.1 (API level 25)

SDK Tools Version: 26.0.2
SDK Platform Tools Version: 26.0.0
SDK Build Tools Version: 26.0.1

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 8.3 (12169)
Build 8E162

=== Xamarin.iOS ===

Version: (Visual Studio Enterprise)
Hash: 4a279c9a
Branch: d15-3
Build date: 2017-08-02 12:38:11-0400

=== Xamarin.Mac ===

Version: (Visual Studio Enterprise)

=== Xamarin Inspector ===

Version: 1.2.2
Hash: b71b035
Branch: d15-1
Build date: Fri, 21 Apr 2017 17:57:12 GMT

=== Build Information ===

Release ID: 701001297
Git revision: 9c5299666538b2f8baf501418a5c064d784d64da
Build date: 2017-08-07 11:29:35-04
Xamarin addins: 3bb0c32a14f1b7e368bf5ac53a84c3581c019391
Build lane: monodevelop-lion-d15-3

=== 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 2 Kent Green [MSFT] 2017-08-23 22:30:14 UTC
This does not appear to be a bug with Xamarin.iOS, but possibly is related to Xamarin.UITest. Can you reach out to support by logging into testcloud.xamarin.com & clicking on "Support" in the menubar?


When contacting Test Cloud support, please feel free to include a link to this bug to reference the information you've already shared. Additionally, a few questions that might be helpful are as follows:

1. Do the tests work for you on any other devices or simulators, and if so, which ones?
2. Are you using NUnit 2.6.4, and if not, does changing to that version in your UITest project help?
3. Can you include the Xamarin.UITest packages.config file? It looks like the packages.config you included was for the iOS app. Or even better, your UITest project source code & the IPA or simulator APP build to run the tests against.