Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Snapshot with Catalyst fails at latest_simulator_version_for_device #18663

Closed
4 tasks done
edwinveger opened this issue May 9, 2021 · 4 comments
Closed
4 tasks done

Comments

@edwinveger
Copy link

New Issue Checklist

Issue Description

I have an iOS app which supports macOS via Catalyst. I want to take snapshots of the Catalyst build.
I have a lane which executes a specific test case/suite. Executing the lane fails with an error inside snapshot's simulator_launcher.rb.

fastlane_core/lib/fastlane_core/device_manager.rb:134:in `latest_simulator_version_for_device': \e[31m[!] undefined method `os_version' for nil:NilClass\e[0m (NoMethodError)

TBH I'm not sure if this is actually a bug or just missing functionality. I noticed scan explicitly supports Catalyst via the parameter catalyst_platform. I tried to reverse engineer that but I'm inexperienced with Ruby and the Fastlane internals.

Command executed

bundle exec fastlane stageoverviewmacos

Complete output when running fastlane, including the stack trace and command used
 
[✔] 🚀 
[12:18:24]: ----------------------------------------
[12:18:24]: --- Step: Verifying fastlane version ---
[12:18:24]: ----------------------------------------
[12:18:24]: Your fastlane version 2.182.0 matches the minimum requirement of 2.1.2  ✅
[12:18:24]: ------------------------------
[12:18:24]: --- Step: default_platform ---
[12:18:24]: ------------------------------
[12:18:24]: Driving the lane 'ios stageoverviewmacos' 🚀
[12:18:24]: ----------------------
[12:18:24]: --- Step: snapshot ---
[12:18:24]: ----------------------
[12:18:24]: Successfully loaded '/Users/edwin/Developer/VacationTime/fastlane/Snapfile' 📄

+----------------------------+----------------------------------------------------------------+
| Detected Values from './fastlane/Snapfile' |
+----------------------------+----------------------------------------------------------------+
| devices | ["iPhone 12 Pro Max", "iPad Pro (12.9-inch) (5th generation)"] |
| scheme | snapshot |
| output_directory | ./fastlane/screenshots |
| clear_previous_screenshots | false |
| derived_data_path | ./fastlane/DerivedData |
+----------------------------+----------------------------------------------------------------+

[12:18:25]: Resolving Swift Package Manager dependencies...
[12:18:25]: $ xcodebuild -resolvePackageDependencies -scheme snapshot -project ./VacationTime.xcodeproj -derivedDataPath ./fastlane/DerivedData
[12:18:25]: ▸ objc[21221]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20237d160) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1147002b8). One of the two will be used. Which one is undefined.
[12:18:25]: ▸ objc[21221]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20237d1b0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x114700308). One of the two will be used. Which one is undefined.
[12:18:25]: ▸ Command line invocation:
[12:18:25]: ▸ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -resolvePackageDependencies -scheme snapshot -project ./VacationTime.xcodeproj -derivedDataPath ./fastlane/DerivedData
[12:18:25]: ▸ User defaults from command line:
[12:18:25]: ▸ IDEDerivedDataPathOverride = /Users/edwin/Developer/VacationTime/fastlane/DerivedData
[12:18:25]: ▸ IDEPackageSupportUseBuiltinSCM = YES
[12:18:25]: ▸ Resolve Package Graph
[12:18:25]: ▸ Resolved source packages:
[12:18:25]: ▸ ASN1Swift: https://github.com/tikhop/ASN1Swift @ 1.2.4
[12:18:25]: ▸ TPInAppReceipt: https://github.com/tikhop/TPInAppReceipt @ 3.1.1
[12:18:25]: ▸ resolved source packages: ASN1Swift, TPInAppReceipt
[12:18:25]: $ xcodebuild -showBuildSettings -scheme snapshot -project ./VacationTime.xcodeproj -derivedDataPath ./fastlane/DerivedData
objc[21227]: Class AMSupportURLConnectionDelegate is implemented in both /usr/lib/libauthinstall.dylib (0x20237d160) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x1166102b8). One of the two will be used. Which one is undefined.
objc[21227]: Class AMSupportURLSession is implemented in both /usr/lib/libauthinstall.dylib (0x20237d1b0) and /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/MobileDevice (0x116610308). One of the two will be used. Which one is undefined.

+--------------------------------------+---------------------------------------------------------------------------+
| Summary for snapshot 2.182.0 |
+--------------------------------------+---------------------------------------------------------------------------+
| only_testing | ["snapshotUITests/RegressionSnapshotTests/testSnapshotHanoi"] |
| output_directory | /Users/edwin/Developer/VacationTime/fastlane/screenshots_regression_macos |
| devices | ["Mac"] |
| project | ./VacationTime.xcodeproj |
| languages | ["en-US"] |
| launch_arguments | [""] |
| output_simulator_logs | false |
| skip_open_summary | false |
| skip_helper_version_check | false |
| clear_previous_screenshots | false |
| reinstall_app | false |
| erase_simulator | false |
| headless | true |
| override_status_bar | false |
| localize_simulator | false |
| app_identifier | REDACTED |
| buildlog_path | ~/Library/Logs/snapshot |
| clean | false |
| scheme | snapshot |
| number_of_retries | 1 |
| stop_after_first_error | false |
| derived_data_path | ./fastlane/DerivedData |
| result_bundle | false |
| concurrent_simulators | true |
| disable_slide_to_type | false |
| skip_package_dependencies_resolution | false |
| disable_package_automatic_updates | false |
| use_system_scm | false |
| xcode_path | /Applications/Xcode.app |
+--------------------------------------+---------------------------------------------------------------------------+

[12:18:27]: Building and running project - this might take some time...
+------------------+------------------------+
| Lane Context |
+------------------+------------------------+
| DEFAULT_PLATFORM | ios |
| PLATFORM_NAME | ios |
| LANE_NAME | ios stageoverviewmacos |
+------------------+------------------------+

+------+----------------------------+-------------+
| fastlane summary |
+------+----------------------------+-------------+
| Step | Action | Time (in s) |
+------+----------------------------+-------------+
| 1 | Verifying fastlane version | 0 |
| 2 | default_platform | 0 |
| 💥 | snapshot | 2 |
+------+----------------------------+-------------+

[12:18:27]: fastlane finished with errors

Looking for related GitHub issues on fastlane/fastlane...

➡️ Error running screenshots command - latest_simulator_version_for_device: undefined method `os_version' for nil:NilClass
#17894 [closed] 2 💬
05 Mar 2021

➡️ Upload to play store error - NoMethodError: [!] undefined method `each_with_index' for nil:NilClass
#18403 [closed] 57 💬
6 weeks ago

➡️ Support for test-only runs for Snapshot using test binary only
#12723 [closed] 10 💬
14 Nov 2018

and 1 more at: https://github.com/fastlane/fastlane/search?q=undefined%20method%20%60os_version%27%20for%20nil&type=Issues&utf8=✓

🔗 You can ⌘ + double-click on links to open them directly in your browser.
bundler: failed to load command: fastlane (/Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/bin/fastlane)
Traceback (most recent call last):
52: from /Users/edwin/.rbenv/versions/2.7.3/bin/bundle:23:in <main>' 51: from /Users/edwin/.rbenv/versions/2.7.3/bin/bundle:23:in load'
50: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/exe/bundle:37:in <top (required)>' 49: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/friendly_errors.rb:130:in with_friendly_errors'
48: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/exe/bundle:49:in block in <top (required)>' 47: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:24:in start'
46: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/base.rb:485:in start' 45: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:30:in dispatch'
44: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor.rb:392:in dispatch' 43: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in invoke_command'
42: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/vendor/thor/lib/thor/command.rb:27:in run' 41: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli.rb:494:in exec'
40: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:28:in run' 39: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:63:in kernel_load'
38: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/bundler-2.2.17/lib/bundler/cli/exec.rb:63:in load' 37: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/bin/fastlane:23:in <top (required)>'
36: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/bin/fastlane:23:in load' 35: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/bin/fastlane:23:in <top (required)>'
34: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/cli_tools_distributor.rb:122:in take_off' 33: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/commands_generator.rb:42:in start'
32: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/commands_generator.rb:353:in run' 31: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/delegates.rb:18:in run!'
30: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane_core/lib/fastlane_core/ui/fastlane_runner.rb:76:in run!' 29: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/runner.rb:444:in run_active_command'
28: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:157:in run' 27: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/commander-4.6.0/lib/commander/command.rb:187:in call'
26: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/commands_generator.rb:109:in block (2 levels) in run' 25: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/command_line_handler.rb:36:in handle'
24: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/lane_manager.rb:47:in cruise_lane' 23: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/runner.rb:45:in execute'
22: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/runner.rb:45:in chdir' 21: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/runner.rb:49:in block in execute'
20: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/lane.rb:33:in call' 19: from Fastfile:36:in block (2 levels) in parsing_binding'
18: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/fast_file.rb:159:in method_missing' 17: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/runner.rb:157:in trigger_action_by_name'
16: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/runner.rb:229:in execute_action' 15: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/runner.rb:229:in chdir'
14: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/runner.rb:255:in block in execute_action' 13: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/actions/actions_helper.rb:69:in execute_action'
12: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/runner.rb:263:in block (2 levels) in execute_action' 11: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane/lib/fastlane/actions/capture_ios_screenshots.rb:14:in run'
10: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/runner.rb:45:in work' 9: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:45:in take_screenshots_simultaneously'
8: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:45:in each' 7: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:46:in block in take_screenshots_simultaneously'
6: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:46:in each_with_index' 5: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:46:in each'
4: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:62:in block (2 levels) in take_screenshots_simultaneously' 3: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:62:in group_by'
2: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:62:in each' 1: from /Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/snapshot/lib/snapshot/simulator_launchers/simulator_launcher.rb:62:in block (3 levels) in take_screenshots_simultaneously'
/Users/edwin/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/gems/fastlane-2.182.0/fastlane_core/lib/fastlane_core/device_manager.rb:134:in latest_simulator_version_for_device': \e[31m[!] undefined method os_version' for nil:NilClass\e[0m (NoMethodError)
~/Developer/VacationTime %

Environment

 
✅ fastlane environment ✅

Stack

Key Value
OS 11.3.1
Ruby 2.7.3
Bundler? true
Git git version 2.30.1 (Apple Git-130)
Installation Source ~/.rbenv/versions/2.7.3/lib/ruby/gems/2.7.0/bin/fastlane
Host macOS 11.3.1 (20E241)
Ruby Lib Dir ~/.rbenv/versions/2.7.3/lib
OpenSSL Version OpenSSL 1.1.1k 25 Mar 2021
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 12.5

System Locale

Variable Value
LANG nl_NL.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
fastlane_version "2.1.2"

default_platform :ios

platform :ios do
    before_all do
    end

    desc "Generate screenshots of each puzzle stage for an overview"
    lane :stageoverviewmacos do
        snapshot(
            only_testing: ["snapshotUITests/RegressionSnapshotTests/testSnapshotHanoi"],
            output_directory: "./fastlane/screenshots_regression_macos",
            devices: ["Mac"]
        )
    end
    
end


# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://docs.fastlane.tools/actions

# fastlane reports which actions are used
# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer
`./fastlane/Appfile`
app_identifier "REDACTED" # The bundle identifier of your app
apple_id "REDACTED" # Your Apple email address
itc_team_name "REDACTED"

fastlane gems

Gem Version Update-Status
fastlane 2.182.0 ✅ Up-To-Date

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
did_you_mean 1.4.0
bundler 2.2.17
uri 0.10.0
rake 13.0.3
CFPropertyList 3.0.3
public_suffix 4.0.6
addressable 2.7.0
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.1.1
aws-partitions 1.452.0
aws-sigv4 1.2.3
jmespath 1.4.0
aws-sdk-core 3.114.0
aws-sdk-kms 1.43.0
aws-sdk-s3 1.94.1
babosa 1.0.4
claide 1.0.3
colored 1.2
colored2 3.1.2
highline 2.0.3
commander 4.6.0
declarative 0.0.20
digest-crc 0.6.3
unf_ext 0.0.7.7
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.7.6
emoji_regex 3.2.2
excon 0.81.0
faraday-excon 1.1.0
faraday-net_http 1.0.1
faraday-net_http_persistent 1.1.0
multipart-post 2.0.0
ruby2_keywords 0.0.4
faraday 1.4.1
http-cookie 1.0.3
faraday-cookie_jar 0.0.7
faraday_middleware 1.0.0
fastimage 2.2.3
gh_inspector 1.1.3
jwt 2.2.3
memoist 0.16.2
multi_json 1.15.0
os 1.1.1
signet 0.15.0
googleauth 0.16.2
httpclient 2.8.3
mini_mime 1.1.0
trailblazer-option 0.1.1
uber 0.1.0
representable 3.1.1
retriable 3.1.2
google-api-client 0.38.0
rexml 3.2.5
webrick 1.7.0
google-apis-core 0.3.0
google-apis-iamcredentials_v1 0.3.0
google-apis-storage_v1 0.3.0
google-cloud-env 1.5.0
google-cloud-errors 1.1.0
google-cloud-core 1.6.0
google-cloud-storage 1.31.0
json 2.5.1
mini_magick 4.11.0
naturally 2.2.1
plist 3.6.0
rubyzip 2.3.0
security 0.1.3
simctl 1.6.8
terminal-notifier 2.0.0
unicode-display_width 1.7.0
terminal-table 1.8.0
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
word_wrap 1.0.0
nanaimo 0.3.0
xcodeproj 1.19.0
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1

generated on: 2021-05-09

@fastlane-bot
Copy link

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 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@arkie
Copy link

arkie commented Jun 22, 2021

Adding the following to fastlane/Snapfile

concurrent_simulators(false)

allows it to skip simulator_launcher.rb#L62, which should allow continuing to debug; I also needed to comment out XCUIDevice code in fastlane/SnapshotHelper.swift to get it to run to completion (although YMMV on actually getting images).

@fastlane-bot
Copy link

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 👍

Friendly reminder: contributions are always welcome! Check out CONTRIBUTING.md for more information on how to help with fastlane and feel free to tackle this issue yourself 💪

This issue will be auto-closed if there is no reply within 1 month.

@fastlane-bot
Copy link

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem 👍

@fastlane fastlane locked and limited conversation to collaborators Nov 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants