Appcenter: Xamarin UI Test: Failed to launch DeviceAgent iOS 14 Xcode 12

Created on 23 Nov 2020  Â·  34Comments  Â·  Source: microsoft/appcenter

I'm using following environment:

Xamarin.UITest (3.0.9)
Xcode 12.2
iOS 14.0.1

I get this error when running the Xamarin UI test:

Result message:
OneTimeSetUp: Xamarin.UITest.XDB.Exceptions.DeviceAgentException : Failed to launch DeviceAgent

ExitCode: 65
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun /var/folders/mw/4bls2gkx4bsdvzy9nzqzsqkr0000gn/T/xdb/DeviceAgent.iOS.Dependencies/1ac7ce936ba9c314a6536a50500fdc4b/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun -destination id=bff6d24e30682ab0cb3c705858bac072337409ca -derivedDataPath /var/folders/mw/4bls2gkx4bsdvzy9nzqzsqkr0000gn/T/xdb/logs/2020.11.23.072959/DerivedData
};
1,
2
IDEDerivedDataPathOverride = /var/folders/mw/4bls2gkx4bsdvzy9nzqzsqkr0000gn/T/xdb/logs/2020.11.23.072959/DerivedData
IDETestRunSpecificationPath = /var/folders/mw/4bls2gkx4bsdvzy9nzqzsqkr0000gn/T/xdb/DeviceAgent.iOS.Dependencies/1ac7ce936ba9c314a6536a50500fdc4b/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun
XCSuiteRecordsKey = {
emitOSLogs:YES
testsToRun:(null)
testsToSkip:(null)
testBundleURL:file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest
baselineFileURL:(null)
reportActivities:YES
testsDrivenByIDE:no
productModuleName:UITest
sessionIdentifier:(null)
reportResultsToIDE:no
targetApplicationPath:/Users/calabash/Library/Developer/Xcode/DerivedData/CBXDriver-thankyouforusingcalabash/Build/Products/Debug-iphoneos/TestApp.app
testExecutionOrdering:lexical
initializeForUITesting:YES
testBundleRelativePath:(null)
userAttachmentLifetime:0
automationFrameworkPath:(null)
baselineFileRelativePath:(null)
systemAttachmentLifetime:0
testsMustRunOnMainThread:YES
disablePerformanceMetrics:no
targetApplicationBundleID:sh.calaba.TestApp
targetApplicationArguments:(null)
randomExecutionOrderingSeed:(null)
gatherLocalizableStringsData:no
targetApplicationEnvironment:(null)
aggregateStatisticsBeforeCrash:
bridgedAutomationFrameworkPath:(null)
testApplicationDependencies:(null)
testApplicationUserOverrides:(null)
} (14.0.1 (18A393))
activeProxiedDevice: (null)
applications: (null)
bonjourServiceName: 58:40:4e:98:65:66@fe80::5a40:4eff:fe98:6566._apple-mobdev2._tcp.local.
bootArgs: (null)
buildVersion: 18A393
connected: YES
connectionType: direct
deviceActivationState: Activated
deviceArchitecture: arm64
deviceAvailableCapacity: 18527776768
deviceClass: iPad
deviceIdentifier: bff6d24e30682ab0cb3c705858bac072337409ca
deviceIsActivated: YES
deviceIsBusy: NO
deviceIsPaired: YES
deviceIsTransient: NO
deviceName: iPad (Can)
deviceSerialNumber: DMPSQ69AHG6R
deviceSoftwareVersion: 14.0.1 (18A393)
deviceTotalCapacity: 25734496256
deviceType:
hasInternalSupport: NO
hasWritableSystem: NO
hostname: (null)
identifier: bff6d24e30682ab0cb3c705858bac072337409ca
ignored: NO
isPasscodeLocked: NO
isSupportedOS: YES
isWirelessEnabled: NO
nextBootArgs: (null)
productVersion: 14.0.1
provisioningProfiles: (null)
Runner (3312) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test crashed with signal abrt before starting test execution. If you believe this error represents a bug, please attach the result bundle at /var/folders/mw/4bls2gkx4bsdvzy9nzqzsqkr0000gn/T/xdb/logs/2020.11.23.072959/DerivedData/Logs/Test/Test-Transient Testing-2020.11.23_07-30-01-+0300.xcresult))
supportedDeviceFamilies: (
/var/folders/mw/4bls2gkx4bsdvzy9nzqzsqkr0000gn/T/xdb/logs/2020.11.23.072959/DerivedData/Logs/Test/Test-Transient Testing-2020.11.23_07-30-01-+0300.xcresult
TestTargetName:
treatMissingBaselinesAsFailures:no
(0x1b3c56114 0x1c747ccb4 0x1b3b65308 0x1b4e97ca8 0x1013179b0 0x101273b18 0x101273a20 0x1b3bd5fa0 0x1b3bd5228 0x1b3bcfa54 0x1b3bcf200 0x1c9cca598 0x1b6495004 0x1b649a5d8 0x101273cf8 0x1b38ae598)
)
* TEST EXECUTE FAILED *
* First throw call stack:
/var/folders/mw/4bls2gkx4bsdvzy9nzqzsqkr0000gn/T/xdb/logs/2020.11.23.072959/DerivedData/Logs/Test/Test-Transient Testing-2020.11.23_07-30-01-+0300.xcresult/Staging/1_Test/Diagnostics/DeviceAgent-3570D3DC-B640-460B-830F-4FF33680D497/DeviceAgent-5D5D409C-BE3B-4DE2-8D18-8DB98FD894C3/Session-DeviceAgent-2020-11-23_073001-JXKhFE.log
{
}
2020-11-23 07:30:01.600 xcodebuild[1234:15815] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
2020-11-23 07:30:01.601 xcodebuild[1234:15739] [MT] IDETestOperationsObserverDebug: (94A59CD4-2460-4133-8648-71D1B3F2C740) Beginning test session DeviceAgent-94A59CD4-2460-4133-8648-71D1B3F2C740 at 2020-11-23 07:30:01.601 with Xcode 12B45b on target ???? {
2020-11-23 07:30:01.724 xcodebuild[1234:15739] [MT] IDETestOperationsObserverDebug: (94A59CD4-2460-4133-8648-71D1B3F2C740) Finished requesting crash reports. Continuing with testing.
2020-11-23 07:30:03.099 DeviceAgent-Runner[3312:4124986] Running tests...
2020-11-23 07:30:03.109 DeviceAgent-Runner[3312:4124986] Unable to load configuration data from specified path ; error: The file name is invalid.
2020-11-23 07:30:03.110 DeviceAgent-Runner[3312:4124986] Unable to load configuration data from specified path ; error: The file name is invalid.
2020-11-23 07:30:03.116 DeviceAgent-Runner[3312:4124986] Found most recent test bundle at NSBundle (not yet loaded)
2020-11-23 07:30:03.118 DeviceAgent-Runner[3312:4124986] Found most recent test configuration in bundle: /var/containers/Bundle/Application/EC58B02C-93D0-49B7-B7B5-DE62648562B3/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/CBX.xctestconfiguration
2020-11-23 07:30:03.121 DeviceAgent-Runner[3312:4124986] clearing out IDE related attributes
2020-11-23 07:30:03.122 DeviceAgent-Runner[3312:4124986] Running with configuration
2020-11-23 07:30:03.135 DeviceAgent-Runner[3312:4124986]
Assertion failure in void _XCTestMain(XCTestConfiguration *__strong _Nonnull)(), /Library/Caches/com.apple.xbs/Sources/XCTest_iOS/XCTest-14460.20/Sources/XCTestFramework/Harness/XCTestMain.m:213
2020-11-23 07:30:03.137 DeviceAgent-Runner[3312:4124986] *
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No test bundle found at file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest'
2020-11-23 07:30:23.293 xcodebuild[1234:15739] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2020-11-23 07:30:23.293 xcodebuild[1234:15739] [MT] IDETestOperationsObserverDebug: 21.700 elapsed -- Testing started completed.
2020-11-23 07:30:23.293 xcodebuild[1234:15739] [MT] IDETestOperationsObserverDebug: 21.700 sec, +21.700 sec -- end
Command line invocation:
libc++abi.dylib: terminating with uncaught exception of type NSException
Test session results, code coverage, and logs:
Testing failed:
Testing started
User defaults from command line:

As the App Center team says in https://github.com/microsoft/appcenter/issues/1992 the issue was resolved. But i'm still getting this error.

feature request test

Most helpful comment

What I'm observing after the update is that Xamarin UI tests are running terribly slowly on iOS 14.2.
One simulator test takes up to 5 minutes (locally as well as in Azure pipeline builds) on 14.2 whereas testing on 13.5 with the same device simulator finishes in 1.5 minutes.

All 34 comments

many other users are also receiving the same error, as recent comments from https://github.com/microsoft/appcenter/issues/1998

Having the same issue here. According to Ashish Mishra from their support team they're still working on it:

"Hi again! Sorry for late
As per my understanding iOS 14 with Xcode 12 in Xamarin UI test issue is the issue in which our team is still working and i don't have any update right now
I am checking with the team and will update you about that
Sorry for your inconvenience"

We are having the same issue, Is there any further update?

I have updated VS2019 for Mac, updated nuggets in App and Uitest project as of today and it will not launch the App failing with error below

`at Xamarin.UITest.XDB.Services.iOSDeviceAgentService.LaunchTestAsync (System.String deviceId, System.String deviceAddress) [0x00353] in <1da92138055146bba74b17eb98358802>:0
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x001e8] in <1da92138055146bba74b17eb98358802>:0
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) [0x00068] in <1da92138055146bba74b17eb98358802>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x0026f] in <1da92138055146bba74b17eb98358802>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <1da92138055146bba74b17eb98358802>:0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <1da92138055146bba74b17eb98358802>:0
at AccountsUITest.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x0000b] in /Users/oladotun/Documents/AccountsUITestIOS/AccountsUITestIOS/AppInitializer.cs:24
at AccountsUITest.Tests001Admin.BeforeEachTest () [0x00001] in /Users/oladotun/Documents/AccountsUITestIOS/AccountsUITestIOS/Tests001Admin.cs:29
at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395

Having the same issue but on all ios versions, not just 14, with the latest Xcode and Xamarin studio (VS for mac) I have the latest Xamarin ui tests package with 3.0.9. @dimazaid Could you please have the team look at this and give us an eta for the fix? We were told in this #1998 that support for ios 14 was completed, that does not appear to be the case.

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

ExitCode: 65

/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun /var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/DeviceAgent.iOS.Dependencies/1ac7ce936ba9c314a6536a50500fdc4b/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun -destination id=85ee21b87f1604cdb9447be73dcd48bedc1a0a3e -derivedDataPath /var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/logs/2020.11.23.140741/DerivedData
};
1
IDEDerivedDataPathOverride = /var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/logs/2020.11.23.140741/DerivedData
IDETestRunSpecificationPath = /var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/DeviceAgent.iOS.Dependencies/1ac7ce936ba9c314a6536a50500fdc4b/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun
XCSuiteRecordsKey =     {
                     emitOSLogs:YES
                     testsToRun:(null)
                    testsToSkip:(null)
                  testBundleURL:file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest
                baselineFileURL:(null)
               reportActivities:YES
               testsDrivenByIDE:no
              productModuleName:UITest
              sessionIdentifier:(null)
             reportResultsToIDE:no
          targetApplicationPath:/Users/calabash/Library/Developer/Xcode/DerivedData/CBXDriver-thankyouforusingcalabash/Build/Products/Debug-iphoneos/TestApp.app
          testExecutionOrdering:lexical
         initializeForUITesting:YES
         testBundleRelativePath:(null)
         userAttachmentLifetime:0
        automationFrameworkPath:(null)
       baselineFileRelativePath:(null)
       systemAttachmentLifetime:0
       testsMustRunOnMainThread:YES
      disablePerformanceMetrics:no
      targetApplicationBundleID:sh.calaba.TestApp
     targetApplicationArguments:(null)
    randomExecutionOrderingSeed:(null)
   gatherLocalizableStringsData:no
   targetApplicationEnvironment:(null)
 aggregateStatisticsBeforeCrash:
 bridgedAutomationFrameworkPath:(null)
 testApplicationDependencies:(null)
 testApplicationUserOverrides:(null)
    } (13.7 (17H35))
    activeProxiedDevice:       (null)
    applications:              (null)
    bonjourServiceName:        a0:3b:e3:a4:07:8c@fe80::a23b:e3ff:fea4:78c._apple-mobdev2._tcp.local.
    bootArgs:                  (null)
    buildVersion:               17H35
    connected:                 YES
    connectionType:            direct
    deviceActivationState:      Activated
    deviceArchitecture:         arm64
    deviceAvailableCapacity:    115944509440
    deviceClass:                iPhone
    deviceIdentifier:           85ee21b87f1604cdb9447be73dcd48bedc1a0a3e
    deviceIsActivated:          YES
    deviceIsBusy:               NO
    deviceIsPaired:             YES
    deviceIsTransient:          NO
    deviceName:                 Moshe Moadeb???s iPhone
    deviceSerialNumber:         C39SGKYJHFXX
    deviceSoftwareVersion:      13.7 (17H35)
    deviceTotalCapacity:        122335686656
    deviceType:                 <DVTDeviceType:0x7fe856220c50 Xcode.DeviceType.iPhone>
    hasInternalSupport:        NO
    hasWritableSystem:         NO
    hostname:                  (null)
    identifier:                 85ee21b87f1604cdb9447be73dcd48bedc1a0a3e
    ignored:                    NO
    isPasscodeLocked:           NO
    isSupportedOS:             YES
    isWirelessEnabled:         NO
    nextBootArgs:              (null)
    productVersion:             13.7
    provisioningProfiles:      (null)
    Runner (273) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test runner exited before starting test execution. If you believe this error represents a bug, please attach the result bundle at /var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/logs/2020.11.23.140741/DerivedData/Logs/Test/Test-Transient Testing-2020.11.23_14-07-42--0700.xcresult))
    supportedDeviceFamilies:    (
/var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/logs/2020.11.23.140741/DerivedData/Logs/Test/Test-Transient Testing-2020.11.23_14-07-42--0700.xcresult
TestTargetName:
treatMissingBaselinesAsFailures:no

(0x1bc031654 0x1bbd53bcc 0x1bbf346ec 0x1bc3c8584 0x100f7f9b0 0x100ed7b18 0x100ed7a20 0x1bbfaf90c 0x1bbfaf098 0x1bbfaa1fc 0x1bbfa9ba8 0x1c6120344 0x1c00e53e4 0x100ed7cf8 0x1bbe318f0)
)
* TEST EXECUTE FAILED *
* First throw call stack:
/var/folders/g1/1jz4c5yd6bx41bgkjh7vmdw80000gn/T/xdb/logs/2020.11.23.140741/DerivedData/Logs/Test/Test-Transient Testing-2020.11.23_14-07-42--0700.xcresult/Staging/1_Test/Diagnostics/DeviceAgent-E88D6A8B-4124-4AC0-A7CF-C05F14196567/DeviceAgent-CDA94B5F-78DC-469F-A223-989D698DDA3A/Session-DeviceAgent-2020-11-23_140742-YhcLqm.log
{
}
2020-11-23 14:07:42.884 xcodebuild[7953:209026] [MT] IDETestOperationsObserverDebug: (2E323F69-BE98-4F55-BB0C-0EDF5C5AA126) Beginning test session DeviceAgent-2E323F69-BE98-4F55-BB0C-0EDF5C5AA126 at 2020-11-23 14:07:42.885 with Xcode 12B45b on target ???? {
2020-11-23 14:07:42.884 xcodebuild[7953:209094] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
2020-11-23 14:07:42.986 xcodebuild[7953:209026] [MT] IDETestOperationsObserverDebug: (2E323F69-BE98-4F55-BB0C-0EDF5C5AA126) Finished requesting crash reports. Continuing with testing.
2020-11-23 14:07:43.764 DeviceAgent-Runner[273:4428] Running tests...
2020-11-23 14:07:43.766 DeviceAgent-Runner[273:4428] Unable to load configuration data from specified path ; error: The file name is invalid.
2020-11-23 14:07:43.766 DeviceAgent-Runner[273:4428] Unable to load configuration data from specified path ; error: The file name is invalid.
2020-11-23 14:07:43.767 DeviceAgent-Runner[273:4428] Found most recent test bundle at NSBundle (not yet loaded)
2020-11-23 14:07:43.767 DeviceAgent-Runner[273:4428] Found most recent test configuration in bundle: /var/containers/Bundle/Application/54BF7DE4-40BB-4FD3-93CE-238DFA5A1877/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/CBX.xctestconfiguration
2020-11-23 14:07:43.768 DeviceAgent-Runner[273:4428] clearing out IDE related attributes
2020-11-23 14:07:43.768 DeviceAgent-Runner[273:4428] Running with configuration
2020-11-23 14:07:43.772 DeviceAgent-Runner[273:4428]
Assertion failure in void _XCTestMain(XCTestConfiguration *__strong _Nonnull)(), /Library/Caches/com.apple.xbs/Sources/XCTest_iOS/XCTest-14460.20/Sources/XCTestFramework/Harness/XCTestMain.m:213
2020-11-23 14:07:43.772 DeviceAgent-Runner[273:4428] *
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No test bundle found at file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest'
2020-11-23 14:08:03.712 xcodebuild[7953:209026] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2020-11-23 14:08:03.712 xcodebuild[7953:209026] [MT] IDETestOperationsObserverDebug: 20.834 elapsed -- Testing started completed.
2020-11-23 14:08:03.712 xcodebuild[7953:209026] [MT] IDETestOperationsObserverDebug: 20.834 sec, +20.834 sec -- end
Command line invocation:
libc++abi.dylib: terminating with uncaught exception of type NSException
Test session results, code coverage, and logs:
Testing failed:
Testing started
User defaults from command line:
TearDown : System.NullReferenceException : Object reference not set to an instance of an object

Good day!
We have reproduced the error with DeviceAgent and working on fix.

@IlyaBausovAkvelon Thank you for the update, is there an ETA already?

As other people have already suggested in related issues, please consider making Xamarin UITest open source so that the community can help with this kind of issues.

Same issue. ETA?

I recieved the same error on both 14.2 and 14.0.

Eventually I just downgraded to 13.7 and then it worked. It is clear that the iOS 14 problem is not fixed.

Xamarin.UITest 3.0.10 released.
Please update it and check if the error still persists.

Still seeing the same issue after updating to 3.0.10:

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

ExitCode: 65






    /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun /var/folders/l1/b2c_8mzd3714fw1fvtnycrxr0000gn/T/xdb/logs/2020.11.26.003147/DeviceAgent-simulator.xctestrun -destination id=CB50755A-04E1-4280-AD0D-A06B45589654 -derivedDataPath /var/folders/l1/b2c_8mzd3714fw1fvtnycrxr0000gn/T/xdb/logs/2020.11.26.003147/DerivedData
    };
    IDEDerivedDataPathOverride = /var/folders/l1/b2c_8mzd3714fw1fvtnycrxr0000gn/T/xdb/logs/2020.11.26.003147/DerivedData
    IDETestRunSpecificationPath = /var/folders/l1/b2c_8mzd3714fw1fvtnycrxr0000gn/T/xdb/logs/2020.11.26.003147/DeviceAgent-simulator.xctestrun
    XCSuiteRecordsKey =     {
                         emitOSLogs:YES
                         testsToRun:(null)
                        testsToSkip:(null)
                      testBundleURL:file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest
                    baselineFileURL:(null)
                   reportActivities:YES
                   testsDrivenByIDE:no
                  productModuleName:UITest
                  sessionIdentifier:(null)
                 reportResultsToIDE:no
              targetApplicationPath:/Users/calabash/Library/Developer/Xcode/DerivedData/CBXDriver-thankyouforusingcalabash/Build/Products/Debug-iphoneos/TestApp.app
              testExecutionOrdering:lexical
             initializeForUITesting:YES
             testBundleRelativePath:(null)
             userAttachmentLifetime:0
            automationFrameworkPath:(null)
           baselineFileRelativePath:(null)
           systemAttachmentLifetime:0
           testsMustRunOnMainThread:YES
          disablePerformanceMetrics:no
          targetApplicationBundleID:sh.calaba.TestApp
         targetApplicationArguments:(null)
        randomExecutionOrderingSeed:(null)
       gatherLocalizableStringsData:no
       targetApplicationEnvironment:(null)
     aggregateStatisticsBeforeCrash:
     bridgedAutomationFrameworkPath:(null)
     testApplicationDependencies:(null)
     testApplicationUserOverrides:(null)
        DeviceAgent-Runner.app (63229) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Crash: DeviceAgent-Runner (63229): <external symbol>. If you believe this error represents a bug, please attach the result bundle at /var/folders/l1/b2c_8mzd3714fw1fvtnycrxr0000gn/T/xdb/logs/2020.11.26.003147/DerivedData/Logs/Test/Test-Transient Testing-2020.11.26_00-31-47--0800.xcresult))
        SimDevice: iPhone X (CB50755A-04E1-4280-AD0D-A06B45589654, iOS 14.2, Booted)
    /var/folders/l1/b2c_8mzd3714fw1fvtnycrxr0000gn/T/xdb/logs/2020.11.26.003147/DerivedData/Logs/Test/Test-Transient Testing-2020.11.26_00-31-47--0800.xcresult
    0   CoreFoundation                      0x00007fff2041daf2 __exceptionPreprocess + 242
    1   libobjc.A.dylib                     0x00007fff20177e78 objc_exception_throw + 48
    10  CoreFoundation                      0x00007fff203856c6 CFRunLoopRunSpecific + 567
    11  GraphicsServices                    0x00007fff2b76adb3 GSEventRunModal + 139
    12  UIKitCore                           0x00007fff24675187 -[UIApplication _run] + 912
    13  UIKitCore                           0x00007fff2467a038 UIApplicationMain + 101
    14  DeviceAgent-Runner                  0x00000001080931f5 main + 183
    15  libdyld.dylib                       0x00007fff20256409 start + 1
    2   CoreFoundation                      0x00007fff2041d91b +[NSException raise:format:] + 0
    3   Foundation                          0x00007fff2076b633 -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
    4   XCTest                              0x00000001081d6700 _XCTestMain + 761
    5   DeviceAgent-Runner                  0x000000010809302d -[_XCTRunnerAppDelegate applicationWillResignActive:] + 0
    6   DeviceAgent-Runner                  0x0000000108092f2b _XCTRunnerRunTests + 0
    7   CoreFoundation                      0x00007fff2038c110 __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
    8   CoreFoundation                      0x00007fff2038b524 __CFRunLoopDoBlocks + 434
    9   CoreFoundation                      0x00007fff20385f34 __CFRunLoopRun + 899
    TestTargetName:
    treatMissingBaselinesAsFailures:no
(
)
** TEST EXECUTE FAILED **
*** First throw call stack:
/var/folders/l1/b2c_8mzd3714fw1fvtnycrxr0000gn/T/xdb/logs/2020.11.26.003147/DerivedData/Logs/Test/Test-Transient Testing-2020.11.26_00-31-47--0800.xcresult/Staging/1_Test/Diagnostics/DeviceAgent-4631B9D2-2369-4404-BEDA-2046EB6E0044/DeviceAgent-D84068A4-7C3B-449A-A6B1-D982EEF242B5/Session-DeviceAgent-2020-11-26_003147-ANeGG8.log
{
}
} (14.2 (18B79))
2020-11-26 00:31:47.849 xcodebuild[63223:3444417] [MT] IDETestOperationsObserverDebug: (212BD43F-D985-4E68-B590-241773E1FD88) Beginning test session DeviceAgent-212BD43F-D985-4E68-B590-241773E1FD88 at 2020-11-26 00:31:47.850 with Xcode 12B45b on target <DVTiPhoneSimulator: 0x7ff08667f8c0> {
2020-11-26 00:31:47.849 xcodebuild[63223:3444585]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
2020-11-26 00:31:48.779 xcodebuild[63223:3444417] [MT] IDETestOperationsObserverDebug: (212BD43F-D985-4E68-B590-241773E1FD88) Finished requesting crash reports. Continuing with testing.
2020-11-26 00:31:49.211 DeviceAgent-Runner[63229:3444896] Running tests...
2020-11-26 00:31:49.213 DeviceAgent-Runner[63229:3444896] Unable to load configuration data from specified path ; error: The file name is invalid.
2020-11-26 00:31:49.213 DeviceAgent-Runner[63229:3444896] Unable to load configuration data from specified path ; error: The file name is invalid.
2020-11-26 00:31:49.215 DeviceAgent-Runner[63229:3444896] Found most recent test bundle at NSBundle </Users/will/Library/Developer/CoreSimulator/Devices/CB50755A-04E1-4280-AD0D-A06B45589654/data/Containers/Bundle/Application/6C3386C9-21B7-4105-8B35-E8633A6B99E6/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest> (not yet loaded)
2020-11-26 00:31:49.215 DeviceAgent-Runner[63229:3444896] Found most recent test configuration in bundle: /Users/will/Library/Developer/CoreSimulator/Devices/CB50755A-04E1-4280-AD0D-A06B45589654/data/Containers/Bundle/Application/6C3386C9-21B7-4105-8B35-E8633A6B99E6/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/CBX.xctestconfiguration
2020-11-26 00:31:49.217 DeviceAgent-Runner[63229:3444896] clearing out IDE related attributes
2020-11-26 00:31:49.217 DeviceAgent-Runner[63229:3444896] Running with configuration <XCTestConfiguration: 0x600002f7da00>
2020-11-26 00:31:49.221 DeviceAgent-Runner[63229:3444896] *** Assertion failure in void _XCTestMain(XCTestConfiguration *__strong _Nonnull)(), /Library/Caches/com.apple.xbs/Sources/XCTest_Sim/XCTest-14460.20/Sources/XCTestFramework/Harness/XCTestMain.m:213
2020-11-26 00:31:49.223 DeviceAgent-Runner[63229:3444896] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No test bundle found at file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest'
2020-11-26 00:31:55.484 xcodebuild[63223:3444417] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2020-11-26 00:31:55.484 xcodebuild[63223:3444417] [MT] IDETestOperationsObserverDebug: 7.654 elapsed -- Testing started completed.
2020-11-26 00:31:55.484 xcodebuild[63223:3444417] [MT] IDETestOperationsObserverDebug: 7.654 sec, +7.654 sec -- end
2020-11-26 00:31:57.661 xcodebuild[63223:3444417] [MT] IDEResultKit: Warning: While writing a result bundle to /var/folders/l1/b2c_8mzd3714fw1fvtnycrxr0000gn/T/xdb/logs/2020.11.26.003147/DerivedData/Logs/Test/Test-Transient Testing-2020.11.26_00-31-47--0800.xcresult, not all contents have been imported, as the Staging directory still contains the following files/directories: ["1_Test"]
Command line invocation:
libc++abi.dylib: terminating with uncaught exception of type NSException
Test session results, code coverage, and logs:
Testing failed:
Testing started
User defaults from command line:
Stack trace:
  at Xamarin.UITest.XDB.Services.iOSDeviceAgentService.LaunchTestAsync (System.String deviceId, System.String deviceAddress) [0x00353] in <2c015e9937984e6199286e4d528348bd>:0 
  at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x001e8] in <2c015e9937984e6199286e4d528348bd>:0 
  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) [0x00068] in <2c015e9937984e6199286e4d528348bd>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x0026f] in <2c015e9937984e6199286e4d528348bd>:0 
  at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <2c015e9937984e6199286e4d528348bd>:0 
  at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <2c015e9937984e6199286e4d528348bd>:0 
  at GluwaPro.UITest.AppInitializer.StartApp (Xamarin.UITest.Platform platform) [0x001fb] in /Users/will/CdUtils/Xamarin.UITest/GluwaPro.UITest/AppInitializer.cs:91 
  at GluwaPro.UITest.HomeTests.BeforeEachTest () [0x00001] in /Users/will/CdUtils/Xamarin.UITest/GluwaPro.UITest/HomeTests.cs:35 
  at (wrapper managed-to-native) System.Reflection.RuntimeMethodInfo.InternalInvoke(System.Reflection.RuntimeMethodInfo,object,object[],System.Exception&)
  at System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x0006a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2020-02/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.Reflection/RuntimeMethodInfo.cs:395 

@MrAusnadian Good day!
Which version of macOS do you use?

@MrAusnadian Good day!
Which version of macOS do you use?

I am not MrAusnadian, but I experienced the same crash. I am using MacOS 10.15.6 and xCode 12.2.

Hey,

I've just updated to Xamarin.UITest 3.0.10, seems we are still having the issue with device agent.

I am also using MacOS 10.15.6 and xCode 12.2.

Hi All

I am on MacOS 10.15.7, Xcode 12.2 , uitest 3.0.10 and get the same error as MrAusnadian

Cheers

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

ExitCode: 65

@MrAusnadian Good day!

Which version of macOS do you use?

macOS 11.0.1 (20B29) and Xcode 12.2 (12B45b)

We found out that actual bundle is not passed into xctestconfiguration. Working on fix.

I am on MacOS 10.15.7, Xcode 12.2 , uitest 3.0.10 and get the same error as MrAusnadian

Cheers

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

ExitCode: 65

Same here.

I saw #1992 and #1998 were closed and decided to upgrade our Mac/UI Test project today before reading the latest comments on these issues.

Big mistake. Full day wasted...

I'm having the same problem using MacOS 11.0.1, XCode 12.2, and Xamarin.UITest 3.0.10

Hello everyone!
Xamarin.UITest 3.0.11 released.
We have reproduced your issue locally and with the new Xamarin.UITest version the issue has been fixed. Please, let us know any feedback about this release.

@AndreyMaslennikov 3.0.11 working for myself. Thanks to you and your team for getting this fixed

Hello everyone!
Xamarin.UITest 3.0.11 released.
We have reproduced your issue locally and with the new Xamarin.UITest version the issue has been fixed. Please, let us know any feedback about this release.

Working well here now as well. Thanks @AndreyMaslennikov

@seanrodda, @MrAusnadian really glad to hear that. Thank you for your patience.
Also many thanks to @IlyaBausovAkvelon. He took a huge part in fixing this problem

Working as expected. Many thanks to @AndreyMaslennikov and @IlyaBausovAkvelon

Issue resolved for me! Thanks!

Now it's working! Thanks.

@AndreyMaslennikov
Hi There

Its working but the transitions between lines of code are really slow.

And its particularly slow when moving on to the next test file in the uitest app.
So slow that the phone goes to sleep

This was not the case before, dunno if its just me.

I test on an iPhone 7

Cheers

@AndreyMaslennikov Thank you for the update, this issue seems to be solved now. However 3.0.11 seems to be affected by a regression regarding springboard alerts: https://github.com/microsoft/appcenter/issues/2060.

Is this being worked on already?

The above mentioned DeviceAgentException is resolved, but now I am seeing:

System.Exception: Could not find key: AppleSdkRoot

Environment:

Xamarin.UITest
3.0.11

Visual Studio for Mac
8.8.3 (build 16)

Xcode
Version 12.2 (12B45b)

image

Physical iPhones
iPhone 8 Plus - iOS 13.5.1
iPhone XS Max - iOS 14.0

System.Exception: Could not find key: AppleSdkRoot
  at Xamarin.UITest.Shared.iOS.PListHelper.ReadPListValueFromString (System.String plistContents, System.String key) [0x00067] in <7941e7e37fbb4acfaac1986eb110a602>:0
  at Xamarin.UITest.Shared.iOS.PListHelper.ReadPListValueFromFile (System.String plistPath, System.String key) [0x0005b] in <7941e7e37fbb4acfaac1986eb110a602>:0
  at Xamarin.UITest.iOS.iOSAppLauncher.SetXamarinStudioAppleSDKOverridePath () [0x00041] in <7941e7e37fbb4acfaac1986eb110a602>:0

```/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun /var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/ad49d517d9dae1da9385266e824f7d69/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun -destination id=e84c8e550df61a741bf399fd8cc1bdd62cb9c4a6 -derivedDataPath /var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/logs/2020.12.03.091619/DerivedData
};
1
IDEDerivedDataPathOverride = /var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/logs/2020.12.03.091619/DerivedData
IDETestRunSpecificationPath = /var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/DeviceAgent.iOS.Dependencies/ad49d517d9dae1da9385266e824f7d69/ipa/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/DeviceAgent-device.xctestrun
XCSuiteRecordsKey = {
emitOSLogs:YES
testsToRun:(null)
testsToSkip:(null)
testBundleURL:file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest
baselineFileURL:(null)
reportActivities:YES
testsDrivenByIDE:no
productModuleName:UITest
sessionIdentifier:(null)
reportResultsToIDE:no
targetApplicationPath:/Users/calabash/Library/Developer/Xcode/DerivedData/CBXDriver-thankyouforusingcalabash/Build/Products/Debug-iphoneos/TestApp.app
testExecutionOrdering:lexical
initializeForUITesting:YES
testBundleRelativePath:(null)
userAttachmentLifetime:0
automationFrameworkPath:(null)
baselineFileRelativePath:(null)
systemAttachmentLifetime:0
testsMustRunOnMainThread:YES
disablePerformanceMetrics:no
targetApplicationBundleID:sh.calaba.TestApp
targetApplicationArguments:(null)
randomExecutionOrderingSeed:(null)
gatherLocalizableStringsData:no
targetApplicationEnvironment:(null)
aggregateStatisticsBeforeCrash:
bridgedAutomationFrameworkPath:(null)
testApplicationDependencies:(null)
testApplicationUserOverrides:(null)
} (13.5.1 (17F80))
activeProxiedDevice: (null)
applications: (null)
bonjourServiceName: 34:7c:25:52:63:37@fe80::367c:25ff:fe52:6337._apple-mobdev2._tcp.local.
bootArgs: (null)
buildVersion: 17F80
connected: YES
connectionType: direct
deviceActivationState: Activated
deviceArchitecture: arm64
deviceAvailableCapacity: 225157242880
deviceClass: iPhone
deviceIdentifier: e84c8e550df61a741bf399fd8cc1bdd62cb9c4a6
deviceIsActivated: YES
deviceIsBusy: NO
deviceIsPaired: YES
deviceIsTransient: NO
deviceName: qa-iphone8plus
deviceSerialNumber: F2LVD8V2JCLP
deviceSoftwareVersion: 13.5.1 (17F80)
deviceTotalCapacity: 244362915840
deviceType:
hasInternalSupport: NO
hasWritableSystem: NO
hostname: (null)
identifier: e84c8e550df61a741bf399fd8cc1bdd62cb9c4a6
ignored: NO
isPasscodeLocked: NO
isSupportedOS: YES
isWirelessEnabled: NO
nextBootArgs: (null)
productVersion: 13.5.1
provisioningProfiles: (null)
Runner (603) encountered an error (Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: Test runner exited before starting test execution. If you believe this error represents a bug, please attach the result bundle at /var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/logs/2020.12.03.091619/DerivedData/Logs/Test/Test-Transient Testing-2020.12.03_09-16-20--0500.xcresult))
supportedDeviceFamilies: (
/var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/logs/2020.12.03.091619/DerivedData/Logs/Test/Test-Transient Testing-2020.12.03_09-16-20--0500.xcresult
0 DTDeviceKitBase 0x000000011eb0599f DTDKCreateNSErrorFromAMDErrorCode + 220
1 DTDeviceKitBase 0x000000011eb15b94 __63-[DTDKRemoteDeviceConnection startFirstServiceOf:unlockKeybag:]_block_invoke + 613
10 DTDeviceKitBase 0x000000011eb06fd7 DTDKExecuteWithConnection + 226
11 DTDeviceKitBase 0x000000011eb079a3 DTDKExecuteInSession + 239
12 DTDeviceKitBase 0x000000011eb150b2 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_2 + 131
13 DVTFoundation 0x00000001100d62ae __DVT_CALLING_CLIENT_BLOCK__ + 7
14 DVTFoundation 0x00000001100d7ed0 __DVTDispatchAsync_block_invoke + 1191
15 libdispatch.dylib 0x00007fff70dcb6c4 _dispatch_call_block_and_release + 12
16 libdispatch.dylib 0x00007fff70dcc658 _dispatch_client_callout + 8
17 libdispatch.dylib 0x00007fff70dd1c44 _dispatch_lane_serial_drain + 597
18 libdispatch.dylib 0x00007fff70dd2609 _dispatch_lane_invoke + 414
19 libdispatch.dylib 0x00007fff70ddbc09 _dispatch_workloop_worker_thread + 596
2 DTDeviceKitBase 0x000000011eb15260 __48-[DTDKRemoteDeviceConnection futureWithSession:]_block_invoke_3 + 22
20 libsystem_pthread.dylib 0x00007fff71026a3d _pthread_wqthread + 290
21 libsystem_pthread.dylib 0x00007fff71025b77 start_wqthread + 15
3 DTDeviceKitBase 0x000000011eb07aff __DTDKExecuteInSession_block_invoke_2 + 35
4 DTDeviceKitBase 0x000000011eb071d9 __DTDKExecuteWithConnection_block_invoke_2 + 218
5 DTDeviceKitBase 0x000000011eb070d6 __DTDKExecuteWithConnection_block_invoke + 106
6 libdispatch.dylib 0x00007fff70dcc658 _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff70dd86ec _dispatch_lane_barrier_sync_invoke_and_complete + 60
8 DVTFoundation 0x00000001100d8df3 DVTDispatchBarrierSync + 208
9 DVTFoundation 0x00000001100afea6 -[DVTDispatchLock performLockedBlock:] + 60
TestTargetName:
treatMissingBaselinesAsFailures:no
(0x1b7029794 0x1b6d4bbcc 0x1b6f2c82c 0x1b73b2584 0x10036b9b0 0x1002cbb18 0x1002cba20 0x1b6fa7a4c 0x1b6fa71d8 0x1b6fa233c 0x1b6fa1ce8 0x1c10ec38c 0x1bb0d0444 0x1002cbcf8 0x1b6e298f0)
)
), DVTRadarComponentKey=261622, NSLocalizedDescription=The service is invalid.}}, NSLocalizedRecoverySuggestion=Please check your connection to your device., DVTRadarComponentKey=261622, NSLocalizedDescription=Failed to start remote service "com.apple.instruments.remoteserver.DVTSecureSocketProxy" on device.}
* TEST EXECUTE FAILED *
* First throw call stack:
/var/folders/sl/x1qg9tt511n7gzx43n2vcb_m0000gn/T/xdb/logs/2020.12.03.091619/DerivedData/Logs/Test/Test-Transient Testing-2020.12.03_09-16-20--0500.xcresult/Staging/1_Test/Diagnostics/DeviceAgent-10EA1B11-3B7B-42C3-80A0-ECB3822B721B/DeviceAgent-06717372-F45D-45EC-8B2B-C658BA05F10C/Session-DeviceAgent-2020-12-03_091620-L3xrB0.log
{
}
2020-12-03 09:16:20.851 xcodebuild[3587:36453] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
2020-12-03 09:16:20.852 xcodebuild[3587:36398] [MT] IDETestOperationsObserverDebug: (6688F445-CAA5-4DA7-B1AE-8D65DC26F5D3) Beginning test session DeviceAgent-6688F445-CAA5-4DA7-B1AE-8D65DC26F5D3 at 2020-12-03 09:16:20.852 with Xcode 12B45b on target ???? {
2020-12-03 09:16:20.960 xcodebuild[3587:36398] [MT] IDETestOperationsObserverDebug: (6688F445-CAA5-4DA7-B1AE-8D65DC26F5D3) Finished requesting crash reports. Continuing with testing.
2020-12-03 09:16:21.378 xcodebuild[3587:36398] [MT] DTDKRemoteDeviceConnection: Unable to start com.apple.instruments.remoteserver.DVTSecureSocketProxy on device ???e84c8e550df61a741bf399fd8cc1bdd62cb9c4a6???. Falling back to service without proxy.
2020-12-03 09:16:21.378 xcodebuild[3587:36454] DTDKRemoteDeviceConnection: Failed to start remote service "com.apple.instruments.remoteserver.DVTSecureSocketProxy" on device. Error: Error Domain=com.apple.dtdevicekit Code=811 "Failed to start remote service "com.apple.instruments.remoteserver.DVTSecureSocketProxy" on device." UserInfo={NSUnderlyingError=0x7fbee968e0f0 {Error Domain=com.apple.dt.MobileDeviceErrorDomain Code=-402653150 "The service is invalid." UserInfo={MobileDeviceErrorCode=(0xE8000022), com.apple.dtdevicekit.stacktrace=(
2020-12-03 09:16:21.720 DeviceAgent-Runner[603:127206] Running tests...
2020-12-03 09:16:21.723 DeviceAgent-Runner[603:127206] Unable to load configuration data from specified path ; error: The file name is invalid.
2020-12-03 09:16:21.723 DeviceAgent-Runner[603:127206] Unable to load configuration data from specified path ; error: The file name is invalid.
2020-12-03 09:16:21.726 DeviceAgent-Runner[603:127206] Found most recent test bundle at NSBundle (not yet loaded)
2020-12-03 09:16:21.727 DeviceAgent-Runner[603:127206] Found most recent test configuration in bundle: /var/containers/Bundle/Application/447D871C-317F-49B0-8100-D1E62B1F79AE/DeviceAgent-Runner.app/PlugIns/DeviceAgent.xctest/CBX.xctestconfiguration
2020-12-03 09:16:21.728 DeviceAgent-Runner[603:127206] clearing out IDE related attributes
2020-12-03 09:16:21.728 DeviceAgent-Runner[603:127206] Running with configuration
2020-12-03 09:16:21.733 DeviceAgent-Runner[603:127206]
Assertion failure in void _XCTestMain(XCTestConfiguration *__strong _Nonnull)(), /Library/Caches/com.apple.xbs/Sources/XCTest_iOS/XCTest-14460.20/Sources/XCTestFramework/Harness/XCTestMain.m:213
2020-12-03 09:16:21.733 DeviceAgent-Runner[603:127206] *
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'No test bundle found at file:///private/var/containers/Bundle/Application/21A83AF9-FACE-FACE-FACE-00605F990879/UITest-Runner.app/PlugIns/UITest.xctest'
2020-12-03 09:16:41.742 xcodebuild[3587:36398] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2020-12-03 09:16:41.742 xcodebuild[3587:36398] [MT] IDETestOperationsObserverDebug: 20.897 elapsed -- Testing started completed.
2020-12-03 09:16:41.742 xcodebuild[3587:36398] [MT] IDETestOperationsObserverDebug: 20.897 sec, +20.897 sec -- end
Command line invocation:
libc++abi.dylib: terminating with uncaught exception of type NSException
Test session results, code coverage, and logs:
Testing failed:
Testing started
User defaults from command line:
at Xamarin.UITest.XDB.Services.iOSDeviceAgentService.LaunchTestAsync (System.String deviceId, System.String deviceAddress) [0x00353] in <7941e7e37fbb4acfaac1986eb110a602>:0
at Xamarin.UITest.iOS.iOSAppLauncher.LaunchAppLocal (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Http.HttpClient httpClient, System.Boolean clearAppData) [0x001e8] in <7941e7e37fbb4acfaac1986eb110a602>:0
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) [0x00068] in <7941e7e37fbb4acfaac1986eb110a602>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration, Xamarin.UITest.Shared.Execution.IExecutor executor) [0x0026f] in <7941e7e37fbb4acfaac1986eb110a602>:0
at Xamarin.UITest.iOS.iOSApp..ctor (Xamarin.UITest.Configuration.IiOSAppConfiguration appConfiguration) [0x00000] in <7941e7e37fbb4acfaac1986eb110a602>:0
at Xamarin.UITest.Configuration.iOSAppConfigurator.StartApp (Xamarin.UITest.Configuration.AppDataMode appDataMode) [0x00017] in <7941e7e37fbb4acfaac1986eb110a602>:0
at FishAngler.UI.Tests.Initialization.iOSDebugUITestLauncher.StartApp () [0x00003] in /Users/uitest/Projects/MobileApp/FishAngler.UI.Tests/Initialization/Mobile/iOSUITestLaunchController.cs:64
at FishAngler.UI.Tests.Initialization.iOSUITestLaunchController.StartApp (FishAngler.UI.Tests.Enums.BuildEnvironment environment, FishAngler.UI.Tests.Models.ITestLaunchParameters launchParams) [0x0001c] in /Users/uitest/Projects/MobileApp/FishAngler.UI.Tests/Initialization/Mobile/iOSUITestLaunchController.cs:25

ExitCode: 65

Not working for me With Xcode12.2
TestCloud Agent : 0.22.1
Xamarin UI test : 3.0.11

Getting below Error
SetUp : Application failed to launch! Failed to launch simulator

ExitCode: 134
0 CoreFoundation 0x00007fff2e2bad07 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff670255bf objc_exception_throw + 48
10 FBSimulatorControl 0x000000010b67a35f +[FBSimulator fromSimDevice:configuration:launchdSimProcess:containerApplicationProcess:set:] + 303
11 FBSimulatorControl 0x000000010b67d7da -[FBSimulatorInflationStrategy inflateSimulators:availableDevices:previouslyIdentifiedContainerApplications:] + 1082
12 FBSimulatorControl 0x000000010b67d2ba -[FBSimulatorInflationStrategy inflateFromDevices:exitingSimulators:] + 1194
13 FBSimulatorControl 0x000000010b64350a -[FBSimulatorSet allSimulators] + 138
14 FBSimulatorControl 0x000000010b640dc3 -[FBSimulatorSet query:] + 163
15 iOSDeviceManager 0x000000010b3de33f +[Simulator withID:] + 247
16 iOSDeviceManager 0x000000010b3d696c +[Device withID:] + 118
17 iOSDeviceManager 0x000000010b3d9cbe +[Command simulatorFromArgs:] + 163
18 iOSDeviceManager 0x000000010b3e5d38 +[LaunchSimulatorCommand execute:] + 20
19 iOSDeviceManager 0x000000010b3dc72f +[CLI process:] + 1101
2 CoreFoundation 0x00007fff2e2e3ec8 +[NSException raise:format:arguments:] + 88
20 iOSDeviceManager 0x000000010b3c8269 main + 121
21 libdyld.dylib 0x00007fff681cccc9 start + 1
22 ??? 0x0000000000000004 0x0 + 4
3 Foundation 0x00007fff309cef3d -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 191
4 FBSimulatorControl 0x000000010b63b655 +[FBSimulatorConfiguration makeDefaultConfiguration] + 517
5 FBSimulatorControl 0x000000010b63b404 __48+[FBSimulatorConfiguration defaultConfiguration]_block_invoke + 36
6 libdispatch.dylib 0x00007fff68173658 _dispatch_client_callout + 8
7 libdispatch.dylib 0x00007fff681747de _dispatch_once_callout + 20
8 FBSimulatorControl 0x000000010b63b3b8 +[FBSimulatorConfiguration defaultConfiguration] + 136
9 FBSimulatorControl 0x000000010b680bc7 +[FBSimulatorConfiguration(CoreSimulator) inferSimulatorConfigurationFromDevice:error:] + 679
(
)
* First throw call stack:
2020-12-03 16:37:03.257 iOSDeviceManager[5238:124768]
Assertion failure in +[FBSimulatorConfiguration makeDefaultConfiguration], /Users/admin/git/FBSimulatorControl/FBSimulatorControl/Configuration/FBSimulatorConfiguration.m:65
2020-12-03 16:37:03.258 iOSDeviceManager[5238:124768] *
* Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Could not obtain OS for Default Device 'Model 'iPhone 6''. Available OS Versions []'
libc++abi.dylib: terminating with uncaught exception of type NSException
TearDown : System.NullReferenceException : Object reference not set to an instance of an object

What I'm observing after the update is that Xamarin UI tests are running terribly slowly on iOS 14.2.
One simulator test takes up to 5 minutes (locally as well as in Azure pipeline builds) on 14.2 whereas testing on 13.5 with the same device simulator finishes in 1.5 minutes.

What I'm observing after the update is that Xamarin UI tests are running terribly slowly on iOS 14.2.
One simulator test takes up to 5 minutes (locally as well as in Azure pipeline builds) on 14.2 whereas testing on 13.5 with the same device simulator finishes in 1.5 minutes.

We noticed the same on our project, and is affecting the execution on AppCenter. With the previous version, the tests run succeed but now, that the time for each test was increased, appcenter is failing with timeout and we have to split into different series. In my opinion, this should be raised as an issue itself.

Guys,

Can anyone tell me if they have this working and what versions of Xamarin.UITest, Xamarin.TestCloud.Agent, Xcode, VS for Mac and iOS simulator you're using.

I'm getting this error..

Could not find key applesdkroot

I'm just trying to get this working again on the simulator.

The Xamarin.TestCloud.Agent app doesn't even appear for me in the simulator.
I do have the Xamarin.Calabash.Start(); call in AppDelegate.cs

I did try a lower version of Xcode 11.4, but VS for mac complained and I couldn't use it..

Spent a couple of hours on this yesterday and couldn't get it to work... :(

Thanks in advance.

I just wanted to report back, that I have got this working, although the applesdk error still occurs, but only if you have the system.execeptions breakpoint enabled... Here's my notes of how I got up and running... it might help me or you in the future.

The following works..

UI Proj
NUnit 3.13.1
Xamarin.UITest 3.0.15

iOS
Testcloud 0.22.2
Xamarin 4.8 or 5.0

Xcode
12.4

Simulator
iPhone 8 12.4

_app = ConfigureApp
    .iOS
    .DeviceIdentifier(SimIdiPhone8iOS124)
    .PreferIdeSettings()
    .Debug()
    .InstalledApp(IpaBundleId)
    .StartApp();

Turn off System.Execptions !!! this give all sorts of weird messages like :-
Could not find key applesdkroot

We have a build scheme which has the debug constant to allow for the calibash call to run in AppDelegate.cs, so make sure enable that it you have one (Debug-Pipeline scheme).

Clean build of Debug-pipline
Delete obj / bin
Restore nuggets
Rebuild

Install the app first on your simulator iOS 12.4

Also open the test manager tab in VS and pick the test you want to run for iOS or Android and debug run to see it running.

However, if all else fails, try system exceptions… you may find the simulator doesn’t exist… Run this to check. You can use SimSim copy path, it’s the first guid you want...
xcrun simctl list

Once you run your test be patient!!!

If all else fails, try a test app with UI testing.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vonovak picture vonovak  Â·  3Comments

galfonso777 picture galfonso777  Â·  3Comments

DouglasMarq picture DouglasMarq  Â·  4Comments

master-lincoln picture master-lincoln  Â·  3Comments

sklmnv picture sklmnv  Â·  3Comments