21

While I'm running UITests on Simulator with Xcode 7, it's failed when invoking XCUIApplication().launch() with App accessibility isn't loaded

enter image description here

Senseful
  • 86,719
  • 67
  • 308
  • 465
Quanlong
  • 24,028
  • 16
  • 69
  • 79
  • 3
    I am hitting this issue as well. When I run UI Tests from Xcode7 (command + U) then all UI tests succeed. When I run them using Xcode Bot, then some or all UI tests fail with this reason "App accessibility isn't loaded". – Anand Sep 22 '15 at 16:35
  • 1
    I'm getting this, and notice that the app will eventually load and test(s) proceed after waiting exactly 1 minute. Deleting the app off the device and it runs fine the first time. Then hangs 1 minute each time after. (xcode 7.0.1) – Miro Oct 06 '15 at 16:28
  • Were you able to solve this issue? I am facing the same issue in xcode 7.2 – rahul Jan 06 '16 at 11:46

4 Answers4

2

this is a known bug in Xcode bot, usually happens on large server code bases. It's already been filed by Apple Developers (myself as well), and they're 'fixing' it.

Hope this helps.

bneely
  • 9,083
  • 4
  • 38
  • 46
TechnicalTophat
  • 1,655
  • 1
  • 15
  • 37
0

If you run tests inside CI system under your control, you could possibly reset simulators before running the UI tests. That way the bug is workarounded.

You could reset simulators from command line with following command:

xcrun simctl list | awk -F "[()]" '{ for (i=2; i<NF; i+=2) print $i }' | grep '^[-A-Z0-9]*$' | xargs -I uuid xcrun simctl erase uuid

As pointed in this SO thread you could also use(however I didn't try it):

xcrun simctl erase all

Community
  • 1
  • 1
hris.to
  • 6,235
  • 3
  • 46
  • 55
0

Restarting the device got rid of this issue for me. (I was using a real device not a simulator)

0

I got this error following a crash in the test app in CI. In my case, I successfully reproduced the issue locally, then it was easy to see that it crashes (a crash alert appears) and to investigate and fix the error. In my case the alert was also written to stderr, but on the CI it was not redirected to the logs. If I couldn't repro locally, my next step was to find a way to redirect stderr & stdout to logs.

MaMazav
  • 1,773
  • 3
  • 19
  • 33