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

Fastlane Snapshot spans over an eternity before completing #21385

Open
4 tasks done
aamoussa97 opened this issue Jul 8, 2023 · 1 comment
Open
4 tasks done

Fastlane Snapshot spans over an eternity before completing #21385

aamoussa97 opened this issue Jul 8, 2023 · 1 comment

Comments

@aamoussa97
Copy link

New Issue Checklist

Issue Description

Fastlane Snapshot takes an eternity to complete capturing screenshots for languages listed in Snapfile. After an increase in Localizable.strings embedded in app/referenced in Xcode project file which also resulted in an increase of the Localizable.strings copied by Fastlane Snapshot (all of them, e.g. 7 languages defined in Xcode => 7 Localizable.strings copied), the time required for the test to complet finish increases drastically. For only two languages with a base of 8 Localizable.strings copied (8 languages in Xcode), the average time for tehuse two languages was about under a hour.

Another observation:
For some reason, it goes copies all Localizable.strings it finds in the project and runs through them after the inititial test for a given language is done, although only the first run has the launch argumetns and capturing of screenshots, while the rest is without and just launching the app, trying to do the test and then failing, rinse and repeat. As such, I'm forced to hardcode specific variables for the test on Fastlane simulators to pass consistently.

Command executed

bundle exec fastlane snapshot --skip_open_summary

Complete output when running fastlane, including the stack trace and command used

Example of start-end of test for one language
[20:39:54]: ▸ Processing Info.plist
[20:39:54]: ▸ Linking Savings
[20:39:54]: ▸ Linking SavingsFastlaneSnapshot
[20:39:54]: ▸ Processing empty-SavingsFastlaneSnapshot.plist
[20:39:54]: ▸ Build Succeeded
[20:39:54]: ▸ --- xcodebuild: WARNING: Using the first of multiple matching destinations:
[20:39:54]: ▸ { platform:iOS Simulator, id:A4B53192-9506-4271-9819-F21B579D7080, OS:16.4, name:iPhone 14 Plus }
[20:39:54]: ▸ { platform:iOS Simulator, id:A4B53192-9506-4271-9819-F21B579D7080, OS:16.4, name:iPhone 14 Plus }
[20:39:55]: ▸ Linking Savings
[20:39:55]: ▸ Linking SavingsFastlaneSnapshot
[21:30:23]: ▸ 2023-07-03 21:30:23.500 xcodebuild[25969:1640190] [MT] IDETestOperationsObserverDebug: 3027.958 elapsed -- Testing started completed.
[21:30:23]: ▸ 2023-07-03 21:30:23.500 xcodebuild[25969:1640190] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
[21:30:23]: ▸ 2023-07-03 21:30:23.500 xcodebuild[25969:1640190] [MT] IDETestOperationsObserverDebug: 3027.958 sec, +3027.958 sec -- end
[21:30:25]: ▸ Test Succeeded
[21:30:28]: Clearing Status Bar Override

+----------------+-------+-------+
| snapshot results |
+----------------+-------+-------+
| Device | fr-FR | it-IT |
+----------------+-------+-------+
| iPhone 14 Plus | 💚 | 💚 |

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 13.4.1
Ruby 3.2.1
Bundler? false
Git git version 2.38.1
Installation Source ~/.rbenv/versions/3.2.1/bin/fastlane
Host macOS 13.4.1 (22F82)
Ruby Lib Dir ~/.rbenv/versions/3.2.1/lib
OpenSSL Version OpenSSL 3.0.8 7 Feb 2023
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 14.3.1
Swift Version 5.8.1

System Locale

Variable Value
LANG da_DK.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./Fastfile`
# This file contains the fastlane.tools configuration
# You can find the documentation at https://docs.fastlane.tools
#
# For a list of all available actions, check out
#
#     https://docs.fastlane.tools/actions
#
# For a list of all available plugins, check out
#
#     https://docs.fastlane.tools/plugins/available-plugins
#

# Uncomment the line if you want fastlane to automatically update itself
# update_fastlane

def environment_variables
  ENV["SNAPSHOT_SIMULATOR_WAIT_FOR_BOOT_TIMEOUT"] = 15
end

default_platform(:ios)

platform :ios do
  desc "Generate new localized screenshots"
  lane :screenshots do
    #environment_variables
    capture_screenshots(scheme: "SavingsFastlaneSnapshot")
  end
end
`./Appfile`
app_identifier("APP_IDENTIFIER") # The bundle identifier of your app

# For more information about the Appfile, see:
#     https://docs.fastlane.tools/advanced/#appfile

# fastlane snapshot --reinstall_app --app_identifier "APP_IDENTIFIER"

fastlane gems

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

Loaded fastlane plugins:

*No plugins Loaded

Loaded gems
Gem Version
error_highlight 0.5.1
did_you_mean 1.6.3
syntax_suggest 1.0.2
atomos 0.1.3
rexml 3.2.5
CFPropertyList 3.0.6
claide 1.1.0
colored2 3.1.2
nanaimo 0.3.0
xcodeproj 1.22.0
rouge 2.0.7
xcpretty 0.3.0
terminal-notifier 2.0.0
unicode-display_width 1.8.0
terminal-table 1.8.0
word_wrap 1.0.0
optparse 0.1.1
tty-screen 0.8.1
tty-cursor 0.7.1
tty-spinner 0.9.3
artifactory 3.0.15
babosa 1.0.4
colored 1.2
highline 2.0.3
commander 4.6.0
unf_ext 0.0.8.2
unf 0.1.4
domain_name 0.5.20190701
http-cookie 1.0.5
faraday-cookie_jar 0.0.7
faraday-em_http 1.0.0
faraday-em_synchrony 1.0.0
faraday-excon 1.1.0
faraday-httpclient 1.0.1
faraday-multipart 1.0.4
faraday-net_http 1.0.1
faraday-net_http_persistent 1.2.0
faraday-patron 1.0.0
faraday-rack 1.0.0
faraday-retry 1.0.3
ruby2_keywords 0.0.5
faraday 1.10.3
faraday_middleware 1.2.0
gh_inspector 1.1.3
json 2.6.3
mini_magick 4.12.0
naturally 2.2.1
rubyzip 2.3.2
security 0.1.3
xcpretty-travis-formatter 1.0.1
dotenv 2.8.1
simctl 1.6.10
google-cloud-env 1.6.0
google-cloud-core 1.6.0
google-apis-storage_v1 0.19.0
rake 13.0.6
digest-crc 0.6.4
mini_mime 1.1.2
google-cloud-storage 1.44.0
emoji_regex 3.2.3
set 1.0.3
plist 3.7.0
public_suffix 5.0.1
addressable 2.8.4
multipart-post 2.3.0
excon 0.100.0
fastimage 2.2.7
bundler 2.4.6
jwt 2.7.1
webrick 1.8.1
httpclient 2.8.3
multi_json 1.15.0
signet 0.17.0
os 1.1.4
memoist 0.16.2
googleauth 1.6.0
retriable 3.1.2
trailblazer-option 0.1.2
declarative 0.0.20
uber 0.1.0
representable 3.2.0
google-apis-core 0.11.0
google-apis-playcustomapp_v1 0.13.0
google-apis-androidpublisher_v3 0.44.0
google-cloud-errors 1.3.1
google-apis-iamcredentials_v1 0.17.0
aws-eventstream 1.2.0
aws-sigv4 1.5.2
aws-partitions 1.781.0
jmespath 1.6.2
aws-sdk-core 3.175.0
aws-sdk-kms 1.67.0
aws-sdk-s3 1.126.0
forwardable 1.3.3
logger 1.5.3
pathname 0.2.1
shellwords 0.1.0
cgi 0.3.6
date 3.3.3
timeout 0.3.1
securerandom 0.2.2
uri 0.12.0
openssl 3.1.0
digest 3.1.1
ipaddr 1.2.5
resolv 0.2.2
time 0.2.1
stringio 3.0.4
open-uri 0.3.0
mutex_m 0.1.2
net-http 0.3.2
net-protocol 0.2.1
ostruct 0.5.5
english 0.7.2
erb 4.0.2
abbrev 0.1.1
tempfile 0.1.3
delegate 0.3.0
fileutils 1.7.0
tmpdir 0.1.3
base64 0.1.1
singleton 0.1.1
open3 0.1.2
nkf 0.1.2
racc 1.6.2
nokogiri 1.14.2
prettyprint 0.1.1
pp 0.4.0
find 0.1.1
yaml 0.2.1
psych 5.0.1

generated on: 2023-07-08

@aamoussa97
Copy link
Author

aamoussa97 commented Jul 9, 2023

Update: After running for a little under 24 hours, it has only finished 4 out of 30 languages. Also, the two simulators spawned by Fastlane is now named Clone 233 and Clone 234 of iPhone 14 Plus. Not sure if that tells anything.

Update 2: After 12 hours from my previous comment, being 1,5 days, the total languages processed is 6 out of 30, with Fastlane spawned simulators reaching 1025 and 1026 of iPhone 14 Plus respectively. The structure can also be seen in the attached screenshot. "I forgårs" is the day before yesterday (8th of June 2023), "I går" is yesterday (9th of June 2023), while "I dag" is today (10th of June 2023). Obviously it's nice that Snapshot is doing progress, with the correct Localizable.strings applied to the given language, although this is still extremely slow, especially that this is still on one device only.
Skærmbillede 2023-07-10 kl  10 04 55
Skærmbillede 2023-07-10 kl  09 56 44

Update 3: Having been running for a couple of days at least, until the 12th, it has completed a few more languages, although still not even halfway, and only on one device. I'm running it on an M1 Pro, and I have no idea what's going on.
image

Please advice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant