I want to remove all existing screenshots and supply 8 new screenshots
In that case I either need to use overwrite_screenshots or sync_screenshots which removes all screenshots ahead of time
I then run the script to upload all of the screenshots - some of them fail with a 500 error
I then have to cancel the script and run it again, starting from the start every time
Let me know if there's another way to approach this or another option I can try - thanks for your help - really appreciate this project
The exact text of the error in the console is
Waiting for screenshots to appear before uploading. This is unlikely to be recovered unless it's 503 error. error="Server error got 500"
New Issue Checklist
Issue Description
Here is my scenario:
overwrite_screenshots
orsync_screenshots
which removes all screenshots ahead of timeThe exact text of the error in the console is
Command executed
Environment
✅ fastlane environment ✅
### Stack | Key | Value | | --------------------------- | ------------------------------------ | | OS | 15.0.1 | | Ruby | 3.3.5 | | Bundler? | true | | Git | git version 2.46.2 | | Installation Source | ~/.rbenv/versions/3.3.5/bin/fastlane | | Host | macOS 15.0.1 (24A348) | | Ruby Lib Dir | ~/.rbenv/versions/3.3.5/lib | | OpenSSL Version | OpenSSL 3.3.2 3 Sep 2024 | | Is contained | false | | Is homebrew | false | | Is installed via Fabric.app | false | | Xcode Path | /Library/Developer/CommandLineTools/ | | Xcode Version | | | Swift Version | 6.0 | ### System Locale | Variable | Value | | | -------- | ----------- | - | | LANG | en_GB.UTF-8 | ✅ | | LC_ALL | | | | LANGUAGE | | | ### fastlane files:`./fastlane/Fastfile`
```ruby APP_IDENTIFIER = "xxx" PACKAGE_NAME = "xxx" platform :ios do desc "Upload screenshots to App Store Connect" lane :screenshots do deliver( app_identifier: APP_IDENTIFIER ) end desc "Upload batched screenshots to App Store Connect" lane :batch do upload_screenshots_in_batches(APP_IDENTIFIER, "screenshots") end end def upload_screenshots_in_batches(app_identifier, screenshots_path) puts "Current working directory: #{Dir.pwd}" unless Dir.exist?(screenshots_path) UI.user_error!("Screenshots directory not found: #{screenshots_path}") end screenshot_dirs = Dir.glob("#{screenshots_path}/*").select { |f| File.directory?(f) } puts "Found directories: #{screenshot_dirs}" if screenshot_dirs.empty? UI.user_error!("No screenshot directories found in #{screenshots_path}") end FileUtils.rm_rf("../current-batch/screenshots") FileUtils.mkdir_p("../current-batch/screenshots") screenshot_dirs.each do |dir| dir_name = File.basename(dir) target_dir = File.join("../current-batch/screenshots", dir_name) FileUtils.mkdir_p(target_dir) puts "Created directory: #{target_dir}" end # This is to clear out AppStoreConnect so we end up with a clean slate deliver( app_identifier: app_identifier, screenshots_path: "./current-batch/screenshots/", overwrite_screenshots: true, sync_screenshots: true, force: true, verbose: true ) screenshot_dirs.each do |dir| dir_name = File.basename(dir) target_dir = File.join("../current-batch/screenshots", dir_name) FileUtils.rm_rf(target_dir) puts "Deleted directory: #{target_dir}" end screenshot_dirs.each_slice(2) do |batch| FileUtils.mkdir_p("../current-batch/screenshots") batch.each do |dir| FileUtils.cp_r(dir, "../current-batch/screenshots/") end deliver( app_identifier: app_identifier, screenshots_path: "./current-batch/screenshots/", overwrite_screenshots: false, force: true, verbose: true ) FileUtils.rm_rf("../current-batch/screenshots") puts "Pausing for 30 seconds before processing the next batch..." sleep(30) end end ````./fastlane/Appfile`
```ruby apple_id "dave@getstoryteller.com" itc_team_name "xxx" itc_team_id "xxx" ```Loaded gems
| Gem | Version | | ------------------------------- | ------------ | | error_highlight | 0.6.0 | | did_you_mean | 1.6.3 | | syntax_suggest | 2.0.0 | | bundler | 2.5.20 | | pathname | 0.3.0 | | rake | 13.2.1 | | base64 | 0.2.0 | | nkf | 0.2.0 | | rexml | 3.3.8 | | CFPropertyList | 3.0.7 | | abbrev | 0.1.2 | | public_suffix | 6.0.1 | | addressable | 2.8.7 | | artifactory | 3.0.17 | | atomos | 0.1.3 | | aws-eventstream | 1.3.0 | | aws-partitions | 1.992.0 | | aws-sigv4 | 1.10.0 | | jmespath | 1.6.2 | | aws-sdk-core | 3.210.0 | | aws-sdk-kms | 1.95.0 | | aws-sdk-s3 | 1.169.0 | | babosa | 1.0.4 | | claide | 1.1.0 | | colored | 1.2 | | colored2 | 3.1.2 | | highline | 2.0.3 | | commander | 4.6.0 | | declarative | 0.0.20 | | digest-crc | 0.6.5 | | domain_name | 0.6.20240107 | | dotenv | 2.8.1 | | emoji_regex | 3.2.3 | | excon | 0.112.0 | | faraday-em_http | 1.0.0 | | faraday-em_synchrony | 1.0.0 | | faraday-excon | 1.1.0 | | faraday-httpclient | 1.0.1 | | multipart-post | 2.4.1 | | faraday-multipart | 1.0.4 | | faraday-net_http | 1.0.2 | | 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.4 | | http-cookie | 1.0.7 | | faraday-cookie_jar | 0.0.7 | | faraday_middleware | 1.2.1 | | fastimage | 2.3.1 | | sysrandom | 1.0.5 | | fastlane-sirp | 1.0.0 | | gh_inspector | 1.1.3 | | jwt | 2.9.3 | | multi_json | 1.15.0 | | os | 1.1.4 | | signet | 0.19.0 | | googleauth | 1.8.1 | | httpclient | 2.8.3 | | mini_mime | 1.1.5 | | trailblazer-option | 0.1.2 | | uber | 0.1.0 | | representable | 3.2.0 | | retriable | 3.1.2 | | google-apis-core | 0.11.3 | | google-apis-androidpublisher_v3 | 0.54.0 | | google-apis-playcustomapp_v1 | 0.13.0 | | google-cloud-env | 1.6.0 | | google-apis-iamcredentials_v1 | 0.17.0 | | google-apis-storage_v1 | 0.31.0 | | google-cloud-errors | 1.4.0 | | google-cloud-core | 1.7.1 | | google-cloud-storage | 1.47.0 | | json | 2.7.2 | | mini_magick | 4.13.2 | | naturally | 2.2.1 | | optparse | 0.5.0 | | plist | 3.7.1 | | rubyzip | 2.3.2 | | security | 0.1.5 | | simctl | 1.6.10 | | terminal-notifier | 2.0.0 | | unicode-display_width | 2.6.0 | | terminal-table | 3.0.2 | | tty-screen | 0.8.2 | | tty-cursor | 0.7.1 | | tty-spinner | 0.9.3 | | word_wrap | 1.0.0 | | nanaimo | 0.3.0 | | xcodeproj | 1.25.1 | | rouge | 2.0.7 | | xcpretty | 0.3.0 | | xcpretty-travis-formatter | 1.0.1 | | logger | 1.6.0 | | mutex_m | 0.2.0 | | ostruct | 0.6.0 |