fastlane-old / snapshot

Automate taking localized screenshots of your iOS app on every device
https://fastlane.tools
1.95k stars 140 forks source link

Snapshot launching wrong simulator #382

Closed tlv closed 8 years ago

tlv commented 8 years ago

Hi,

Snapshot sometimes launches the wrong simulator when I run it. What seems to happen is it will just launch the last simulator that I launched from Xcode (e.g. after running my UI tests in Xcode to verify that they were working), regardless of which simulator it is supposed to be launching. For example, snapshot will say it is running the UI tests on the iPhone 6 simulator, and then proceed to launch the iPhone 4s simulator.

This behavior is then followed by the launched simulator failing to boot (it just black screens for 2 minutes), and I get the following error: iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1.

Running snapshot reset_simulators had no effect on this problem, although it did cause a different simulator (but still the wrong one) to boot.

Has anyone else had this issue before?

Stacktrace:

[11:00:14]: Exit status: 65
[11:00:14]: Tests failed - check out the log above
[11:00:14]: Backtrace:
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/error_handler.rb:14:in `handle_test_error'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:126:in `block in launch'
        /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.32.0/lib/fastlane_core/command_executor.rb:61:in `call'
        /Library/Ruby/Gems/2.0.0/gems/fastlane_core-0.32.0/lib/fastlane_core/command_executor.rb:61:in `execute'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:120:in `launch'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:35:in `block (3 levels) in work'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:31:in `each'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:31:in `block (2 levels) in work'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:30:in `each'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:30:in `block in work'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:29:in `each'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/lib/snapshot/runner.rb:29:in `work'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/bin/snapshot:37:in `block (2 levels) in run'
        /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
        /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
        /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
        /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
        /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/runner.rb:68:in `run!'
        /Library/Ruby/Gems/2.0.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/bin/snapshot:78:in `run'
        /Library/Ruby/Gems/2.0.0/gems/snapshot-1.4.3/bin/snapshot:84:in `<top (required)>'
        /usr/local/bin/snapshot:23:in `load'
        /usr/local/bin/snapshot:23:in `<main>'

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 4s",
  "iPhone 5s",
  "iPhone 6 Plus",
])

languages([
  "en-US"
])

# Arguments to pass to the app on launch. See https://github.com/fastlane/snapshot#launch_arguments
# launch_arguments(["-awsToken dw-beta", "-username qascripts", "-password Zk$J4rdjD@", "-accountId eugene@cmtelematics.com"])

# The name of the scheme which contains the UI Tests
# scheme

# Where should the resulting screenshots be stored?
# output_directory "./screenshots"

# clear_previous_screenshots # remove the '#' to clear all previously generated screenshots before creating new ones

# Choose which project/workspace to use
# project "./Project.xcodeproj"
# workspace "./Project.xcworkspace"

# For more information about all available options run
# snapshot --help
mqln commented 8 years ago

Any word on what works? I'm stuck on this too.

ddilley commented 8 years ago

I too am experiencing this issue and would appreciate any input. After launching the incorrect simulator, the tests never get ran with error "iPhoneSimulator: Timed out waiting 120 seconds for simulator to boot, current state is 1." So it seems it boots the incorrect simulator and then fails when expecting the correct simulator. I tried snapshot reset_simulators and cleaning to no avail.

fastlane-bot commented 8 years ago

This issue was migrated to https://github.com/fastlane/fastlane/issues/1664. 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: