appium: Failed to launch simulator with [MJSONWP] Encountered internal error running command: Error: Condition unmet after xxxx ms. Timing out.

The problem

Failed to launch simulator in ios sim reset flow.

Environment

  • Appium version (or git revision) that exhibits the issue:
    • Appium 1.5.2
  • Last Appium version that did not exhibit the issue (if applicable):
    • Appium 1.4.16
  • Desktop OS/version used to run Appium:
    • Mac OS X 10.11.4
  • Node.js version (unless using Appium.app|exe):
    • v4.2.4
  • Mobile platform/version under test:
    • iOS SDK 9.2
    • Xcode 7.2
  • Real device or emulator/simulator:
    • simulator
  • Appium CLI or Appium.app|exe:
    • Appium CLI

And

  • use ruby_lib 8.0.2

Details

  • When I tried to start and launch test, then ios simulator never launch and repeated timeout error.
    • [MJSONWP] Encountered internal error running command: Error: Condition unmet after 60239 ms. Timing out.
  • Once restart Machine(Mac OS X 10.11), then some times fixed it and could run test. But after some running tests, this issue happened again.
  • According to stackoverflow here, this issue is fixed sometimes if I re-install Xcode and its commandline tools. But this issue reproduced again.
  • According to the following error log, I attached as Appium log, this problem may start to reproduce after failed to set locale with 500 error.

Link to Appium logs

Code To Reproduce Issue [ Good To Have ]

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

@KazuCocoa I solve the similar problew by reinstalling ideviceinstaller and libimobiledevice. You need the latest libimobiledevice, in the Appium 1.5.3 version. Open the Terminal, type the commands below:

  1. brew uninstall ideviceinstaller
  2. brew uninstall libimobiledevice
  3. brew install --HEAD libimobiledevice
  4. brew link --overwrite libimobiledevice
  5. brew install ideviceinstaller
  6. brew link --overwrite ideviceinstaller

It may work for you.

Refer to Michael Gallacher: [(http://stackoverflow.com/questions/38609898/ideviceinstaller-l-wont-show-the-app-list-on-the-iphone)]

@KazuCocoa Sorry, this slipped through my notice.

The issue is with the devices that are disconnected or unavailable. The system is waiting for everything to be shutdown. I am going to look at whether it is possible to expand this a little.