fastlane-old / scan

The easiest way to run tests of your iOS and Mac app
https://fastlane.tools
221 stars 25 forks source link

Simulator is not started #26

Closed yakimant closed 8 years ago

yakimant commented 9 years ago

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!

xfreebird commented 9 years ago

@yakimant mostly likely you have a slow machine. are your running on a CI box or manually from command line ?

@KrauseFx in xctest that was tackled by retrying the execution of tests if such a message would appear.

yakimant commented 9 years ago

It was on my laptop. I cant increase timeout to be sure. But even can't see the simulator window opening.

Also - We had such case on CI with plain xcodebuild and fixed it with simulator running We also have some projects not failing with this issue. It must be some xcodebuild error.

xfreebird commented 9 years ago

@yakimant have you checked the xcodebuild log ? ~/Library/Logs/scan

yakimant commented 9 years ago

Hmm, it suddenly disappeared. Will play around and post here the updates.

yakimant commented 8 years ago

Ok, I'm getting this issue even with -destination-timeout 500. From log I can't see anything suspicious.

xfreebird commented 8 years ago

-destination-timeout is for real devices, it doesn't help when using simulators

yakimant commented 8 years ago

Anyway, it didn't help, so I'm starting the simulator manually as before: Process.fork { system "xcrun instruments -t 'Blank' -l 1 -w '#{options[:device] } (#{options[:os]})'" } And killing afterwards: killall "Simulator"

yakimant commented 8 years ago

Should this be closed? I can think of two ways of fix: 1) add scan parameter to run/stop simulator explicitly 2) add run/stop simulator actions

alexanderjrobinson commented 8 years ago

I am seeing the same issue. Runs fine on my local machine but not on my CI server which is a reasonably powerful Mac Mini. It works sometimes but more often than not the build fails waiting on the simulator.

In my case the simulator is launched (possibly from a previous build), so it is at least launching the simulator.

nitinalabur commented 8 years ago

Runs fine on my CI server, when I run it myself, but fails when jenkins on the same machine tries to run scan as part of a lane. (getting the 120 second timeout error)

scottrhoyt commented 8 years ago

+1. Good on local. Fails on CI running on a VM (Bitrise).

alexanderjrobinson commented 8 years ago

Any update or workaround for this issue?

scottrhoyt commented 8 years ago

My workaround is to test using xctool as opposed to scan.

scottrhoyt commented 8 years ago

Anyone able to verify if this is fixed in 7.2.1:

Command line tool 'xcodebuild test' will no longer time out waiting for Simulator.app to launch

alexanderjrobinson commented 8 years ago

I am still seeing the same issue on the CI server after upgrading to 7.2.1.

iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.

fastlane-bot-helper commented 8 years ago

This issue was migrated to https://github.com/fastlane/fastlane/issues/1943. Please post all further comments there.

fastlane is now a mono repo, you can read more about the change in our blog post. All tools are now available in the fastlane main repo :rocket: