deliver/lib/deliver/submit_for_review.rb in fastlane-2.103.1 vs deliver/lib/deliver/submit_for_review.rb in fastlane-2.104.0

- old
+ new

@@ -53,15 +53,29 @@ def wait_for_build(app) UI.user_error!("Could not find app with app identifier") unless app start = Time.now + build = nil loop do - build = find_build(app.latest_version.candidate_builds) - return build if build.processing == false + latest_build = find_build(app.latest_version.candidate_builds) - UI.message("Waiting App Store Connect processing for build #{build.train_version} (#{build.build_version})... this might take a while...") + # Sometimes latest build will disappear and a different build would get selected + # Only set build if no latest build found or if same build versions as previously fetched build + # Issue: https://github.com/fastlane/fastlane/issues/10945 + if build.nil? || (latest_build && latest_build.train_version == build.train_version && latest_build.build_version == build.build_version) + build = latest_build + end + + return build if build && build.processing == false + + if build + UI.message("Waiting App Store Connect processing for build #{build.train_version} (#{build.build_version})... this might take a while...") + else + UI.message("Waiting App Store Connect processing for build... this might take a while...") + end + if (Time.now - start) > (60 * 5) UI.message("") UI.message("You can tweet: \"App Store Connect #iosprocessingtime #{((Time.now - start) / 60).round} minutes\"") end sleep(30)