fastlane-old/snapshot

Snapshot repeats after successfully getting screenshots

garfbargle opened this issue · 2 comments

I have snapshot working to successfully get screenshots but after it completes the tests, it runs again. It appears as if there is an infinite loop somewhere.

$ snapshot --version
snapshot 1.6.0
$ fastlane --version
fastlane 1.57.0

Command I'm using
$ fastlane snap_test

fastfile

lane :snap_test do
  sh "fastlane screenshots --verbose --env staging-screenshots"
end

lane :screenshots do
  sh "snapshot reset_simulators"
  snapshot()
end

snapfile

scheme ENV['SCHEME_NAME']

devices([
  "iPhone 4s"
])

output_directory "./fastlane/screenshots/" + ENV['SCHEME_NAME']

launch_arguments(["login_username "+ENV['USER_USERNAME'], "login_password "+ENV['USER_PASSWORD']])

Additional Testing

I have tried making changes to the scheme to figure out what may be happening. I made my scheme invalid according to snapshot and when I run my lane it continues to spit out what's below until eventually it gets to a point where it says "too many errors, too many retries". It understands that the scheme is wrong but continues to try many times anyways?

[13:13:39]: ▸ INFO [2016-02-04 13:13:39.96]: -------------------------
[13:13:39]: ▸ INFO [2016-02-04 13:13:39.96]: --- iPhone 4s - en-US ---
[13:13:39]: ▸ INFO [2016-02-04 13:13:39.96]: -------------------------
[13:13:39]: ▸ INFO [2016-02-04 13:13:39.96]: $ set -o pipefail && xcodebuild -workspace './BPD-mobile.xcworkspace' -scheme 'BPD-staging-screenshots' -derivedDataPath '/tmp/snapshot_derived/' -destination 'platform=iOS Simulator,id=5A1A60D5-2031-408B-84CE-0442699A4B53,OS=9.2' build test | tee '/Users/cobo/Library/Logs/snapshot/BPDUITests-BPD-staging-screenshots.log' | xcpretty
[13:13:39]: INFO [2016-02-04 13:13:39.96]: ▸ Loading...
[13:13:40]: INFO [2016-02-04 13:13:40.75]: ▸ xcodebuild: error: Scheme BPD-staging-screenshots is not currently configured for the test action.
[13:13:40]: ▸ xcodebuild: error: Scheme BPD-staging-screenshots is not currently configured for the test action.
[13:13:40]: ▸ ERROR [2016-02-04 13:13:40.76]: Exit status: 66
[13:13:40]: ▸ INFO [2016-02-04 13:13:40.76]: Caught error... 66
[13:13:40]: ▸ DEBUG [2016-02-04 13:13:40.77]: Patching '/Users/cobo/Library/Preferences/com.apple.iphonesimulator.plist' to scale simulator to 100%
[13:13:40]: ▸ INFO [2016-02-04 13:13:40.77]: Fetching available devices
[13:13:41]: ▸ INFO [2016-02-04 13:13:41.53]: Fetching available devices

Two issues:

  1. An invalid scheme does cause snapshot to keep trying many times. (This is probably not useful because nothing is going to have changed to make it succeed.)
  2. Having the launch arguments caused snapshot to rerun the same lane causing me to think it was broken.

This issue was migrated to fastlane/fastlane#2496. 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 🚀