Xamarin UITest error when executing a test

R2DR2D Member ✭✭

Hi Guys,

I am currently working on Xamarin UITest for an iOS app. When i run a test, the DeviceAgent got installed. But after that nothing happens and I got this error below. Does anyone of you have an idea what I might be missing.

Code:
return ConfigureApp
.iOS
.Debug()
.EnableLocalScreenshots()
.DeviceIdentifier("8b7937ef87210a797fc4fa0750e3c62d194bd5b1")
.InstalledApp("/Users/R/Stack/Payload/Prod.app")
.StartApp();
//...

Error:

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

ExitCode: 65

1
IDEDerivedDataPathOverride = /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/logs/2018.09.03.200741/DerivedData
IDETestRunSpecificationPath = /var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/xdb/DeviceAgent.iOS.Dependencies/c298adc2fd95518dc464c6d9138a9c6d/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun
    } (9.3.1 (13E238))
    applications:              (null)
    buildVersion:               13E238
    connected:                 yes
    connectionType:            direct
    developerDiskMountError:   (null)
    deviceActivationState:      Activated
    deviceArchitecture:         armv7s
    deviceAvailableCapacity:    55512891392
    deviceClass:                iPhone
    deviceIdentifier:           8b7937ef87210a797fc4fa0750e3c62d194bd5b1
    deviceIsActivated:          YES
    deviceIsBusy:               NO
    deviceIsTransient:          NO
    deviceName:                 Ro’s iPhone
    deviceSerialNumber:         F2LK87UDF39C
    deviceSoftwareVersion:      9.3.1 (13E238)
    deviceTotalCapacity:        60443181056
    deviceType:                 <DVTDeviceType:0x7ff705e765e0 Xcode.DeviceType.iPhone>
    hasInternalSupport:        NO
    identifier:                 8b7937ef87210a797fc4fa0750e3c62d194bd5b1
    ignored:                    NO
    isPasscodeLocked:           NO
    isSupportedOS:             YES
    isWirelessEnabled:         no
    productVersion:             9.3.1
    provisioningProfiles:      (null)
    supportedDeviceFamilies:    (
bootArgs:                  <unavailable>
Early unexpected exit, operation never finished bootstrapping - no restart will be attempted

(null)
)
** TEST EXECUTE FAILED **
/var/folders/1g/9ql9t0x558n9kf2ys8c5kks40000gn/T/com.apple.dt.XCTest/IDETestRunSession-9D572B46-C26E-4991-B650-860F06BCFCBD/Unnamed-Test-Run-F1793541-F8A8-4762-BC4A-085A76EDDC6E/Session-Unnamed-Test-Run-2018-09-03_200743-BKXmPY.log
2018-09-03 20:07:43.458 xcodebuild[18393:6728522] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
2018-09-03 20:07:43.461 xcodebuild[18393:6728513] [MT] IDETestOperationsObserverDebug: (DB7E8004-0685-4522-985B-B463D834909D) Beginning test session Unnamed-Test-Run-DB7E8004-0685-4522-985B-B463D834909D at 2018-09-03 20:07:43.461 with Xcode 9F2000 on target {
2018-09-03 20:07:51.561 xcodebuild[18393:6728513] 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}
2018-09-03 20:07:51.562 xcodebuild[18393:6728513] 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, NSUnderlyingError=0x7ff706210600 {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}}}
Testing failed:
User defaults from command line:

Answers

  • Kent.GreenKent.Green USXamarin Team Xamurai

    Hi,

    There are many, many possible causes of this error. The problem could be caused if the app isn't set up correctly for testing, or there is a known bug in UITest 2.2.4 which can cause this failure on only the first test executed on a fresh build of a UITest project, rerunning the test or running additional tests in that case will execute normally.

    I'd recommend checking the following:

    If you're not able to work out the issue based on that info above, then you can reach out to App Center support by logging into https://appcenter.ms/apps and clicking the chat icon in the lower right corner of the screen.

    Here's a screenshot if you're having trouble finding the chat icon: https://www.screencast.com/t/uF8S5o0o0

    Cheers,
    -Kent Green
    App Center Test Support

Sign In or Register to comment.