fastlane / fastlane

🚀 The easiest way to automate building and releasing your iOS and Android apps
https://fastlane.tools
MIT License
38.86k stars 5.64k forks source link

Detect whether snapshot is running in build phase script #4356

Closed ZevEisenberg closed 7 years ago

ZevEisenberg commented 8 years ago

New Issue Checklist

When running snapshot, you can determine whether you are capturing snapshots at run time using

NSUserDefaults.standardUserDefaults().boolForKey(FASTLANE_SNAPSHOT)

I would also like to detect whether I'm currently capturing snapshots in a script in a build phase. I tried checking the value of $FASTLANE_SNAPSHOT, but it's always empty. Is there a supported way to do this?

In the following output, my screenshot tests are failing because I'm force-unwrapping a UIImage? that is not actually in the app bundle. I'm trying to move it in with a build script, but only when using snapshot, hence my need to detect that state.

Complete output when running fastlane, including the stack trace and command used
[17:13:51]: xcrun xcodebuild -list -workspace './Padiddle.xcworkspace'

+----------------------------+-----------------------------------------------------+
|                           Summary for snapshot 1.12.1                            |
+----------------------------+-----------------------------------------------------+
| devices                    | ["iPhone 6", "iPad Retina"]                         |
| languages                  | ["en-US"]                                           |
| launch_arguments           | ["-FASTLANE_SNAPSHOT YES"]                          |
| scheme                     | Screenshots                                         |
| output_directory           | /Users/zev/Projects/Padiddle 2/Captured Screenshots |
| workspace                  | ./Padiddle.xcworkspace                              |
| ios_version                | 9.3                                                 |
| skip_open_summary          | false                                               |
| clear_previous_screenshots | false                                               |
| reinstall_app              | false                                               |
| erase_simulator            | false                                               |
| buildlog_path              | ~/Library/Logs/snapshot                             |
| clean                      | false                                               |
| number_of_retries          | 0                                                   |
| stop_after_first_error     | false                                               |
+----------------------------+-----------------------------------------------------+

[17:13:52]: Building and running project - this might take some time...
[17:13:52]: Patching '/Users/zev/Library/Preferences/com.apple.iphonesimulator.plist' to scale simulator to 100%
[17:13:55]: ------------------------
[17:13:55]: --- iPhone 6 - en-US ---
[17:13:55]: ------------------------
[17:13:55]: $ set -o pipefail && xcodebuild -workspace './Padiddle.xcworkspace' -scheme 'Screenshots' -derivedDataPath '/var/folders/j_/86_9xkgj0pqc0q2h5xx_9lt40000gn/T/snapshot_derived20160425-70623-oo87zf' -destination 'platform=iOS Simulator,id=48F055CF-6F65-4795-9772-BC0722E28716,OS=9.3' build test | tee /Users/zev/Library/Logs/snapshot/Padiddle-Screenshots.log | xcpretty 
[17:13:55]: ▸ Loading...
[17:13:56]: ▸ Building Pods/Pods-Padiddle [Debug]
[17:13:56]: ▸ Check Dependencies
[17:13:57]: ▸ Processing Info.plist
[17:13:57]: ▸ Compiling Pods-Padiddle-dummy.m
[17:13:58]: ▸ Compiling Pods_Padiddle_vers.c
[17:13:58]: ▸ Copying Pods-Padiddle-umbrella.h
[17:13:58]: Running Tests: ▸ Touching Pods_Padiddle.framework
[17:13:58]: ▸ Building Padiddle/Padiddle [Debug]
[17:13:58]: ▸ Check Dependencies
[17:13:58]: ▸ Running script '📦 Check Pods Manifest.lock'
[17:13:58]: ▸ Running script 'SwiftGen'
[17:13:59]: ▸ Compiling SpiralImageMaker.swift
[17:14:02]: ▸ Compiling Geometry.swift
[17:14:02]: ▸ Compiling Defaults.swift
[17:14:02]: ▸ Compiling ArrayExtensions.swift
[17:14:02]: ▸ Compiling ToolbarViewController.swift
[17:14:03]: ▸ Compiling ColorManager.swift
[17:14:03]: ▸ Compiling Log.swift
[17:14:03]: ▸ Compiling HelpViewModel.swift
[17:14:03]: ▸ Compiling ColorPickerViewController.swift
[17:14:03]: ▸ Compiling Weak.swift
[17:14:03]: ▸ Compiling RootViewModel.swift
[17:14:03]: ▸ Compiling ScreenExtensions.swift
[17:14:04]: ▸ Compiling PathExtensions.swift
[17:14:09]: ▸ Compiling RootViewController.swift
[17:14:09]: ▸ Compiling AppDelegate.swift
[17:14:09]: ▸ Compiling Layout.swift
[17:14:09]: ▸ Compiling DeviceExtensions.swift
[17:14:09]: ▸ Compiling HelpViewController.swift
[17:14:09]: ▸ Compiling DrawingViewController.swift
[17:14:09]: ▸ Compiling DrawingViewModel.swift
[17:14:09]: ▸ Compiling PickerCell.swift
[17:14:09]: ▸ Compiling CounterRotatingViewController.swift
[17:14:09]: ▸ Compiling Images.swift
[17:14:09]: ▸ Compiling ImageExtensions.swift
[17:14:09]: ▸ Compiling HelpImageProtocol.swift
[17:14:09]: ▸ Compiling Colors.swift
[17:14:09]: ▸ Compiling ToolbarViewModel.swift
[17:14:09]: ▸ Compiling Math.swift
[17:14:09]: ▸ Compiling ImageIO.swift
[17:14:09]: ▸ Compiling ColorPickerLayout.swift
[17:14:09]: ▸ Compiling DrawingView.swift
[17:14:09]: ▸ Compiling ColorPickerViewModel.swift
[17:14:09]: ▸ Linking Padiddle
[17:14:10]: ▸ Copying Padiddle/Base.lproj/help.html
[17:14:10]: ▸ Copying Padiddle/fr.lproj/help.html
[17:14:10]: ▸ Copying Padiddle/it.lproj/help.html
[17:14:10]: ▸ Copying Padiddle/zh-Hans.lproj/help.html
[17:14:10]: ▸ Copying Padiddle/zh-Hant.lproj/help.html
[17:14:10]: ▸ Compiling LaunchScreen.storyboard
[17:14:11]: ▸ Processing Info.plist
[17:14:11]: ▸ Running script 'Build Number'
[17:14:12]: ▸ Running script 'Swiftlint'
[17:14:12]: ▸ Running script '📦 Embed Pods Frameworks'
[17:14:12]: ▸ Running script '📦 Copy Pods Resources'
[17:14:12]: ▸ Running script 'Fabric'
[17:14:12]: ▸ Running script 'Copy Screenshot Images If Needed'
[17:14:12]: Running Tests: ▸ Touching Padiddle.app
[17:14:12]: ▸ Build Succeeded
[17:14:13]: ▸ 2016-04-25 17:14:13.052 xcodebuild[70674:6024798] [MT] IDETestOperationsObserverDebug: (5CF05217-F920-40CC-AABB-D0ACBD0AAD85) Beginning test session 5CF05217-F920-40CC-AABB-D0ACBD0AAD85 with Xcode 7D175 on target <DVTiPhoneSimulator: 0x7ffd13051790> {
[17:14:13]: ▸ SimDevice: SimDevice : iPhone 6 (48F055CF-6F65-4795-9772-BC0722E28716) : state={ Shutdown } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6 } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
[17:14:13]: ▸ } (9.3 (13E230))
[17:14:13]: ▸ 2016-04-25 17:14:13.056 xcodebuild[70674:6024810]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[17:14:13]: ▸ /var/folders/j_/86_9xkgj0pqc0q2h5xx_9lt40000gn/T/snapshot_derived20160425-70623-oo87zf/Logs/Test/171FF9CB-0195-410A-95B2-73719D05F7F1/Session-2016-04-25_17:14:13-hGPDYs.log
[17:14:13]: ▸ Building Pods/Pods-Padiddle [Debug]
[17:14:13]: ▸ Check Dependencies
[17:14:13]: ▸ Processing Info.plist
[17:14:13]: ▸ Compiling Pods_Padiddle_vers.c
[17:14:13]: ▸ Compiling Pods-Padiddle-dummy.m
[17:14:14]: ▸ Copying Pods-Padiddle-umbrella.h
[17:14:14]: Running Tests: ▸ Touching Pods_Padiddle.framework
[17:14:14]: ▸ Building Padiddle/Padiddle [Debug]
[17:14:14]: ▸ Check Dependencies
[17:14:14]: ▸ Running script '📦 Check Pods Manifest.lock'
[17:14:14]: ▸ Running script 'SwiftGen'
[17:14:15]: ▸ Compiling SpiralImageMaker.swift
[17:14:16]: ▸ Compiling Geometry.swift
[17:14:16]: ▸ Compiling Defaults.swift
[17:14:16]: ▸ Compiling ArrayExtensions.swift
[17:14:16]: ▸ Compiling ToolbarViewController.swift
[17:14:18]: ▸ Compiling ColorManager.swift
[17:14:18]: ▸ Compiling Log.swift
[17:14:18]: ▸ Compiling HelpViewModel.swift
[17:14:18]: ▸ Compiling ColorPickerViewController.swift
[17:14:18]: ▸ Compiling Weak.swift
[17:14:18]: ▸ Compiling RootViewModel.swift
[17:14:18]: ▸ Compiling ScreenExtensions.swift
[17:14:18]: ▸ Compiling PathExtensions.swift
[17:14:27]: ▸ Compiling RootViewController.swift
[17:14:27]: ▸ Compiling AppDelegate.swift
[17:14:27]: ▸ Compiling Layout.swift
[17:14:28]: ▸ Compiling DeviceExtensions.swift
[17:14:28]: ▸ Compiling HelpViewController.swift
[17:14:28]: ▸ Compiling DrawingViewController.swift
[17:14:28]: ▸ Compiling DrawingViewModel.swift
[17:14:28]: ▸ Compiling PickerCell.swift
[17:14:28]: ▸ Compiling CounterRotatingViewController.swift
[17:14:28]: ▸ Compiling Images.swift
[17:14:28]: ▸ Compiling ImageExtensions.swift
[17:14:28]: ▸ Compiling HelpImageProtocol.swift
[17:14:28]: ▸ Compiling Colors.swift
[17:14:28]: ▸ Compiling ToolbarViewModel.swift
[17:14:28]: ▸ Compiling Math.swift
[17:14:28]: ▸ Compiling ImageIO.swift
[17:14:28]: ▸ Compiling ColorPickerLayout.swift
[17:14:28]: ▸ Compiling DrawingView.swift
[17:14:28]: ▸ Compiling ColorPickerViewModel.swift
[17:14:28]: ▸ Linking Padiddle
[17:14:28]: ▸ Copying Padiddle/Base.lproj/help.html
[17:14:28]: ▸ Copying Padiddle/fr.lproj/help.html
[17:14:28]: ▸ Copying Padiddle/it.lproj/help.html
[17:14:28]: ▸ Copying Padiddle/zh-Hans.lproj/help.html
[17:14:28]: ▸ Copying Padiddle/zh-Hant.lproj/help.html
[17:14:28]: ▸ Compiling LaunchScreen.storyboard
[17:14:29]: ▸ Processing Info.plist
[17:14:29]: ▸ Running script 'Build Number'
[17:14:29]: ▸ Running script 'Swiftlint'
[17:14:29]: ▸ Running script '📦 Embed Pods Frameworks'
[17:14:29]: ▸ Running script '📦 Copy Pods Resources'
[17:14:29]: ▸ Running script 'Fabric'
[17:14:29]: ▸ Running script 'Copy Screenshot Images If Needed'
[17:14:30]: Running Tests: ▸ Touching Padiddle.app
[17:14:30]: ▸ Building Padiddle/Screenshots [Debug]
[17:14:30]: ▸ Check Dependencies
[17:14:30]: ▸ Processing Info.plist
[17:14:30]: ▸ Preprocessing /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/XCTRunner.app/Info.plist
[17:14:30]: ▸ Compiling Screenshots.swift
[17:14:32]: ▸ Compiling SnapshotHelper.swift
[17:14:33]: ▸ Linking Screenshots
[17:14:33]: Running Tests: ▸ Touching Screenshots.xctest
[17:14:42]: ▸ Failing tests:
[17:14:42]: ▸ -[Screenshots testTakeScreenshots()]
[17:14:42]: ▸ ** TEST FAILED **
[17:14:42]: ▸ All tests
[17:14:42]: ▸ Test Suite Screenshots.xctest started
[17:14:42]: ▸ Screenshots
[17:14:42]: ▸ ✗ testTakeScreenshots, UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7fddeaf682f0 com.zeveisenberg.Padiddle2 (70986)>, error: Error -25204 performing AXAction 2043
[17:14:42]: ▸ Screenshots.Screenshots
[17:14:42]: ▸ testTakeScreenshots, UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7fddeaf682f0 com.zeveisenberg.Padiddle2 (70986)>, error: Error -25204 performing AXAction 2043
[17:14:42]: ▸ <unknown>:0
[17:14:42]: ▸ ```

^ the output has triple backpacks here, so it chops up the fenced code block (or, it did, until I inserted this interlude). Is that intentional?

screen shot 2016-04-25 at 5 22 35 pm

[17:14:42]: ▸ ```
[17:14:42]: ▸      Executed 1 test, with 1 failure (0 unexpected) in 3.781 (3.784) seconds
[17:14:42]: ▸ 
▸ Building Pods/Pods-Padiddle [Debug]
▸ Check Dependencies
▸ Processing Info.plist
▸ Compiling Pods-Padiddle-dummy.m
▸ Compiling Pods_Padiddle_vers.c
▸ Copying Pods-Padiddle-umbrella.h
▸ Touching Pods_Padiddle.framework
▸ Building Padiddle/Padiddle [Debug]
▸ Check Dependencies
▸ Running script '📦 Check Pods Manifest.lock'
▸ Running script 'SwiftGen'
▸ Compiling SpiralImageMaker.swift
▸ Compiling Geometry.swift
▸ Compiling Defaults.swift
▸ Compiling ArrayExtensions.swift
▸ Compiling ToolbarViewController.swift
▸ Compiling ColorManager.swift
▸ Compiling Log.swift
▸ Compiling HelpViewModel.swift
▸ Compiling ColorPickerViewController.swift
▸ Compiling Weak.swift
▸ Compiling RootViewModel.swift
▸ Compiling ScreenExtensions.swift
▸ Compiling PathExtensions.swift
▸ Compiling RootViewController.swift
▸ Compiling AppDelegate.swift
▸ Compiling Layout.swift
▸ Compiling DeviceExtensions.swift
▸ Compiling HelpViewController.swift
▸ Compiling DrawingViewController.swift
▸ Compiling DrawingViewModel.swift
▸ Compiling PickerCell.swift
▸ Compiling CounterRotatingViewController.swift
▸ Compiling Images.swift
▸ Compiling ImageExtensions.swift
▸ Compiling HelpImageProtocol.swift
▸ Compiling Colors.swift
▸ Compiling ToolbarViewModel.swift
▸ Compiling Math.swift
▸ Compiling ImageIO.swift
▸ Compiling ColorPickerLayout.swift
▸ Compiling DrawingView.swift
▸ Compiling ColorPickerViewModel.swift
▸ Linking Padiddle
▸ Copying Padiddle/Base.lproj/help.html
▸ Copying Padiddle/fr.lproj/help.html
▸ Copying Padiddle/it.lproj/help.html
▸ Copying Padiddle/zh-Hans.lproj/help.html
▸ Copying Padiddle/zh-Hant.lproj/help.html
▸ Compiling LaunchScreen.storyboard
▸ Processing Info.plist
▸ Running script 'Build Number'
▸ Running script 'Swiftlint'
▸ Running script '📦 Embed Pods Frameworks'
▸ Running script '📦 Copy Pods Resources'
▸ Running script 'Fabric'
▸ Running script 'Copy Screenshot Images If Needed'
▸ Touching Padiddle.app
▸ Build Succeeded
2016-04-25 17:14:13.052 xcodebuild[70674:6024798] [MT] IDETestOperationsObserverDebug: (5CF05217-F920-40CC-AABB-D0ACBD0AAD85) Beginning test session 5CF05217-F920-40CC-AABB-D0ACBD0AAD85 with Xcode 7D175 on target <DVTiPhoneSimulator: 0x7ffd13051790> {
SimDevice: SimDevice : iPhone 6 (48F055CF-6F65-4795-9772-BC0722E28716) : state={ Shutdown } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPhone-6 } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))
2016-04-25 17:14:13.056 xcodebuild[70674:6024810]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/var/folders/j_/86_9xkgj0pqc0q2h5xx_9lt40000gn/T/snapshot_derived20160425-70623-oo87zf/Logs/Test/171FF9CB-0195-410A-95B2-73719D05F7F1/Session-2016-04-25_17:14:13-hGPDYs.log
▸ Building Pods/Pods-Padiddle [Debug]
▸ Check Dependencies
▸ Processing Info.plist
▸ Compiling Pods_Padiddle_vers.c
▸ Compiling Pods-Padiddle-dummy.m
▸ Copying Pods-Padiddle-umbrella.h
▸ Touching Pods_Padiddle.framework
▸ Building Padiddle/Padiddle [Debug]
▸ Check Dependencies
▸ Running script '📦 Check Pods Manifest.lock'
▸ Running script 'SwiftGen'
▸ Compiling SpiralImageMaker.swift
▸ Compiling Geometry.swift
▸ Compiling Defaults.swift
▸ Compiling ArrayExtensions.swift
▸ Compiling ToolbarViewController.swift
▸ Compiling ColorManager.swift
▸ Compiling Log.swift
▸ Compiling HelpViewModel.swift
▸ Compiling ColorPickerViewController.swift
▸ Compiling Weak.swift
▸ Compiling RootViewModel.swift
▸ Compiling ScreenExtensions.swift
▸ Compiling PathExtensions.swift
▸ Compiling RootViewController.swift
▸ Compiling AppDelegate.swift
▸ Compiling Layout.swift
▸ Compiling DeviceExtensions.swift
▸ Compiling HelpViewController.swift
▸ Compiling DrawingViewController.swift
▸ Compiling DrawingViewModel.swift
▸ Compiling PickerCell.swift
▸ Compiling CounterRotatingViewController.swift
▸ Compiling Images.swift
▸ Compiling ImageExtensions.swift
▸ Compiling HelpImageProtocol.swift
▸ Compiling Colors.swift
▸ Compiling ToolbarViewModel.swift
▸ Compiling Math.swift
▸ Compiling ImageIO.swift
▸ Compiling ColorPickerLayout.swift
▸ Compiling DrawingView.swift
▸ Compiling ColorPickerViewModel.swift
▸ Linking Padiddle
▸ Copying Padiddle/Base.lproj/help.html
▸ Copying Padiddle/fr.lproj/help.html
▸ Copying Padiddle/it.lproj/help.html
▸ Copying Padiddle/zh-Hans.lproj/help.html
▸ Copying Padiddle/zh-Hant.lproj/help.html
▸ Compiling LaunchScreen.storyboard
▸ Processing Info.plist
▸ Running script 'Build Number'
▸ Running script 'Swiftlint'
▸ Running script '📦 Embed Pods Frameworks'
▸ Running script '📦 Copy Pods Resources'
▸ Running script 'Fabric'
▸ Running script 'Copy Screenshot Images If Needed'
▸ Touching Padiddle.app
▸ Building Padiddle/Screenshots [Debug]
▸ Check Dependencies
▸ Processing Info.plist
▸ Preprocessing /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Library/Xcode/Agents/XCTRunner.app/Info.plist
▸ Compiling Screenshots.swift
▸ Compiling SnapshotHelper.swift
▸ Linking Screenshots
▸ Touching Screenshots.xctest
Failing tests:
-[Screenshots testTakeScreenshots()]
** TEST FAILED **

All tests
Test Suite Screenshots.xctest started
Screenshots
✗ testTakeScreenshots, UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7fddeaf682f0 com.zeveisenberg.Padiddle2 (70986)>, error: Error -25204 performing AXAction 2043

Screenshots.Screenshots
testTakeScreenshots, UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7fddeaf682f0 com.zeveisenberg.Padiddle2 (70986)>, error: Error -25204 performing AXAction 2043
<unknown>:0

     Executed 1 test, with 1 failure (0 unexpected) in 3.781 (3.784) seconds

[17:14:42]: Exit status: 65
[17:14:42]: Tests failed - check out the log above
[17:14:43]: Patching '/Users/zev/Library/Preferences/com.apple.iphonesimulator.plist' to scale simulator to 100%
[17:14:48]: ---------------------------
[17:14:48]: --- iPad Retina - en-US ---
[17:14:48]: ---------------------------
[17:14:48]: $ set -o pipefail && xcodebuild -workspace './Padiddle.xcworkspace' -scheme 'Screenshots' -derivedDataPath '/var/folders/j_/86_9xkgj0pqc0q2h5xx_9lt40000gn/T/snapshot_derived20160425-70623-oo87zf' -destination 'platform=iOS Simulator,id=86C7EE04-99B0-45A4-9025-E1259EC9B62A,OS=9.3' build test | tee /Users/zev/Library/Logs/snapshot/Padiddle-Screenshots.log | xcpretty 
[17:14:48]: ▸ Loading...
[17:14:49]: ▸ Building Pods/Pods-Padiddle [Debug]
[17:14:49]: ▸ Check Dependencies
[17:14:50]: ▸ Compiling Pods-Padiddle-dummy.m
[17:14:50]: ▸ Compiling Pods_Padiddle_vers.c
[17:14:50]: Running Tests: ▸ Touching Pods_Padiddle.framework
[17:14:50]: ▸ Building Padiddle/Padiddle [Debug]
[17:14:50]: ▸ Check Dependencies
[17:14:50]: ▸ Running script '📦 Check Pods Manifest.lock'
[17:14:50]: ▸ Running script 'SwiftGen'
[17:14:51]: ▸ Compiling SpiralImageMaker.swift
[17:14:53]: ▸ Compiling Geometry.swift
[17:14:53]: ▸ Compiling Defaults.swift
[17:14:53]: ▸ Compiling ArrayExtensions.swift
[17:14:53]: ▸ Compiling ToolbarViewController.swift
[17:14:54]: ▸ Compiling ColorManager.swift
[17:14:54]: ▸ Compiling Log.swift
[17:14:54]: ▸ Compiling HelpViewModel.swift
[17:14:54]: ▸ Compiling ColorPickerViewController.swift
[17:14:54]: ▸ Compiling Weak.swift
[17:14:54]: ▸ Compiling RootViewModel.swift
[17:14:54]: ▸ Compiling ScreenExtensions.swift
[17:14:54]: ▸ Compiling PathExtensions.swift
[17:15:00]: ▸ Compiling RootViewController.swift
[17:15:00]: ▸ Compiling AppDelegate.swift
[17:15:00]: ▸ Compiling Layout.swift
[17:15:00]: ▸ Compiling DeviceExtensions.swift
[17:15:00]: ▸ Compiling HelpViewController.swift
[17:15:00]: ▸ Compiling DrawingViewController.swift
[17:15:00]: ▸ Compiling DrawingViewModel.swift
[17:15:00]: ▸ Compiling PickerCell.swift
[17:15:00]: ▸ Compiling CounterRotatingViewController.swift
[17:15:00]: ▸ Compiling Images.swift
[17:15:00]: ▸ Compiling ImageExtensions.swift
[17:15:00]: ▸ Compiling HelpImageProtocol.swift
[17:15:00]: ▸ Compiling Colors.swift
[17:15:00]: ▸ Compiling ToolbarViewModel.swift
[17:15:00]: ▸ Compiling Math.swift
[17:15:00]: ▸ Compiling ImageIO.swift
[17:15:00]: ▸ Compiling ColorPickerLayout.swift
[17:15:00]: ▸ Compiling DrawingView.swift
[17:15:00]: ▸ Compiling ColorPickerViewModel.swift
[17:15:00]: ▸ Linking Padiddle
[17:15:01]: ▸ Processing Info.plist
[17:15:01]: ▸ Running script 'Build Number'
[17:15:01]: ▸ Running script 'Swiftlint'
[17:15:02]: ▸ Running script '📦 Embed Pods Frameworks'
[17:15:02]: ▸ Running script '📦 Copy Pods Resources'
[17:15:02]: ▸ Running script 'Fabric'
[17:15:02]: ▸ Running script 'Copy Screenshot Images If Needed'
[17:15:02]: Running Tests: ▸ Touching Padiddle.app
[17:15:02]: ▸ Build Succeeded
[17:15:02]: ▸ 2016-04-25 17:15:02.572 xcodebuild[71019:6031095] [MT] IDETestOperationsObserverDebug: (81C28654-3C90-482E-8D5B-EFC6F4258EDF) Beginning test session 81C28654-3C90-482E-8D5B-EFC6F4258EDF with Xcode 7D175 on target <DVTiPhoneSimulator: 0x7f9f6be086c0> {
[17:15:02]: ▸ SimDevice: SimDevice : iPad Retina (86C7EE04-99B0-45A4-9025-E1259EC9B62A) : state={ Shutdown } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-Retina } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
[17:15:02]: ▸ } (9.3 (13E230))
[17:15:02]: ▸ 2016-04-25 17:15:02.579 xcodebuild[71019:6031101]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
[17:15:02]: ▸ /var/folders/j_/86_9xkgj0pqc0q2h5xx_9lt40000gn/T/snapshot_derived20160425-70623-oo87zf/Logs/Test/F786F589-DBCD-444F-8086-5A348A2C1492/Session-2016-04-25_17:15:02-GQZKJE.log
[17:15:02]: ▸ Building Pods/Pods-Padiddle [Debug]
[17:15:02]: ▸ Check Dependencies
[17:15:02]: ▸ Compiling Pods-Padiddle-dummy.m
[17:15:03]: ▸ Compiling Pods_Padiddle_vers.c
[17:15:03]: Running Tests: ▸ Touching Pods_Padiddle.framework
[17:15:03]: ▸ Building Padiddle/Padiddle [Debug]
[17:15:03]: ▸ Check Dependencies
[17:15:03]: ▸ Running script '📦 Check Pods Manifest.lock'
[17:15:03]: ▸ Running script 'SwiftGen'
[17:15:04]: ▸ Compiling SpiralImageMaker.swift
[17:15:06]: ▸ Compiling Geometry.swift
[17:15:06]: ▸ Compiling Defaults.swift
[17:15:06]: ▸ Compiling ArrayExtensions.swift
[17:15:06]: ▸ Compiling ToolbarViewController.swift
[17:15:08]: ▸ Compiling ColorManager.swift
[17:15:08]: ▸ Compiling Log.swift
[17:15:08]: ▸ Compiling HelpViewModel.swift
[17:15:08]: ▸ Compiling ColorPickerViewController.swift
[17:15:08]: ▸ Compiling Weak.swift
[17:15:08]: ▸ Compiling RootViewModel.swift
[17:15:09]: ▸ Compiling ScreenExtensions.swift
[17:15:09]: ▸ Compiling PathExtensions.swift
[17:15:22]: ▸ Compiling RootViewController.swift
[17:15:22]: ▸ Compiling AppDelegate.swift
[17:15:22]: ▸ Compiling Layout.swift
[17:15:22]: ▸ Compiling DeviceExtensions.swift
[17:15:22]: ▸ Compiling HelpViewController.swift
[17:15:22]: ▸ Compiling DrawingViewController.swift
[17:15:22]: ▸ Compiling DrawingViewModel.swift
[17:15:22]: ▸ Compiling PickerCell.swift
[17:15:22]: ▸ Compiling CounterRotatingViewController.swift
[17:15:22]: ▸ Compiling Images.swift
[17:15:22]: ▸ Compiling ImageExtensions.swift
[17:15:22]: ▸ Compiling HelpImageProtocol.swift
[17:15:22]: ▸ Compiling Colors.swift
[17:15:22]: ▸ Compiling ToolbarViewModel.swift
[17:15:22]: ▸ Compiling Math.swift
[17:15:22]: ▸ Compiling ImageIO.swift
[17:15:22]: ▸ Compiling ColorPickerLayout.swift
[17:15:22]: ▸ Compiling DrawingView.swift
[17:15:22]: ▸ Compiling ColorPickerViewModel.swift
[17:15:22]: ▸ Linking Padiddle
[17:15:23]: ▸ Processing Info.plist
[17:15:23]: ▸ Running script 'Build Number'
[17:15:23]: ▸ Running script 'Swiftlint'
[17:15:23]: ▸ Running script '📦 Embed Pods Frameworks'
[17:15:23]: ▸ Running script '📦 Copy Pods Resources'
[17:15:23]: ▸ Running script 'Fabric'
[17:15:23]: ▸ Running script 'Copy Screenshot Images If Needed'
[17:15:23]: Running Tests: ▸ Touching Padiddle.app
[17:15:23]: ▸ Building Padiddle/Screenshots [Debug]
[17:15:23]: ▸ Check Dependencies
[17:15:23]: ▸ Compiling Screenshots.swift
[17:15:25]: ▸ Compiling SnapshotHelper.swift
[17:15:25]: ▸ Linking Screenshots
[17:15:25]: Running Tests: ▸ Touching Screenshots.xctest
[17:15:34]: ▸ Failing tests:
[17:15:34]: ▸ -[Screenshots testTakeScreenshots()]
[17:15:34]: ▸ ** TEST FAILED **
[17:15:34]: ▸ All tests
[17:15:34]: ▸ Test Suite Screenshots.xctest started
[17:15:34]: ▸ Screenshots
[17:15:34]: ▸ ✗ testTakeScreenshots, UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7da6f9b0 com.zeveisenberg.Padiddle2 (71304)>, error: Error -25204 performing AXAction 2043
[17:15:34]: ▸ Screenshots.Screenshots
[17:15:34]: ▸ testTakeScreenshots, UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7da6f9b0 com.zeveisenberg.Padiddle2 (71304)>, error: Error -25204 performing AXAction 2043
[17:15:34]: ▸ <unknown>:0
[17:15:34]: ▸ ```
[17:15:34]: ▸ ```
[17:15:34]: ▸      Executed 1 test, with 1 failure (0 unexpected) in 3.705 (3.709) seconds
[17:15:34]: ▸ 
▸ Building Pods/Pods-Padiddle [Debug]
▸ Check Dependencies
▸ Compiling Pods-Padiddle-dummy.m
▸ Compiling Pods_Padiddle_vers.c
▸ Touching Pods_Padiddle.framework
▸ Building Padiddle/Padiddle [Debug]
▸ Check Dependencies
▸ Running script '📦 Check Pods Manifest.lock'
▸ Running script 'SwiftGen'
▸ Compiling SpiralImageMaker.swift
▸ Compiling Geometry.swift
▸ Compiling Defaults.swift
▸ Compiling ArrayExtensions.swift
▸ Compiling ToolbarViewController.swift
▸ Compiling ColorManager.swift
▸ Compiling Log.swift
▸ Compiling HelpViewModel.swift
▸ Compiling ColorPickerViewController.swift
▸ Compiling Weak.swift
▸ Compiling RootViewModel.swift
▸ Compiling ScreenExtensions.swift
▸ Compiling PathExtensions.swift
▸ Compiling RootViewController.swift
▸ Compiling AppDelegate.swift
▸ Compiling Layout.swift
▸ Compiling DeviceExtensions.swift
▸ Compiling HelpViewController.swift
▸ Compiling DrawingViewController.swift
▸ Compiling DrawingViewModel.swift
▸ Compiling PickerCell.swift
▸ Compiling CounterRotatingViewController.swift
▸ Compiling Images.swift
▸ Compiling ImageExtensions.swift
▸ Compiling HelpImageProtocol.swift
▸ Compiling Colors.swift
▸ Compiling ToolbarViewModel.swift
▸ Compiling Math.swift
▸ Compiling ImageIO.swift
▸ Compiling ColorPickerLayout.swift
▸ Compiling DrawingView.swift
▸ Compiling ColorPickerViewModel.swift
▸ Linking Padiddle
▸ Processing Info.plist
▸ Running script 'Build Number'
▸ Running script 'Swiftlint'
▸ Running script '📦 Embed Pods Frameworks'
▸ Running script '📦 Copy Pods Resources'
▸ Running script 'Fabric'
▸ Running script 'Copy Screenshot Images If Needed'
▸ Touching Padiddle.app
▸ Build Succeeded
2016-04-25 17:15:02.572 xcodebuild[71019:6031095] [MT] IDETestOperationsObserverDebug: (81C28654-3C90-482E-8D5B-EFC6F4258EDF) Beginning test session 81C28654-3C90-482E-8D5B-EFC6F4258EDF with Xcode 7D175 on target <DVTiPhoneSimulator: 0x7f9f6be086c0> {
SimDevice: SimDevice : iPad Retina (86C7EE04-99B0-45A4-9025-E1259EC9B62A) : state={ Shutdown } deviceType={ SimDeviceType : com.apple.CoreSimulator.SimDeviceType.iPad-Retina } runtime={ SimRuntime : 9.3 (13E230) - com.apple.CoreSimulator.SimRuntime.iOS-9-3 }
} (9.3 (13E230))
2016-04-25 17:15:02.579 xcodebuild[71019:6031101]  IDETestOperationsObserverDebug: Writing diagnostic log for test session to:
/var/folders/j_/86_9xkgj0pqc0q2h5xx_9lt40000gn/T/snapshot_derived20160425-70623-oo87zf/Logs/Test/F786F589-DBCD-444F-8086-5A348A2C1492/Session-2016-04-25_17:15:02-GQZKJE.log
▸ Building Pods/Pods-Padiddle [Debug]
▸ Check Dependencies
▸ Compiling Pods-Padiddle-dummy.m
▸ Compiling Pods_Padiddle_vers.c
▸ Touching Pods_Padiddle.framework
▸ Building Padiddle/Padiddle [Debug]
▸ Check Dependencies
▸ Running script '📦 Check Pods Manifest.lock'
▸ Running script 'SwiftGen'
▸ Compiling SpiralImageMaker.swift
▸ Compiling Geometry.swift
▸ Compiling Defaults.swift
▸ Compiling ArrayExtensions.swift
▸ Compiling ToolbarViewController.swift
▸ Compiling ColorManager.swift
▸ Compiling Log.swift
▸ Compiling HelpViewModel.swift
▸ Compiling ColorPickerViewController.swift
▸ Compiling Weak.swift
▸ Compiling RootViewModel.swift
▸ Compiling ScreenExtensions.swift
▸ Compiling PathExtensions.swift
▸ Compiling RootViewController.swift
▸ Compiling AppDelegate.swift
▸ Compiling Layout.swift
▸ Compiling DeviceExtensions.swift
▸ Compiling HelpViewController.swift
▸ Compiling DrawingViewController.swift
▸ Compiling DrawingViewModel.swift
▸ Compiling PickerCell.swift
▸ Compiling CounterRotatingViewController.swift
▸ Compiling Images.swift
▸ Compiling ImageExtensions.swift
▸ Compiling HelpImageProtocol.swift
▸ Compiling Colors.swift
▸ Compiling ToolbarViewModel.swift
▸ Compiling Math.swift
▸ Compiling ImageIO.swift
▸ Compiling ColorPickerLayout.swift
▸ Compiling DrawingView.swift
▸ Compiling ColorPickerViewModel.swift
▸ Linking Padiddle
▸ Processing Info.plist
▸ Running script 'Build Number'
▸ Running script 'Swiftlint'
▸ Running script '📦 Embed Pods Frameworks'
▸ Running script '📦 Copy Pods Resources'
▸ Running script 'Fabric'
▸ Running script 'Copy Screenshot Images If Needed'
▸ Touching Padiddle.app
▸ Building Padiddle/Screenshots [Debug]
▸ Check Dependencies
▸ Compiling Screenshots.swift
▸ Compiling SnapshotHelper.swift
▸ Linking Screenshots
▸ Touching Screenshots.xctest
Failing tests:
-[Screenshots testTakeScreenshots()]
** TEST FAILED **

All tests
Test Suite Screenshots.xctest started
Screenshots
✗ testTakeScreenshots, UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7da6f9b0 com.zeveisenberg.Padiddle2 (71304)>, error: Error -25204 performing AXAction 2043

Screenshots.Screenshots
testTakeScreenshots, UI Testing Failure - Failed to perform AX action for monitoring the animations of <XCUIApplicationProcess: 0x7da6f9b0 com.zeveisenberg.Padiddle2 (71304)>, error: Error -25204 performing AXAction 2043
<unknown>:0

     Executed 1 test, with 1 failure (0 unexpected) in 3.705 (3.709) seconds

[17:15:34]: Exit status: 65
[17:15:34]: Tests failed - check out the log above

+-------------+---------+
|   snapshot results    |
+-------------+---------+
| Device      | en-US   |
+-------------+---------+
| iPhone 6    |  ❌      |
| iPad Retina |  ❌      |
+-------------+---------+

Successfully submitted a crash report. If this is a problem with one of the tools specifically,
please submit an issue on GitHub and attach the following number to it: '95afbdd56fdbee4e47fb4819045e8bcc'
The crash report has been stored locally '/tmp/sentry_95afbdd56fdbee4e47fb4819045e8bcc.json'
/Users/zev/.rvm/gems/ruby-2.2.3/gems/snapshot-1.12.1/lib/snapshot/runner.rb:52:in `work': [!] Tests failed - check out the log above; Tests failed - check out the log above (RuntimeError)
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/snapshot-1.12.1/bin/snapshot:36:in `block (2 levels) in run'
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/fastlane_core-0.41.3/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/snapshot-1.12.1/bin/snapshot:96:in `run'
    from /Users/zev/.rvm/gems/ruby-2.2.3/gems/snapshot-1.12.1/bin/snapshot:110:in `<top (required)>'
    from /Users/zev/.rvm/gems/ruby-2.2.3/bin/snapshot:23:in `load'
    from /Users/zev/.rvm/gems/ruby-2.2.3/bin/snapshot:23:in `<main>'
    from /Users/zev/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `eval'
    from /Users/zev/.rvm/gems/ruby-2.2.3/bin/ruby_executable_hooks:15:in `<main>'

Configuration Files

Please copy the complete content of your Fastfile and any other configuration files you use below:

Currently using snapshot only, not fastlane as a whole. That comes next. Here's my spapfile. You can see another attempt I made at passing launch variables in the launch_arguments line, but I've got the feeling I'm misusing that parameter.

# 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",
  # "fr-Fr",
  # "it-It",
  # "zh-Hans",
  # "zh-Hant",
])

# Arguments to pass to the app on launch. See https://github.com/fastlane/fastlane/tree/master/snapshot#launch-arguments
launch_arguments(["-FASTLANE_SNAPSHOT YES"])

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

# Where should the resulting screenshots be stored?
output_directory "../Captured 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 "./Project.xcworkspace"

# For more information about all available options run
# snapshot --help

Environment

fastlane version (run fastlane -v): fastlane 1.81.0

snapshot version (run snapshot -v): snapshot 1.12.1

Do you use bundler to execute fastlane (i.e. bundle exec fastlane)? Yes

Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)? yes

TKBurner commented 8 years ago

Hi @ZevEisenberg! Great to hear from you again. Right now you'll have to wire this up yourself as there isn't a built in way to detect this. Let me know how it goes and if you uncover anything. Thanks!

Ashton-W commented 8 years ago

-FASTLANE_SNAPSHOT YES is always present in launch_arguments. It is added by the SnapshotHelper.swift

Ashton-W commented 8 years ago

4416

TKBurner commented 8 years ago

@Ashton-W Thanks for linking this to your PR! I'll make sure the team takes a look 👍

fastlane-bot commented 7 years ago

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.

Please make sure to update to the latest fastlane version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:

ZevEisenberg commented 7 years ago

Pretty sure this is 👍 now.

TKBurner commented 7 years ago

@ZevEisenberg Thanks! Hope you have a great week :+1: