fastlane: snapshot: Still getting simulator timeouts
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
Last weekend i ran into the issue that snapshot states “iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.”. I tried the workaround by setting the environment variable beforehand as stated in Issue #3921 by calling FASTLANE_EXPLICIT_OPEN_SIMULATOR=1 snapshot
.
What i still see is that the output says
Explicitly opening simulator for device: iPhone 4s
but the iPhone 6s Plus simulator is launched and then the last message states
2016-06-13 09:55:19.672 xcodebuild[25888:434446] iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.
Complete output when running fastlane, including the stack trace and command used
root# FASTLANE_EXPLICIT_OPEN_SIMULATOR=1 snapshot
[17:04:51]: xcrun xcodebuild -list -workspace ./bIT\ Planning\ Poker.xcworkspace
2016-06-14 17:04:51.430 xcodebuild[8201:92330] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
2016-06-14 17:04:51.640 xcodebuild[8201:92331] Failed to locate a valid instance of CoreSimulatorService in the bootstrap. Adding it now.
+----------------------------+-----------------------------------------------------------------------+
| Summary for snapshot 1.12.3 |
+----------------------------+-----------------------------------------------------------------------+
| languages | ["en-US", "de-DE"] |
| output_directory | /Users/martinbrandt/iOS/iOS_Dev/Projects/bIT PlanningPok... |
| clear_previous_screenshots | true |
| workspace | ./bIT Planning Poker.xcworkspace |
| erase_simulator | true |
| reinstall_app | true |
| scheme | bridgingIT Planning Poker |
| devices | ["iPhone 4s", "iPhone 5", "iPhone 6", "iPhone 6 Plus", "iPad Retina"] |
| launch_arguments | [""] |
| ios_version | 9.3 |
| skip_open_summary | false |
| localize_simulator | false |
| buildlog_path | ~/Library/Logs/snapshot |
| clean | false |
| number_of_retries | 1 |
| stop_after_first_error | false |
+----------------------------+-----------------------------------------------------------------------+
[17:04:52]: Clearing previously generated screenshots
[17:04:52]: Building and running project - this might take some time...
[17:04:52]: Patching '/var/root/Library/Preferences/com.apple.iphonesimulator.plist' to scale simulator to 100%
[17:04:52]: Erasing iPhone 4s...
[17:04:52]: Explicitly opening simulator for device: iPhone 4s
2016-06-14 17:04:53.348 xcodebuild[8252:92719] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
[17:04:54]: -------------------------
[17:04:54]: --- iPhone 4s - en-US ---
[17:04:54]: -------------------------
[17:04:54]: $ set -o pipefail && xcodebuild -workspace ./bIT\ Planning\ Poker.xcworkspace -scheme bridgingIT\ Planning\ Poker -derivedDataPath '/var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/snapshot_derived20160614-8197-7we19i' -destination 'platform=iOS Simulator,id=C2689397-FFF0-400C-B2A0-07991BC91C63,OS=9.3' build test | tee /var/root/Library/Logs/snapshot/bridgingIT\ Planning\ Poker-bridgingIT\ Planning\ Poker.log | xcpretty
[17:04:54]: ▸ Loading...
[17:04:54]: ▸ 2016-06-14 17:04:54.332 xcodebuild[8262:92809] [MT] PluginLoading: Required plug-in compatibility UUID ACA8656B-FEA8-4B6D-8E4A-93F4C95C362C for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
[17:04:55]: ▸ Building Pods/FontAwesome.swift-FontAwesome.swift [Debug]
[17:04:55]: ▸ Check Dependencies
[17:04:55]: ▸ Processing ResourceBundle-FontAwesome.swift-Info.plist
[17:04:55]: ▸ Copying FontAwesome.swift/FontAwesome/FontAwesome.otf
[17:04:55]: Running Tests: ▸ Touching FontAwesome.swift.bundle
[17:04:55]: ▸ Building Pods/SlideMenuControllerSwift [Debug]
[17:04:55]: ▸ Check Dependencies
[17:04:57]: ▸ Copying Info.plist
[17:04:57]: ▸ Processing Info.plist
[17:04:59]: ▸ Compiling SlideMenuController.swift
[17:05:16]: ▸ Compiling SlideMenuControllerSwift-dummy.m
[17:05:17]: ▸ Compiling SlideMenuControllerSwift_vers.c
[17:05:17]: ▸ Linking SlideMenuControllerSwift
[17:05:17]: ▸ Copying SlideMenuControllerSwift-umbrella.h
[17:05:17]: ▸ Copying SlideMenuControllerSwift.h
[17:05:17]: Running Tests: ▸ Touching SlideMenuControllerSwift.framework
[17:05:17]: ▸ Building UITestServer/UITestServer [Debug]
[17:05:17]: ▸ Check Dependencies
[17:05:17]: ▸ Processing Info.plist
[17:05:17]: ▸ Compiling UITestServer.swift
[17:05:17]: ▸ Compiling HttpHandlers.swift
[17:05:17]: ▸ Compiling HttpParser.swift
[17:05:17]: ▸ ⚠️ /Users/martinbrandt/iOS/iOS_Dev/Projects/bIT PlanningPoker/bridgingIT Planning Poker/UITestUtils/UITestUtils/UITestServer/UITestServer/ThirdParty/swifter/Sources/Swifter/HttpParser.swift:57:20: '++' is deprecated: it will be removed in Swift 3
[17:05:17]: ▸ counter++
[17:05:17]: ▸ ^~
[17:05:17]: ▸ Compiling HttpRouter.swift
[17:05:17]: ▸ Compiling HttpServer.swift
[17:05:17]: ▸ Compiling Socket.swift
[17:05:17]: ▸ Compiling HttpServerIO.swift
[17:05:17]: ▸ Compiling Const.swift
[17:05:17]: ▸ Compiling HttpResponse.swift
[17:05:17]: ▸ ⚠️ /Users/martinbrandt/iOS/iOS_Dev/Projects/bIT PlanningPoker/bridgingIT Planning Poker/UITestUtils/UITestUtils/UITestServer/UITestServer/ThirdParty/swifter/Sources/Swifter/HttpResponse.swift:25:40: conditional cast from 'AnyObject' to 'AnyObject' always succeeds
[17:05:17]: ▸ guard let obj = object as? AnyObject where NSJSONSerialization.isValidJSONObject(obj) else {
[17:05:17]: ▸ ^
[17:05:17]: ▸ Compiling String+Misc.swift
[17:05:17]: ▸ Compiling HttpRequest.swift
[17:05:17]: ▸ ⚠️ /Users/martinbrandt/iOS/iOS_Dev/Projects/bIT PlanningPoker/bridgingIT Planning Poker/UITestUtils/UITestUtils/UITestServer/UITestServer/ThirdParty/swifter/Sources/Swifter/HttpRequest.swift:114:43: 'init(start:end:)' is deprecated: it will be removed in Swift 3. Use the '..<' operator.
[17:05:17]: ▸ body.removeRange(Range<Int>(start: body.count-matchOffset, end: body.count))
[17:05:17]: ▸ ^
[17:05:17]: ▸ Compiling UITestServer_vers.c
[17:05:17]: ▸ Compiling PrivateUtils.m
[17:05:17]: ▸ Linking UITestServer
[17:05:17]: ▸ Copying PrivateUtils.h
[17:05:17]: ▸ Copying UITestServer.h
[17:05:17]: ▸ Copying UITestServer/ThirdParty/swifter/LICENSE
[17:05:17]: Running Tests: ▸ Touching UITestServer.framework
[17:05:17]: ▸ Building Pods/FontAwesome.swift [Debug]
[17:05:17]: ▸ Check Dependencies
[17:05:17]: ▸ Processing Info.plist
[17:05:17]: ▸ Compiling Enum.swift
[17:05:17]: ▸ Compiling FontAwesome.swift
[17:05:17]: ▸ Compiling FontAwesome.swift-dummy.m
[17:05:17]: ▸ Compiling FontAwesome_swift_vers.c
[17:05:17]: ▸ Linking FontAwesome_swift
[17:05:17]: ▸ Copying /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/snapshot_derived20160614-8197-7we19i/Build/Products/Debug-iphonesimulator/FontAwesome.swift/FontAwesome.swift.bundle
[17:05:17]: ▸ Copying FontAwesome.swift-umbrella.h
[17:05:17]: Running Tests: ▸ Touching FontAwesome_swift.framework
[17:05:17]: ▸ Building Pods/Pods-bridgingIT Planning Poker [Debug]
[17:05:17]: ▸ Check Dependencies
[17:05:17]: ▸ Processing Info.plist
[17:05:17]: ▸ Compiling Pods-bridgingIT\ Planning\ Poker-dummy.m
[17:05:18]: ▸ Compiling Pods_bridgingIT_Planning_Poker_vers.c
[17:05:18]: ▸ Copying Pods-bridgingIT\ Planning\ Poker-umbrella.h
[17:05:18]: Running Tests: ▸ Touching Pods_bridgingIT_Planning_Poker.framework
[17:05:18]: ▸ Building bridgingIT Planning Poker/bridgingIT Planning Poker [Debug]
[17:05:18]: ▸ Check Dependencies
[17:05:18]: ▸ Running script '[CP] Check Pods Manifest.lock'
[17:05:18]: ▸ Compiling UIViewController.swift
[17:05:20]: ▸ Compiling CALayer+BorderColor.swift
[17:05:20]: ▸ Compiling SwitchCell.swift
[17:05:20]: ▸ Compiling CoffeeCup.swift
[17:05:21]: ▸ Compiling SettingsViewController.swift
[17:05:21]: ▸ Compiling AppDelegate.swift
[17:05:21]: ▸ Compiling CardViewController+Extension.swift
[17:05:21]: ▸ Compiling PokerOptions.swift
[17:05:21]: ▸ Compiling CardViewController.swift
[17:05:21]: ▸ Compiling MenuViewController.swift
[17:05:21]: ▸ Compiling CardCell.swift
[17:05:21]: ▸ Compiling DeckSettingsViewController+Extension.swift
[17:05:21]: ▸ Compiling CardFrontView.swift
[17:05:21]: ▸ Compiling SideBarMenuCell.swift
[17:05:21]: ▸ Compiling SettingsViewController+Extension.swift
[17:05:21]: ▸ Compiling DeckSettingsController.swift
[17:05:21]: ▸ Compiling CardBackView.swift
[17:05:21]: ▸ Linking bridgingIT\ Planning\ Poker
[17:05:21]: ▸ Copying /Users/martinbrandt/iOS/iOS_Dev/Projects/bIT\ PlanningPoker/Podfile
[17:05:21]: ▸ Copying Localizable.strings
[17:05:21]: ▸ Copying Localizable.strings
[17:05:21]: ▸ Copying /Users/martinbrandt/iOS/iOS_Dev/Projects/bIT\ PlanningPoker/Snapfile
[17:05:21]: ▸ Compiling Main.storyboard
[17:05:25]: ▸ Compiling LaunchScreen.storyboard
[17:05:26]: ▸ Processing Info.plist
[17:05:26]: ▸ Running script '[CP] Embed Pods Frameworks'
[17:05:26]: ▸ Running script '[CP] Copy Pods Resources'
[17:05:27]: ▸ Running script 'Increment Build'
[17:05:27]: ▸ Copying /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/snapshot_derived20160614-8197-7we19i/Build/Products/Debug-iphonesimulator/UITestServer.framework
[17:05:27]: Running Tests: ▸ Touching bridgingIT\ Planning\ Poker.app
[17:05:27]: ▸ Build Succeeded
[17:05:27]: ▸ 2016-06-14 17:05:27.798 xcodebuild[8262:92809] [MT] IDETestOperationsObserverDebug: (D23C17C1-720A-448D-A133-51FB3B6AF45E) Beginning test session D23C17C1-720A-448D-A133-51FB3B6AF45E with Xcode 7D1014 on target <DVTiPhoneSimulator: 0x7fabf089ff40> {
[17:05:27]: ▸ SimDevice: SimDevice : iPhone 4s (C2689397-FFF0-400C-B2A0-07991BC91C63) : state={ Shutdown } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-4s } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
[17:05:27]: ▸ } (9.3 (13E230))
[17:05:27]: ▸ 2016-06-14 17:05:27.800 xcodebuild[8262:92816] IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[17:05:27]: ▸ /var/folders/zz/zyxvpxvq6csfxvn_n0000000000000/T/snapshot_derived20160614-8197-7we19i/Logs/Test/46B6F4DB-E6B5-43C6-A93B-676F6E295A46/Session-2016-06-14_17:05:27-LWuI7P.log
[17:05:27]: ▸ Building UITestServer/UITestServer [Debug]
[17:05:27]: ▸ Check Dependencies
[17:05:27]: ▸ Building Pods/FontAwesome.swift-FontAwesome.swift [Debug]
[17:05:27]: ▸ Check Dependencies
[17:05:27]: ▸ Building Pods/SlideMenuControllerSwift [Debug]
[17:05:27]: ▸ Check Dependencies
[17:05:27]: ▸ Building Pods/SimulatorStatusMagic [Debug]
[17:05:27]: ▸ Check Dependencies
[17:05:27]: ▸ Processing Info.plist
[17:05:27]: ▸ Compiling SDStatusBarManager.m
[17:05:28]: ▸ Compiling SDStatusBarOverriderPost8_3.m
[17:05:28]: ▸ Compiling SDStatusBarOverriderPost9_0.m
[17:05:28]: ▸ Compiling SDStatusBarOverriderPost9_3.m
[17:05:28]: ▸ Compiling SDStatusBarOverriderPre8_3.m
[17:05:28]: ▸ Compiling SimulatorStatusMagic-dummy.m
[17:05:28]: ▸ Compiling SimulatorStatusMagic_vers.c
[17:05:28]: ▸ Linking SimulatorStatusMagic
[17:05:28]: ▸ Copying SDStatusBarManager.h
[17:05:28]: ▸ Copying SDStatusBarOverrider.h
[17:05:28]: ▸ Copying SDStatusBarOverriderPost8_3.h
[17:05:28]: ▸ Copying SDStatusBarOverriderPost9_0.h
[17:05:28]: ▸ Copying SDStatusBarOverriderPost9_3.h
[17:05:28]: ▸ Copying SDStatusBarOverriderPre8_3.h
[17:05:28]: ▸ Copying SimulatorStatusMagic-umbrella.h
[17:05:28]: Running Tests: ▸ Touching SimulatorStatusMagic.framework
[17:05:28]: ▸ Building UITestUtils/UITestUtils [Debug]
[17:05:28]: ▸ Check Dependencies
[17:05:28]: ▸ Processing Info.plist
[17:05:28]: ▸ Compiling XCTestCase+DeviceInfo.swift
[17:05:28]: ▸ Compiling XCTestCase+Screenshots.swift
[17:05:28]: ▸ Compiling XCTestCase+Home.swift
[17:05:28]: ▸ Compiling XCTestCase+Wait.swift
[17:05:28]: ▸ ⚠️ /Users/martinbrandt/iOS/iOS_Dev/Projects/bIT PlanningPoker/bridgingIT Planning Poker/UITestUtils/UITestUtils/UITestUtils/UITestUtils/XCTestCase+Wait.swift:35:23: use '#selector' instead of explicitly constructing a 'Selector'
[17:05:28]: ▸ selector: Selector("waitForDurationDone"), userInfo: nil, repeats: false)
[17:05:28]: ▸ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[17:05:28]: ▸ Compiling XCTestCase+Session.swift
[17:05:28]: ▸ Compiling XCTestCase+StatusBar.swift
[17:05:28]: ▸ Compiling FSUtils.m
[17:05:28]: ▸ Compiling SDStatusBarOverriderPost9_0.m
[17:05:28]: ▸ Compiling SDStatusBarManager.m
[17:05:28]: ▸ Compiling SDStatusBarOverriderPost8_3.m
[17:05:28]: ▸ Compiling NSString+URLEncode.m
[17:05:28]: ▸ Compiling SDStatusBarOverriderPre8_3.m
[17:05:28]: ▸ Compiling UITestUtils_vers.c
[17:05:28]: ▸ Linking UITestUtils
[17:05:29]: ▸ Copying UITestUtils.h
[17:05:29]: ▸ Copying SDStatusBarManager.h
[17:05:29]: ▸ Copying NSString+URLEncode.h
[17:05:29]: ▸ Copying FSUtils.h
[17:05:29]: Running Tests: ▸ Touching UITestUtils.framework
[17:05:29]: ▸ Building Pods/FontAwesome.swift [Debug]
[17:05:29]: ▸ Check Dependencies
[17:05:29]: ▸ Building Pods/Pods-bridgingIT Planning Poker [Debug]
[17:05:29]: ▸ Check Dependencies
[17:05:29]: ▸ Building bridgingIT Planning Poker/bridgingIT Planning Poker [Debug]
[17:05:29]: ▸ Check Dependencies
[17:05:29]: ▸ Running script '[CP] Check Pods Manifest.lock'
[17:05:29]: ▸ Processing Info.plist
[17:05:29]: ▸ Running script '[CP] Embed Pods Frameworks'
[17:05:29]: ▸ Running script '[CP] Copy Pods Resources'
[17:05:29]: ▸ Running script 'Increment Build'
[17:05:29]: ▸ Building Pods/Pods-bridgingIT Planning PokerUITests [Debug]
[17:05:29]: ▸ Check Dependencies
[17:05:29]: ▸ Processing Info.plist
[17:05:29]: ▸ Compiling Pods-bridgingIT\ Planning\ PokerUITests-dummy.m
[17:05:29]: ▸ Compiling Pods_bridgingIT_Planning_PokerUITests_vers.c
[17:05:29]: ▸ Copying Pods-bridgingIT\ Planning\ PokerUITests-umbrella.h
[17:05:29]: Running Tests: ▸ Touching Pods_bridgingIT_Planning_PokerUITests.framework
[17:05:29]: ▸ Building bridgingIT Planning Poker/bridgingIT Planning PokerUITests [Debug]
[17:05:29]: ▸ Check Dependencies
[17:05:29]: ▸ Preprocessing /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/XCTRunner.app/Info.plist
[17:05:29]: ▸ Running script '[CP] Check Pods Manifest.lock'
[17:05:29]: ▸ Compiling CardCell.swift
[17:05:31]: ▸ Compiling SwitchCell.swift
[17:05:31]: ▸ Compiling UIViewController.swift
[17:05:31]: ▸ Compiling CALayer+BorderColor.swift
[17:05:31]: ▸ Compiling CardViewController+Extension.swift
[17:05:31]: ▸ Compiling SettingsViewController+Extension.swift
[17:05:31]: ▸ Compiling DeckSettingsViewController+Extension.swift
[17:05:31]: ▸ Compiling SideBarMenuCell.swift
[17:05:31]: ▸ Compiling MenuViewController.swift
[17:05:32]: ▸ Compiling AppDelegate.swift
[17:05:32]: ▸ Compiling CoffeeCup.swift
[17:05:32]: ▸ Compiling PokerOptions.swift
[17:05:32]: ▸ Compiling CardViewController.swift
[17:05:32]: ▸ Compiling SettingsViewController.swift
[17:05:32]: ▸ Compiling DeckSettingsController.swift
[17:05:32]: ▸ Compiling CardFrontView.swift
[17:05:32]: ▸ Compiling CardBackView.swift
[17:05:32]: ▸ Compiling bridgingIT_Planning_PokerUITests.swift
[17:05:32]: ▸ Compiling SnapshotHelper.swift
[17:05:32]: ▸ Linking bridgingIT\ Planning\ PokerUITests
[17:05:32]: ▸ Copying Localizable.strings
[17:05:32]: ▸ Copying Localizable.strings
[17:05:32]: ▸ Compiling LaunchScreen.storyboard
[17:05:32]: ▸ Compiling Main.storyboard
[17:05:35]: ▸ Processing Info.plist
[17:05:35]: ▸ Running script '[CP] Embed Pods Frameworks'
[17:05:36]: ▸ Running script '[CP] Copy Pods Resources'
[17:05:36]: Running Tests: ▸ Touching bridgingIT\ Planning\ PokerUITests.xctest
[17:07:27]: ▸ 2016-06-14 17:07:27.806 xcodebuild[8262:93958] iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.
Configuration Files
Please copy the complete content of your Fastfile
and any other configuration files you use below:
Snapfile:
# Uncomment the lines below you want to change by removing the # in the beginning
# A list of devices you want to take the screenshots from
# devices([
# "iPhone 6",
# "iPhone 6 Plus",
# "iPhone 5",
# "iPhone 4s",
# "iPad Retina",
# "iPad Pro"
# ])
languages([
"en-US",
"de-DE",
])
# Arguments to pass to the app on launch. See https://github.com/fastlane/snapshot#launch-arguments
# launch_arguments(["-favColor red"])
# The name of the scheme which contains the UI Tests
# scheme "SchemeName"
# Where should the resulting screenshots be stored?
output_directory "./screenshots"
clear_previous_screenshots true # remove the '#' to clear all previously generated screenshots before creating new ones
# Choose which project/workspace to use
# project "./Project.xcodeproj"
workspace "./bIT Planning Poker.xcworkspace"
# For more information about all available options run
# snapshot --help
erase_simulator true
reinstall_app true
Environment
snapshot version 1.12.3
Do you use bundler to execute fastlane (i.e. bundle exec fastlane
)? No
Do you use a Ruby environment manager (e.g. chruby
, rbenv
, rvm
)? No
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 18 (7 by maintainers)
@mfurtak: Hello, sorry for the late reply, but i was on holidays. However, i just tested the new version and i am glad to say that the new version works for me now.
Thanks a lot for the support!
Had the same issue, turned out the problem was running snapshot from under tmux, switching to plain Terminal solved the issue immediately. Tried this after reading about problems running xcodebuild from forked terminal sessions here: http://stackoverflow.com/questions/577750/running-xcodebuild-from-a-forked-terminal
Hi folks - I’ve released
snapshot
1.13.0 which introduces an experimental fix for this.Please update to the latest with
gem update snapshot
then try running things with:⚠️ Note that the environment variable value has changed to 2 where previously it was 1! ⚠️
If you’re running things through fastlane, do:
… or whatever lane you need.
This should allow
snapshot
to account for your current Xcode of choice (viaxcode-select
) when attempting to get the simulator ready.You’ll know you got it right if you see the “Explicitly opening simulator” output change to include a path, like:
After that, please let me know if this gets things working again for you. If not, complete output is always helpful. Thanks! 🚀
Hi @mr-brandt - I just gave your sample project a try. I was able to reproduce the simulator hang by just running
snapshot
in the project directory.However, when I ran
FASTLANE_EXPLICIT_OPEN_SIMULATOR=1 snapshot
, I found that the run completed successfully.I noticed that I don’t wind up with the “Failed to locate a valid instance of CoreSimulatorService” line during my run, which I think is probably significant. I have an idea of something to try, so I’ll be in touch.