fastlane: Snapshot: UITest ok on Xcode but failed on snapshot
New Issue Checklist
- Updated fastlane to the latest version
- I have read the Contribution Guidelines
Issue Description
I was using successfully snapshot to take screenshots of all device sizes for both en and fr locale.
I have a single UI test case testTakeScreenshots
which basically go through the app and take 4 screenshots.
This tests pass successfully when running on Xcode but this fails running with snapshot and I cannot figure out why.
Complete output when running fastlane, including the stack trace and command used
testTakeScreenshots, UI Testing Failure - Failure getting snapshot Error Domain=XCTestManagerErrorDomain Code=9 "Error -25204 getting snapshot for element <AXUIElement 0x7fca0ae146f0> {pid=28169}" UserInfo={NSLocalizedDescription=Error -25204 getting snapshot for element <AXUIElement 0x7fca0ae146f0> {pid=28169}}
<unknown>:0
Executed 1 test, with 1 failure (0 unexpected) in 6.084 (6.087) seconds
ERROR [2016-05-17 21:52:09.52]: Exit status: 65
ERROR [2016-05-17 21:52:09.53]: Tests failed - check out the log above
ERROR [2016-05-17 21:52:09.53]: Backtrace:
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/fastlane_core-0.41.3/lib/fastlane_core/ui/interface.rb:139:in `user_error!'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/fastlane_core-0.41.3/lib/fastlane_core/ui/ui.rb:14:in `method_missing'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/error_handler.rb:10:in `handle_test_error'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:172:in `block in launch'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/fastlane_core-0.41.3/lib/fastlane_core/command_executor.rb:85:in `call'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/fastlane_core-0.41.3/lib/fastlane_core/command_executor.rb:85:in `execute'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:166:in `launch'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:66:in `run_for_device_and_language'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:45:in `block (3 levels) in work'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:37:in `each'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:37:in `block (2 levels) in work'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:36:in `each'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:36:in `block in work'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:35:in `each'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:35:in `work'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/bin/snapshot:36:in `block (2 levels) in run'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/fastlane_core-0.41.3/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/bin/snapshot:96:in `run'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/bin/snapshot:110:in `<top (required)>'
/Users/GUL/.rvm/rubies/ruby-2.1.3/bin/snapshot:23:in `load'
/Users/GUL/.rvm/rubies/ruby-2.1.3/bin/snapshot:23:in `<main>'
/Users/GUL/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
/Users/GUL/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
+----------+---------+
| snapshot results |
+----------+---------+
| Device | fr-FR |
+----------+---------+
| iPhone 6 | ❌ |
+----------+---------+
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: 'fd9b91c7c71867c72260d25d90fbb7a7'
The crash report has been stored locally '/tmp/sentry_fd9b91c7c71867c72260d25d90fbb7a7.json'
/Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/lib/snapshot/runner.rb:52:in `work': [!] Tests failed - check out the log above (RuntimeError)
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/bin/snapshot:36:in `block (2 levels) in run'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/command.rb:178:in `call'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/command.rb:153:in `run'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/runner.rb:428:in `run_active_command'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/fastlane_core-0.41.3/lib/fastlane_core/ui/fastlane_runner.rb:23:in `run!'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/commander-4.3.5/lib/commander/delegates.rb:15:in `run!'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/bin/snapshot:96:in `run'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/lib/ruby/gems/2.1.0/gems/snapshot-1.12.2/bin/snapshot:110:in `<top (required)>'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/bin/snapshot:23:in `load'
from /Users/GUL/.rvm/rubies/ruby-2.1.3/bin/snapshot:23:in `<main>'
from /Users/GUL/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `eval'
from /Users/GUL/.rvm/gems/ruby-2.1.3/bin/ruby_executable_hooks:15:in `<main>'
Configuration Files
Snapfile:
# A list of devices you want to take the screenshots from
devices([
"iPhone 6",
#"iPhone 6 Plus",
#"iPhone 5",
#"iPhone 4s",
])
languages([
#"en-US",
"fr-FR"
])
# 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 "usiappUITests"
# Where should the resulting screenshots be stored?
output_directory "./fastlane/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 "./usiapp.xcworkspace"
# For more information about all available options run
# snapshot --help
Environment
fastlane version (run fastlane -v
):
fastlane 1.89.0
snapshot version snapshot 1.12.2
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: 17 (2 by maintainers)
I removed nimble as a UI Test dependency and now I am generating screenshots successfully! I’m not sure why the tests pass when run from Xcode but fail from
snapshot
however I guess this has fixed the issue.