# iOS app only crashes during automation

**URL:** <https://discuss.appium.io/t/ios-app-only-crashes-during-automation/2869>\
**Category:** Support\
**Created:** [February 14, 2015, 1:58am UTC](https://discuss.appium.io/t/ios-app-only-crashes-during-automation/2869 "2015-02-14T01:58:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![awang](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/9fc348/32.png) [@awang](https://discuss.appium.io/u/awang)\
**Post date:** [February 14, 2015, 1:58am UTC](https://discuss.appium.io/t/ios-app-only-crashes-during-automation/2869/1 "2015-02-14T01:58:03Z")

</div>

An iOS 8 application I’m testing crashes consistently at the same point in the automation code. I can not reproduce it manually, and I was able to pull some crash logs to ask my devs what’s up. From the following line in the logs, they say it’s something wrong with Apple’s Instruments tool:  
14 AddressBookUIFramework 0x180f62b68 -[AddressBookUIAccessibilityUITableView accessibilityLabel] + 324

What options do I have left? I was hoping that perhaps some change in the app code in the future will avoid this problem, but I really wouldn’t like to rely on blind luck like that. I was thinking about upgrading from Xcode 6.1 to a 6.2 beta, but then I see that 6.2 beta can only support simulators and not devices.

Has anyone encountered this issue before, and how did they solve it? Is there some specific way of doing things in the app that will cause automation to fail from a crash?

I’ll try a 6.2 beta to see if I can at least get something running with the simulator.

---

<div class="post-metadata">

**Author:** ![awang](https://discuss.appium.io/letter_avatar_proxy/v4/letter/a/9fc348/32.png) [@awang](https://discuss.appium.io/u/awang)\
**Post date:** [February 19, 2015, 11:03pm UTC](https://discuss.appium.io/t/ios-app-only-crashes-during-automation/2869/2 "2015-02-19T23:03:34Z")

</div>

So, using Xcode 6.2 beta does not solve the solution (as I had desperately hoped it would), but I did find some weird things going on. I stepped through the application code using a debugger, and I could see that an exception was thrown inside Apple’s library.

Currently, my best guess is that some issue in Apple’s libraries throws an exception when instruments is running the app. Specifically, there seems to be some issue with passing the message [UITableView dequeueReusableCellWithIdentifier:forIndexPath:], which throws an NSInternalInconsistencyException.

Fortunately, we found a way to cause the crash outside Instruments (and thus, outside of automation) by following the same procedure as automation on an iOS 8.1.1 device.

---

<div class="post-metadata">

**Author:** ![tanushri\_raich](https://discuss.appium.io/user_avatar/discuss.appium.io/tanushri_raich/32/10401_2.png) [@tanushri\_raich](https://discuss.appium.io/u/tanushri_raich)\
**Post date:** [August 16, 2022, 1:10pm UTC](https://discuss.appium.io/t/ios-app-only-crashes-during-automation/2869/3 "2022-08-16T13:10:16Z")

</div>

Hello @awang

Even I am facing the similar issue. Did you get any chance to resolve this ? If yes I would like to know how it was resolved, as I am really stuck on this.

Appreciate your help.
