Appium: Appium sometimes fails to kill the iOS simulator, then subsequently fails to start when the previous emulator is still in 'booted' state

Created on 28 Sep 2016  路  3Comments  路  Source: appium/appium

The problem

In long test runs, we're seeing situations where the emulator fails to shut down from driver.quit, leaving a booted simulator running in the background. Subsequent tests all fail to launch the emulator due to:

"2016-09-27 09:35:32:148 - [iOSSim] Simulator not shut down: iPhone 6 (undefined, udid: 148C4D52-B03F-4781-BF69-CF0043B49C33) is still in state 'booted'"

It's unclear what puts the simulator in this state, or why appium fails to quit the driver on client().quit() and stop all the the simulator processes.

In any case, it seems like appium should kill instruments/simulators during the simulator launch/retry loop, rather than giving up when it detects an emulator that isn't shut down.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.5.3
  • Last Appium version that did not exhibit the issue (if applicable): 1.4.8
  • Desktop OS/version used to run Appium: OSX 10.10.5
  • Node.js version (unless using Appium.app|exe): 4.4.0
  • Mobile platform/version under test: iOS 9.0 / iPhone 6
  • Real device or emulator/simulator: simulator
  • Appium CLI or Appium.app|exe: CLI

    Details

N/A

Link to Appium logs

You can see a failed AppiumDriver.deleteSession(), then the fialure to shut down the simulator by appium. This is followed by relaunch of appium (this is handled in our test code) and another failure due to the persisted emulator from previous.
https://gist.github.com/vicwomg/88e3e37bc1e2790d19d1fe830afb35a3

Code To Reproduce Issue [ Good To Have ]

Have not found a way to reliably reproduce

Bug P3 iOS

Most helpful comment

As a workaround you can try to kill the Simulator and its daemon using _killall_ before starting the driver:

killall Simulator launchd_sim ids_simd configd_sim xpcproxy_sim

All 3 comments

As a workaround you can try to kill the Simulator and its daemon using _killall_ before starting the driver:

killall Simulator launchd_sim ids_simd configd_sim xpcproxy_sim

Closed as obsolete

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings