Timed out waiting 120 seconds for simulator to boot

旧巷老猫 提交于 2019-12-01 14:20:03

问题


It looks like Teamcity agent (TC version is 9.0 EAP) can't run iOS Simulator via testing shell script.

I am using Build Step: Command Line, which running Custom Script and passing params to it. Teamcity agent was launched on Mac OS X Yosemite 10.10 by using shell script ../bin/mac.launchd.sh.

Error from Build Log:

[12:33:24][Step 2/2] 2014-11-20 11:33:25.421 xcodebuild[28083:289783]  iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.
[12:33:24][Step 2/2] 
[12:33:24][Step 2/2] Testing failed:
[12:33:24][Step 2/2] Test target app-tests encountered an error (Timed out waiting 120 seconds for simulator to boot, current state is 1. If you believe this error represents a bug, please attach the log file at /var/folders/sz/1lfcb1354xggcnd04_9j5kc40000gp/T/com.apple.dt.XCTest-status/Session-2014-11-20_11:31:25-P1Pjwd.log)
[12:33:24][Step 2/2] ** TEST FAILED **

My shell script for testing:

xcodebuild \
    -sdk iphonesimulator8.1 \
    -destination "name=iPad Air,OS=8.1" \
    -configuration Debug \
    -project "$PROJECTPATH" \
    -scheme app-tests \
    CONFIGURATION_BUILD_DIR="$BUILDPATH" \
    clean test \
    | xcpretty -tc -r junit --output "$BUILDPATH/junit.xml"

I also tried solution from this question but it didn't helped me.


回答1:


This has been answered in the comments, and also here is a link to apple forums talking about it, AFAIK, its still the case that this isn't possible until apple changes it

https://devforums.apple.com/message/1040016#1040016




回答2:


It can happen that your custom scripts are taking too long to finish. I was able to replicate this issue by adding a custom script in build phase to sleep for 5000 seconds.



来源:https://stackoverflow.com/questions/27035637/timed-out-waiting-120-seconds-for-simulator-to-boot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!