question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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 ]

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:20 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
huig1149commented, Oct 20, 2016

@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)]

1reaction
imurchiecommented, May 16, 2016

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve [MJSONWP] Encountered internal Could not ...
[MJSONWP] Encountered internal error running command: Error: Could not connect to a valid app after 20 tries. at Object.wrappedLogger.
Read more >
An unknown server-side error occurred while processing the ...
Unable to launch iOS application when trying to inspect element using appium desktop ... Original error: Failed to receive any data within the...
Read more >
VS for Mac 2022 Preview 7 can't launch iOS app in debug mode
When try to run my app on iphone simulator 15.4 i get “error HE0042: Could not launch the app 'xxx' on the device...
Read more >
appium/appium - Gitter
I am trying to get Appium desktop up and running to test an Ionic/cordova mobile application. When is set autoWebview = true, the...
Read more >
Simulator ARM64 Support for Static Libraries in M1 Machines
When we run in M1 Macbooks we are unable to run on arm64 simulators and get the following error: building for iOS Simulator,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found