XCUITest crashes when recording

When doing UI Test Recording and entering a TextField, XCode aborts.


In the crash dump it says that its an internal inconsistency: "ancestorFinder is not being processed by childNodeFinders"

Swift is used as the recording language.


Crashed Thread: 20 Dispatch queue: XCUIRecorder_iOS.processingQueue



Exception Type: EXC_CRASH (SIGABRT)

Exception Codes: 0x0000000000000000, 0x0000000000000000



Application Specific Information:

ProductBuildVersion: 7A152u

UNCAUGHT EXCEPTION (NSInternalInconsistencyException): ancestorFinder is not being processed by childNodeFinders

UserInfo: (null)

Hints: None

Backtrace:

0 0x00007fff8a867024 __exceptionPreprocess (in CoreFoundation)

1 0x0000000103776cf8 DVTFailureHintExceptionPreprocessor (in DVTFoundation)

2 0x00007fff8c94976e objc_exception_throw (in libobjc.A.dylib)

3 0x00007fff8a866e1a +[NSException raise:format:arguments:] (in CoreFoundation)

4 0x00007fff8615e8cb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] (in Foundation)

5 0x0000000105cfabc8 +[XCUIRecorderNodeFinder nodeToFindElementForSnapshots:language:platform:] (in XCTest)

6 0x0000000105ccb86b __167-[XCUIRecorder_iOS _XCT_recordedEventNames:duration:startLocation:startElementSnapshot:startApplicationSnapshot:endLocation:endElementSnapshot:endApplicationSnapshot:]_block_invoke (in XCTest)

7 0x00007fff897e8323 _dispatch_call_block_and_release (in libdispatch.dylib)

8 0x00007fff897e3c13 _dispatch_client_callout (in libdispatch.dylib)

9 0x00007fff897e7365 _dispatch_queue_drain (in libdispatch.dylib)

10 0x00007fff897e8ecc _dispatch_queue_invoke (in libdispatch.dylib)

11 0x00007fff897e66b7 _dispatch_root_queue_drain (in libdispatch.dylib)

12 0x00007fff897f4fe4 _dispatch_worker_thread3 (in libdispatch.dylib)

13 0x00007fff8e128637 _pthread_wqthread (in libsystem_pthread.dylib)

14 0x00007fff8e12640d start_wqthread (in libsystem_pthread.dylib)


abort() called



Application Specific Signatures:

NSInternalInconsistencyException



Application Specific Backtrace 1:

0 CoreFoundation 0x00007fff8a86703c __exceptionPreprocess + 172

1 DVTFoundation 0x0000000103776cf8 DVTFailureHintExceptionPreprocessor + 194

2 libobjc.A.dylib 0x00007fff8c94976e objc_exception_throw + 43

3 CoreFoundation 0x00007fff8a866e1a +[NSException raise:format:arguments:] + 106

4 Foundation 0x00007fff8615e8cb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195

5 XCTest 0x0000000105cfabc8 +[XCUIRecorderNodeFinder nodeToFindElementForSnapshots:language:platform:] + 2336

6 XCTest 0x0000000105ccb86b __167-[XCUIRecorder_iOS _XCT_recordedEventNames:duration:startLocation:startElementSnapshot:startApplicationSnapshot:endLocation:endElementSnapshot:endApplicationSnapshot:]_block_invoke + 1758

7 libdispatch.dylib 0x00007fff897e8323 _dispatch_call_block_and_release + 12

8 libdispatch.dylib 0x00007fff897e3c13 _dispatch_client_callout + 8

9 libdispatch.dylib 0x00007fff897e7365 _dispatch_queue_drain + 1100

10 libdispatch.dylib 0x00007fff897e8ecc _dispatch_queue_invoke + 202

11 libdispatch.dylib 0x00007fff897e66b7 _dispatch_root_queue_drain + 463

12 libdispatch.dylib 0x00007fff897f4fe4 _dispatch_worker_thread3 + 91

13 libsystem_pthread.dylib 0x00007fff8e128637 _pthread_wqthread + 729

14 libsystem_pthread.dylib 0x00007fff8e12640d start_wqthread + 13

Replies

This is a known bug in the beta. I believe it's written in the Release Notes under Known Issues.

Still not working in beta5, issue 22205667 submitted.


Its a complex control, so as you say probably covered by issue 20577276.


Thanks for the bug report!

This is still occuring for me in the GM Seed. Any workaround?

Please make sure that you file a bug report (using the Report Bugs link at the bottom of this page). We're currently not making progress on this issue, for lack of actionable information. Thanks!

I use the "Send Report" option when this happens to me (almost every time I try to record).

What additional info do you require to make progress on this issue?

I get the same crash in XCode 7.2 using the simulator when I try and enter data into a textfield. It crashes when I press the key to switch from alpha to numeric keys, i.e. the ".?123" key.


Reports yesterday as bug 23904321


Steps to Reproduce:

1. Using UIRecording on Xcode with device set to iPad Air

2. I enter an alpha character in a text field, this works fine,

3. then I want to enter a numeric "0" so I press the ".?123" key

4. Xcode crashes.

I also see this problem with xcode 7.2.

Yes, this problem still persists with Version 7.2 (7C68).

I am getting this same crash, though not with a text field. I have reported it in Radar 24857135.


Currently I get an error when I try to attach the supporting files in Radar, and also I get an error when pasting log contents here: "The message contains invalid characters" so I'm unable to provide detailed diagnostics.

(Radar file upload is now working -- crash logs have been sent)

Do you have

continueAfterFailure = false

in you setUp method and tried disabling it?


Worked for me

I am using Xcode 8 GM version also getting the same error and disabling the "continuAfterFailure = false" is not worked for me.

Still an issue in Xcode 8. Is Apple going to Address this?

Still an issue in Xcode 8. Is Apple going to Address this?

AFAICT none of the bugs referenced by this thread are still open. Moreover, all except one were closed with actual fixes. So, if you’re still having problems with this in Xcode 8 then it’s well worthwhile filing your own bug report about this.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!”
Apple Developer Relations, Developer Technical Support, Core OS/Hardware

let myEmail = "eskimo" + "1" + "@apple.com"