fastlane: Simulator is not started
|
|
Original issue by @yakimant - Imported from fastlane/scan#26 |
I’ve got this issue:
2015-10-30 16:56:05.815 xcodebuild[53793:347720] iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.
I’ve got it before tunning xcodebuild (xctool didn’t have this issue). It is solved by running the simulatore (instrument -w or ios-sim).
But maybe it can be solved inside scan?
Appreciate you work!
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 24 (16 by maintainers)
I use a slightly modified version that accepts the device name as parameter:
Sample usage:
This works well for me. No more stalling builds.
@nitinalabur Just a quick addition: if your simulator is not running yet, the script will fail because
killallreturns 1. If you change it to this it will work:killall "Simulator" || trueI have a solution that works for me. I was trying to run scan from Jenkins on a mac mini server, and would often have the issue (“Timed out waiting for 120 seconds…”).
Problem was with the current selected iOS simulator (if you were to launch the app on mac through spotlight or finder) not matching the device I was setting for Scan.
Here’s the fastlane lane I run on jenkins
If the iOS simulator is set to iPhone 4s and the device selected in the Scan:Device parameter is iPhone 4s, no issues.
So, before running any fastlane commands on Jenkins, I run this shell script
the above code is just a slight variation (iPhone type) based on jasontaft’s super helpful code/comment here . if you wish to use a simulator for any other device, all you need to do is make the tweak I made.
With this, when I hit “Build Now”, it runs my ‘ios test’ lane as expected, without any hiccups. Hope this helps!
@nitinalabur Thanks so much for sharing. I’m glad to hear you are up and running. Hope that you have a wonderful week!
Something I have noticed as to why this happens: if the CI simulator is not matching that of your fastfile/scanfile (e.g., CI has it set as iPhone 4S and your Fastlane sets it as 5s) this issue persists.
When you run scan/Fastlane on your local machine, whichever hardware pops up in your iOS simulator, set that as the device to test against in your scan/fast file