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

Screenshots upload (deliver) failed with App Store's Rate limit exceeded error #20625

Open
nguillot opened this issue Sep 6, 2022 · 10 comments

Comments

@nguillot
Copy link

nguillot commented Sep 6, 2022

Issue Description

I worked on two projects which have 14 languages and respectively 10 and 45 screenshots per language. We recently update our fastlane configuration to use the AppStoreConnect APIs. Since then our screenshots upload lane failed with this error

The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate.

I tried to reduce the number of requests by uploading the screenshots of only one language and I waited more than a day to ensure than the AppStoreConnect API rate limitation was reseted. But I still failed with the same error.

There is the matchine Fastfile extract:

  lane :uploadScreenshots do |options|
    api_key = app_store_connect_api_key()
    deliver(
      api_key: api_key,
      submit_for_review: false,
      force: true,
      skip_metadata: true,
      skip_binary_upload: true,
      precheck_include_in_app_purchases: false,
      run_precheck_before_submit: false,
      overwrite_screenshots: options[:overwrite_screenshots]
    )
  end
Command executed

bundle exec fastlane uploadScreenshots onJenkins:true overwrite_screenshots:true

Complete output when running fastlane, including the stack trace and command used
13:07:36 [13:07:36]: ----------------------------------------
13:07:36 [13:07:36]: --- Step: Verifying fastlane version ---
13:07:36 [13:07:36]: ----------------------------------------
13:07:36 [13:07:36]: Your fastlane version 2.209.1 matches the minimum requirement of 2.23.0  ✅
13:07:36 [13:07:36]: ------------------------------
13:07:36 [13:07:36]: --- Step: default_platform ---
13:07:36 [13:07:36]: ------------------------------
13:07:36 [13:07:36]: Driving the lane 'ios uploadScreenshots' 🚀
13:07:36 [13:07:36]: ---------------------------------------
13:07:36 [13:07:36]: --- Step: app_store_connect_api_key ---
13:07:36 [13:07:36]: ---------------------------------------
13:07:36 [13:07:36]: ---------------------
13:07:36 [13:07:36]: --- Step: deliver ---
13:07:36 [13:07:36]: ---------------------
13:07:36 [13:07:36]: Successfully loaded '/Users/build/jenkins-mobility/workspace/snt/nebo-ios-upload-meta+screenshot/fastlane/Deliverfile' 📄
13:07:36 [13:07:36]: No values defined in './fastlane/Deliverfile'
13:07:36 [13:07:36]: Creating authorization token for App Store Connect API
13:07:39 
13:07:39 +--------------------------------------+--------------------------+
13:07:39 |                     deliver 2.209.1 Summary                     |
13:07:39 +--------------------------------------+--------------------------+
13:07:39 | api_key                              | ********                 |
13:07:39 | submit_for_review                    | false                    |
13:07:39 | force                                | true                     |
13:07:39 | skip_metadata                        | true                     |
13:07:39 | skip_binary_upload                   | true                     |
13:07:39 | precheck_include_in_app_purchases    | false                    |
13:07:39 | run_precheck_before_submit           | false                    |
13:07:39 | overwrite_screenshots                | true                     |
13:07:39 | screenshots_path                     | ./fastlane/screenshots   |
13:07:39 | metadata_path                        | ./fastlane/metadata      |
13:07:39 | username                             | xxx         |
13:07:39 | app_identifier                       | xxx |
13:07:39 | platform                             | ios                      |
13:07:39 | edit_live                            | false                    |
13:07:39 | use_live_version                     | false                    |
13:07:39 | skip_screenshots                     | false                    |
13:07:39 | skip_app_version_update              | false                    |
13:07:39 | sync_screenshots                     | false                    |
13:07:39 | verify_only                          | false                    |
13:07:39 | reject_if_possible                   | false                    |
13:07:39 | phased_release                       | false                    |
13:07:39 | reset_ratings                        | false                    |
13:07:39 | dev_portal_team_id                   | xxx               |
13:07:39 | precheck_default_rule_level          | warn                     |
13:07:39 | ignore_language_directory_validation | false                    |
13:07:39 +--------------------------------------+--------------------------+
13:07:39 
13:07:39 [13:07:39]: Will begin uploading snapshots for '3.4.1' on App Store Connect
13:07:39 [13:07:39]: Starting with the upload of screenshots...
13:07:43 [13:07:43]: Deleted 'de-DE APP_IPHONE_55' -  (1.426387 secs)
13:07:43 [13:07:43]: Deleted 'de-DE APP_IPHONE_65' -  (1.80774 secs)
13:07:44 [13:07:44]: Number of screenshots not deleted: 0
13:07:44 [13:07:44]: Successfully deleted all screenshots
13:07:48 [13:07:48]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone55-05-DE.png'... (2.511385 secs)
13:07:48 [13:07:48]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone55-01-DE.png'... (2.583887 secs)
13:07:48 [13:07:48]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone65-05-DE.png'... (2.583555 secs)
13:07:48 [13:07:48]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone55-03-DE.png'... (2.688001 secs)
13:07:48 [13:07:48]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone65-02-DE.png'... (2.695805 secs)
13:07:48 [13:07:48]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone65-01-DE.png'... (2.713813 secs)
13:07:49 [13:07:48]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone55-02-DE.png'... (2.77542 secs)
13:07:49 [13:07:49]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone55-04-DE.png'... (2.786046 secs)
13:07:49 [13:07:49]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone65-03-DE.png'... (2.788113 secs)
13:07:49 [13:07:49]: Uploaded './fastlane/screenshots/de-DE/NeboViewer-iOS-iphone65-04-DE.png'... (2.896881 secs)
13:07:49 [13:07:49]: Waiting for all the screenshots to finish being processed...
13:53:38 # terminated with exception (report_on_exception is true):
13:53:38 /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
13:53:38 # terminated with exception (report_on_exception is true):
13:53:38 /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
13:53:38 # terminated with exception (report_on_exception is true):
13:53:38 /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
13:53:38 # terminated with exception (report_on_exception is true):
13:53:38 /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
13:53:38 +------------------+-----------------------+
13:53:38 |               Lane Context               |
13:53:38 +------------------+-----------------------+
13:53:38 | DEFAULT_PLATFORM | ios                   |
13:53:38 | PLATFORM_NAME    | ios                   |
13:53:38 | LANE_NAME        | ios uploadScreenshots |
13:53:38 +------------------+-----------------------+
13:53:38 [13:53:38]: The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate.
13:53:38 
13:53:38 +------+----------------------------+-------------+
13:53:38 |                fastlane summary                 |
13:53:38 +------+----------------------------+-------------+
13:53:38 | Step | Action                     | Time (in s) |
13:53:38 +------+----------------------------+-------------+
13:53:38 | 1    | Verifying fastlane version | 0           |
13:53:38 | 2    | default_platform           | 0           |
13:53:38 | 3    | app_store_connect_api_key  | 0           |
13:53:38 | 💥   | deliver                    | 2761        |
13:53:38 +------+----------------------------+-------------+
13:53:38 
13:53:38 [13:53:38]: fastlane finished with errors
13:53:38 
13:53:38 Looking for related GitHub issues on fastlane/fastlane...
13:53:38 
13:53:38 Found no similar issues. To create a new issue, please visit:
13:53:38 https://github.com/fastlane/fastlane/issues/new
13:53:38 Run `fastlane env` to append the fastlane environment to your issue
13:53:38 /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': \e[31m[!] The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate.\e[0m (Spaceship::UnexpectedResponse)
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
13:53:38 /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.rvm/rubies/ruby-2.7.2/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
13:53:38 	from /Users/build/.bundle/ruby/2.7.0/gems/fastlane-2.209.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'

Environment

✅ fastlane environment ✅

Stack

Key Value
OS 12.5.1
Ruby 3.1.2
Bundler? true
Git git version 2.37.0
Installation Source ~/.bundle/ruby/3.1.0/bin/fastlane
Host macOS 12.5.1 (21G83)
Ruby Lib Dir ~/.rbenv/versions/3.1.2/lib
OpenSSL Version OpenSSL 1.1.1n 15 Mar 2022
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode-beta.app/Contents/Developer/
Xcode Version 14.0
Swift Version 5.7

System Locale

Variable Value
LANG fr_FR.UTF-8
LC_ALL
LANGUAGE

fastlane files:

`./fastlane/Fastfile`
# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "2.23.0"

import "../_fastlane/Fastfile"

default_platform :ios

platform :ios do

  desc "Build for testing"
  lane :buildForTesting do |options|
    myscript_unlock_keychain(options) # Can not do in before_all: do not take options
    run_tests(
      clean: true,
      workspace: "xxx.xcworkspace",
      scheme: options[:scheme],
      device: 'iPad Pro (12.9-inch) (3rd generation)',
      buildlog_path: './artifact',
      configuration: 'Debug',
      derived_data_path: './derivedData',
      build_for_testing: true
    )
  end

  desc "Test without building"
  lane :testWithoutBuilding do |options|
    begin
      #destination_hash output is something like {"platform"=>"iOS Simulator", "name"=>"iPad Pro (12.9-inch) (3rd generation)"}
      destination_hash=options[:destination].split(",").map{|h| h1,h2 = h.split('='); {h1 => h2}}.reduce(:merge)
      destination_name=destination_hash["name"]
      #Disable hardware keyboards (UI tests prerequisite) and setup device's keyboards
      sh("./../_ci/scripts/setup_simulator_keyboard.sh \"#{destination_name}\"")
      sh("if [ -d '../artifact/#{options[:testPlan]}_report' ]; then echo rm -rf '../artifact/#{options[:testPlan]}_report'; else echo 'Report directory not found'; fi")
      sh("mkdir -p '../artifact/#{options[:testPlan]}_report'")
      run_tests(
        workspace: "xxx.xcworkspace",
        scheme: options[:scheme],
        configuration: 'Debug',
        derived_data_path: "./derivedData",
        #destination is prefered to device, the latter has no garranty to run on the latest iOS version
        destination: options[:destination],
        prelaunch_simulator: true,
        max_concurrent_simulators: 2,
        test_without_building: true,
        xcargs: "-testPlan #{options[:testPlan]} -resultBundleVersion 3",
        output_directory: "./artifact/#{options[:testPlan]}_report",
        #since concurrent test are not supported by xcpretty, we disable it and dump the result test bundle which is usable by xcode
        output_style: 'raw',
        result_bundle: true,
        buildlog_path: "./artifact/#{options[:testPlan]}_report"
      )
      trainer(path: "./artifact/#{options[:testPlan]}_report/UnicornNote.xcresult", output_directory: "./artifact/#{options[:testPlan]}_report", fail_build: false, xcpretty_naming: true)
      sh("mv ../artifact/#{options[:testPlan]}_report/UnicornNote.xml ../artifact/#{options[:testPlan]}_report/result.xml")
    rescue
      trainer(path: "./artifact/#{options[:testPlan]}_report/UnicornNote.xcresult", output_directory: "./artifact/#{options[:testPlan]}_report", fail_build: false, xcpretty_naming: true)
      sh("mv ../artifact/#{options[:testPlan]}_report/UnicornNote.xml ../artifact/#{options[:testPlan]}_report/result.xml")
    end
  end

  desc "Build the internal ipa"
  lane :buildInternal do |options|
    gym(
      workspace: "xxx.xcworkspace",
      scheme: options[:scheme],
      output_directory: './artifact',
      output_name: options[:scheme]+".ipa",
      xcargs: "#{options[:xcargs]} ONLY_ACTIVE_ARCH=NO",
      archive_path: "./artifact/toBeIgnored",
      clean: true,
      export_method: "development",
      export_options: {
        compileBitcode: false,
        uploadBitcode: false,
        uploadSymbols: false,
        iCloudContainerEnvironment: "Development",
      }
    )
    swiftlint(
      mode: :lint,                            # SwiftLint mode: :lint (default) or :autocorrect
      path: "XXX",
      executable: "XXX/Pods/SwiftLint/swiftlint", # The SwiftLint binary path (optional). Important if you've installed it via CocoaPods
      output_file: "artifact/swiftlint.result.html",   # The path of the output file (optional)
      reporter: "html",                       # The custom reporter to use (optional)
      config_file: "XXX/.swiftlint.yml",       # The path of the configuration file (optional)
      ignore_exit_status: false                # Allow fastlane to continue even if SwiftLint returns a non-zero exit status
    )
    swiftlint(
      mode: :lint,                            # SwiftLint mode: :lint (default) or :autocorrect
      path: "XXX",
      executable: "XX/Pods/SwiftLint/swiftlint", # The SwiftLint binary path (optional). Important if you've installed it via CocoaPods
      output_file: "artifact/swiftlint.result.xml",   # The path of the output file (optional)
      reporter: "checkstyle",                       # The custom reporter to use (optional)
      config_file: "XXX/.swiftlint.yml",       # The path of the configuration file (optional)
      ignore_exit_status: false                # Allow fastlane to continue even if SwiftLint returns a non-zero exit status
    )
  end

  desc "Build the app-store xcarchive"
  lane :buildStore do |options|
    myscript_unlock_keychain(options)
    gym(
      workspace: "XX.xcworkspace",
      scheme: options[:scheme],
      output_directory: './artifact',
      buildlog_path: './artifact',
      output_name: "toBeIgnored.ipa",
      archive_path: "./artifact/"+options[:scheme],
      xcargs: "GCC_PREPROCESSOR_DEFINITIONS='$GCC_PREPROCESSOR_DEFINITIONS ARCHIVE=1' OTHER_SWIFT_FLAGS='$(OTHER_SWIFT_FLAGS) -DARCHIVE' ONLY_ACTIVE_ARCH=NO",
      skip_package_ipa: true,
      clean: true,
      xcpretty_utf: true
    )
  end

  desc "Upload app-store ipa from app-store xcarchive"
  lane :itunesConnect do |options|
    gym(
      workspace: "XXX.xcworkspace",
      scheme: options[:scheme],
      export_options: "./build/exportPlistStore.plist",
      output_directory: './artifact',
      skip_build_archive: true,
      archive_path: "./artifact/"+options[:scheme],
      output_name: options[:uploadIPAName]+".ipa",
    )

    api_key = app_store_connect_api_key()
    pilot(
      api_key: api_key,
      ipa: "./artifact/"+options[:uploadIPAName]+".ipa",
      skip_submission: true,
      skip_waiting_for_build_processing: true,
      apple_id: options[:uploadAppleId]
    )
  end

  desc "Upload metadata to iTunes Connect"
  lane :uploadMetadata do |options|
    api_key = app_store_connect_api_key()
    deliver(
      api_key: api_key,
      submit_for_review: false,
      force: true,
      skip_screenshots: true,
      skip_binary_upload: true,
      precheck_include_in_app_purchases: false,
      run_precheck_before_submit: false
    )
  end

  lane :uploadScreenshots do |options|
    api_key = app_store_connect_api_key()
    deliver(
      api_key: api_key,
      submit_for_review: false,
      force: true,
      skip_metadata: true,
      skip_binary_upload: true,
      precheck_include_in_app_purchases: false,
      run_precheck_before_submit: false,
      overwrite_screenshots: options[:overwrite_screenshots]
    )
  end
end
`./fastlane/Appfile`
app_identifier "XXX" # The bundle identifier of your app
apple_id "XXX" # Your Apple email address

team_id "XXX"  # Developer Portal Team ID

# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md

fastlane gems

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

Loaded fastlane plugins:

No plugins Loaded

Loaded gems
Gem Version
error_highlight 0.3.0
did_you_mean 1.6.1
bundler 2.0.2
pathname 0.2.0
cgi 0.3.1
set 1.0.2
readline-ext 0.1.4
uri 0.11.0
tsort 0.1.0
rake 13.0.6
rexml 3.2.5
CFPropertyList 3.0.5
concurrent-ruby 1.1.8
i18n 1.8.9
minitest 5.14.3
thread_safe 0.3.6
tzinfo 1.2.9
activesupport 5.2.4.5
public_suffix 5.0.0
addressable 2.8.1
httpclient 2.8.3
json 2.6.2
algoliasearch 1.27.5
artifactory 3.0.15
atomos 0.1.3
aws-eventstream 1.2.0
aws-partitions 1.626.0
aws-sigv4 1.5.1
jmespath 1.6.1
aws-sdk-core 3.140.0
aws-sdk-kms 1.58.0
aws-sdk-s3 1.114.0
babosa 1.0.4
claide 1.1.0
fuzzy_match 2.0.4
nap 1.1.0
netrc 0.11.0
ffi 1.15.3
ethon 0.14.0
typhoeus 1.4.0
cocoapods-core 1.10.1
cocoapods-deintegrate 1.0.4
cocoapods-downloader 1.4.0
cocoapods-plugins 1.0.0
cocoapods-search 1.0.0
cocoapods-trunk 1.5.0
cocoapods-try 1.2.0
colored2 3.1.2
escape 0.0.4
fourflusher 2.3.1
gh_inspector 1.1.3
molinillo 0.6.6
ruby-macho 1.4.0
nanaimo 0.3.0
xcodeproj 1.22.0
cocoapods 1.10.1
cocoapods-check 1.1.0
colored 1.2
highline 2.0.3
commander 4.6.0
declarative 0.0.20
digest-crc 0.6.4
unf_ext 0.0.8.2
unf 0.1.4
domain_name 0.5.20190701
dotenv 2.8.1
emoji_regex 3.2.3
excon 0.92.4
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.0.0
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.2
http-cookie 1.0.5
faraday-cookie_jar 0.0.7
faraday_middleware 1.2.0
fastimage 2.2.6
jwt 2.5.0
memoist 0.16.2
multi_json 1.15.0
os 1.1.4
signet 0.17.0
googleauth 1.2.0
mini_mime 1.1.2
trailblazer-option 0.1.2
uber 0.1.0
representable 3.2.0
retriable 3.1.2
webrick 1.7.0
google-apis-core 0.7.0
google-apis-androidpublisher_v3 0.25.0
google-apis-playcustomapp_v1 0.10.0
google-apis-iamcredentials_v1 0.13.0
google-apis-storage_v1 0.17.0
google-cloud-env 1.6.0
google-cloud-errors 1.2.0
google-cloud-core 1.6.0
google-cloud-storage 1.39.0
mini_magick 4.11.0
naturally 2.2.1
optparse 0.1.1
plist 3.6.0
rubyzip 2.3.2
security 0.1.3
simctl 1.6.8
terminal-notifier 2.0.0
unicode-display_width 1.8.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
rouge 2.0.7
xcpretty 0.3.0
xcpretty-travis-formatter 1.0.1

generated on: 2022-09-06

@andrewdieken
Copy link

I'm facing a similar issue with uploading screenshots but with the fastlane deliver --overwrite_screenshots command

output:

[17:11:33]: Number of screenshots not deleted: 0
[17:11:33]: Successfully deleted all screenshots
[17:11:35]: Uploaded '/Users/user/screenshots/en-US/3apple_screenshot_55.jpeg'... (1.142534 secs)
[17:11:35]: Uploaded '/Users/user/screenshots/en-US/1apple_screenshot_55.jpeg'... (1.184768 secs)
[17:11:35]: Uploaded '/Users/user/screenshots/en-US/1apple_screenshot_65.jpeg'... (1.186299 secs)
[17:11:35]: Uploaded '/Users/user/screenshots/en-US/3apple_screenshot_65.jpeg'... (1.204265 secs)
[17:11:35]: Uploaded '/Users/user/screenshots/en-US/4apple_screenshot_65.jpeg'... (1.234147 secs)
[17:11:35]: Uploaded '/Users/user/screenshots/en-US/5apple_screenshot_55.jpeg'... (1.255372 secs)
[17:11:36]: Uploaded '/Users/user/screenshots/en-US/4apple_screenshot_55.jpeg'... (1.292782 secs)
[17:11:36]: Uploaded '/Users/user/screenshots/en-US/5apple_screenshot_65.jpeg'... (1.294069 secs)
[17:11:36]: Uploaded '/Users/user/screenshots/en-US/2apple_screenshot_65.jpeg'... (1.341499 secs)
[17:11:36]: Uploaded '/Users/user/screenshots/en-US/2apple_screenshot_55.jpeg'... (1.350164 secs)
[⠙] Waiting for all the screenshots to finish being processed...

There was a similar issue reported this past March, #20028, but I have yet to resolve my issue. @alexmarktl could you explain how you were able to remove all languages?

@andrewdieken
Copy link

Appears to be a similar if not the same issue described in this issue #20619

@TalRandi1
Copy link

TalRandi1 commented Sep 7, 2022

@andrewdieken is right.
I got the same issue now.
It has started since I upgraded Fastlane to 2.209.1

@jakub-przy
Copy link

jakub-przy commented Sep 7, 2022

Unfortunately my team and I are facing a similar issue:

Uploading complete!
Uploading complete!
Uploading complete!
Uploading complete!
Uploading complete!
Uploading complete!
INFO [2022-09-07 12:23:00.25]: Uploaded 'appstoreconfig/screenshots/en-US/3_iphone6Plus.jpg'... (1.114392 secs)
INFO [2022-09-07 12:23:00.27]: Uploaded 'appstoreconfig/screenshots/en-US/4_iphone6Plus.jpg'... (1.123811 secs)
INFO [2022-09-07 12:23:00.30]: Uploaded 'appstoreconfig/screenshots/en-US/1_iphoneXSmax.jpg'... (1.138808 secs)
INFO [2022-09-07 12:23:00.34]: Uploaded 'appstoreconfig/screenshots/en-US/2_iphoneXSmax.jpg'... (1.160791 secs)
INFO [2022-09-07 12:23:00.38]: Uploaded 'appstoreconfig/screenshots/en-US/3_iphoneXSmax.jpg'... (1.128168 secs)
INFO [2022-09-07 12:23:00.51]: Uploaded 'appstoreconfig/screenshots/en-US/4_iphoneXSmax.jpg'... (1.250281 secs)
DEBUG [2022-09-07 12:23:00.51]: Uploading jobs are completed
INFO [2022-09-07 12:23:00.51]: Waiting for all the screenshots to finish being processed...
DEBUG [2022-09-07 12:23:00.74]: There are still incomplete screenshots - {"UPLOAD_COMPLETE"=>16}
DEBUG [2022-09-07 12:23:06.13]: There are still incomplete screenshots - {"COMPLETE"=>12, "UPLOAD_COMPLETE"=>4}
DEBUG [2022-09-07 12:23:11.47]: There are still incomplete screenshots - {"COMPLETE"=>12, "UPLOAD_COMPLETE"=>4}
DEBUG [2022-09-07 12:23:16.66]: There are still incomplete screenshots - {"COMPLETE"=>12, "UPLOAD_COMPLETE"=>4}
DEBUG [2022-09-07 12:23:21.81]: There are still incomplete screenshots - {"COMPLETE"=>12, "UPLOAD_COMPLETE"=>4}

and then the: "There are still incomplete screenshots[...]" issue keeps hanging for hours until the job times out and fails.

This happens regardless of the region and language for the screenshots etc. Seems to be happening for the better part of last 48hours 😢

@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.

@nguillot
Copy link
Author

The issue still valid, please do not close it.

@drcreazy
Copy link
Contributor

drcreazy commented Nov 2, 2022

It seems that the The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate.
and the Waiting for all the screenshots to finish being processed... are separate issues.

I've checked if this rate limits are described somewhere and so far found only that:

https://developer.apple.com/forums/thread/110457

I didn't find any fastlane options allowing to slowdown the requests during the execution of fastlane deliver run

The problem I've faced with:
...
[09:36:55]: Uploaded './screenshots/ro/iphoneX_Romanian_09.png'... (3.433104764 secs)

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

Found no similar issues. To create a new issue, please visit:
https://github.com/fastlane/fastlane/issues/new
Run `fastlane env` to append the fastlane environment to your issue
#<Thread:0x000055c0dd098b68 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
#<Thread:0x000055c0dd077120 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
#<Thread:0x000055c0dd077490 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
#<Thread:0x000055c0dd098f00 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
#<Thread:0x000055c0dd077ad0 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
#<Thread:0x000055c0dd076e00 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
#<Thread:0x000055c0dd099158 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
#<Thread:0x000055c0dd0985a0 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
#<Thread:0x000055c0dd098d20 /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:24 run> terminated with exception (report_on_exception is true):
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': \e[31m[!] The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate.\e[0m (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'
/var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:204:in `handle_response': The request rate limit has been reached. - We've received too many requests for this API. Please wait and try again or slow down your request rate. (Spaceship::UnexpectedResponse)
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/api_client.rb:113:in `get'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/tunes/tunes.rb:493:in `get_app_screenshot_sets'
	from /usr/lib/ruby/2.7.0/forwardable.rb:235:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_screenshot_set.rb:119:in `all'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/spaceship/lib/spaceship/connect_api/models/app_store_version_localization.rb:88:in `get_app_screenshot_sets'
	from /var/lib/gems/2.7.0/gems/fastlane-2.210.1/deliver/lib/deliver/app_screenshot_iterator.rb:25:in `block (3 levels) in each_app_screenshot_set'

[Updated]

I guess we can try to tune number of threads to slowdown uploading a bit:

https://github.com/fastlane/fastlane/blob/master/deliver/lib/deliver/upload_screenshots.rb#L116
https://github.com/fastlane/fastlane/blob/master/fastlane_core/lib/fastlane_core/queue_worker.rb#L9

@atrebbi
Copy link

atrebbi commented Dec 17, 2022

I'm facing the same issue ; the problem is that the screenshots never end the process on App Store, I have checked after several days and still find screenshots in processing ; and, because of this, I can't submit the app for review

@anh1979
Copy link

anh1979 commented Jul 4, 2023

We are facing the same problem from time to time -> our Jenkins builds get stuck on this until we manually delete the screenshots in question (it is showing grey and with a cloud symbol).
When you delete it, the process wakes up and tries to upload the file again. Most of the times this helps it.
Still annoying.

@maugusto-cit
Copy link

Getting the same issue here.
The first attempt delivering dozens of screenshots reached the API rate limit after 1 hour waiting for the images to be processed.
Same with the second attempt.
For the third attempt, now reducing to 1 locale, I got the error right away. I believe I must have reached a hour/day limit.

I also could not find a way to configure Fastlane request rate, as suggested in the error message.

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

No branches or pull requests

9 participants