Search code examples
swiftxcodetestingxcode-ui-testing

Swift XCTest - "Someone is calling _accessibilityChildren recursively. That's just asking for trouble."


Im just starting to create UITests for my app using the record feature in Xcode, and I'm able to launch the app and login, but once my app hits the home screen in the test, things freeze and I get console output stating [Accessibility] Someone is calling _accessibilityChildren recursively. That's just asking for trouble.

This output prints roughly 5 times over 5 seconds before the app crashes, and the application does NOT crash during normal use - only testing.

The home screen of my app is just a simple UITableView, but the cells contain a custom view that use animations (maybe a source of concern?). I've googled the output and nothing comes up, so I have no idea where to begin. Am I missing something in my tests that could cause this??


Solution

  • Finally figured it out. It turns out that a pod that I had installed was the culprit. For me specifically it was the MXParallaxHeader library. I'm still not sure why everything works without this library since it wasn't being used on the screens that I was testing, but removing this pod fixed everything.

    This might not be the case for everyone, but if anyone else runs into this issue, start by checking your podfile and working with the pods you have installed.

    I'll also be notifying the maker of this library of the potential issue.