Tests starts only when simulator is loaded for the second time

Hello guys,

I am facing the following issue and cannot understand what is the problem causing it:

whenever I run my tests simulator launches fine with correct app already installed, however, in hangs up on the first page of the app and does nothing. Then after 5-10 seconds it restarts (the simulator) and when it launches for the 2nd time it is then able to complete my test.

Has anyone had this happen and can help me fix this? It’s a waste of time because for every test case it has to relaunch meaning i am probably wasting around 15-20seconds x Amount of test cases.

Yeah it detected a failure and restarted itself. You may try to change the launchTimeout.

But it launches the app in the simulator correctly the first time. I can actually interact with it just fine, so Im not sure why it relaunches then?

Some event didn’t happen in the time allocated, then stopping it also take time, it is why I suggested to increase the launch timeout.

I’ve tried this and looks like it helped a little bit. I barely increased the wait time and seems like now it doesn’t restart all the time. I might be wrong though. I’ll play with this setting a bit more and see if I can find that fine line between waiting for too long and waiting just enough so the sim wouldn’t restart.
Thanks @sebv

You may be able to get more launchTimeout granularity like this:
launchTimeout: {global: 60000, afterSimLaunch: 10000},