fastlane: `upload_to_testflight` action hangs with "Waiting for App Store Connect to finish processing the new build ..."

New Issue Checklist

Issue Description

upload_to_testflight action hangs with the following message although the build has been processed

Waiting for App Store Connect to finish processing the new build (1.0.0 - 1234) for IOS

Since up until recently this worked just fine it could also just be an App Store Connect issue 🤷‍♂️. Tried several times with different apps.

Command executed

I basically have such a lane.

  lane :submit_build_for_beta_review_and_distribute do 
      app_store_connect_api_key(
        key_id: "keyid",
        issuer_id: "issuerid",
        key_content: "keycontent",
        is_key_content_base64: true,
        duration: 1200,
        in_house: false
      )

    upload_to_testflight(
      beta_app_review_info: {
        contact_email: "foo@bar.com",
        contact_first_name: "foo",
        contact_last_name: "bar",
        contact_phone: "+1234",
        demo_account_name: "foo",
        demo_account_password: "bar",
        notes: "foo bar"
      },
      app_version: version_name,
      build_number: build_number,
      submit_beta_review: true, 
      distribute_only: true,
      notify_external_testers: true,
      groups: ["foo", "bar"]
    )
end
Complete output when running fastlane, including the stack trace and command used

Here’s our output from CI with some data anonymised

#!/bin/bash --login -eo pipefail
bundle exec fastlane submit_build_for_beta_review_and_distribute
[⠋] 🚀 [⠙] 🚀 [⠹] 🚀 [⠸] 🚀 [⠼] 🚀 [⠴] 🚀 [⠦] 🚀 [⠧] 🚀 [⠇] 🚀 [✔] 🚀 
+----------------------------------+---------+------------------+
|                         Used plugins                          |
+----------------------------------+---------+------------------+
| Plugin                           | Version | Action           |
+----------------------------------+---------+------------------+
| fastlane-plugin-aws_s3           | 2.1.0   | aws_s3           |
| fastlane-plugin-update_xcodeproj | 1.0.1   | update_xcodeproj |
+----------------------------------+---------+------------------+

[07:57:38]: Sending anonymous analytics information [07:57:38]: Learn more at https://docs.fastlane.tools/#metrics [07:57:38]: No personal or sensitive data is sent. [07:57:38]: You can disable this by adding opt_out_usage at the top of your Fastfile [07:57:39]: ---------------------------------------- [07:57:39]: — Step: Verifying fastlane version — [07:57:39]: ---------------------------------------- [07:57:39]: Your fastlane version 2.209.1 matches the minimum requirement of 2.170.0 ✅ [07:57:39]: ------------------------------ [07:57:39]: — Step: default_platform — [07:57:39]: ------------------------------ [07:57:39]: Driving the lane ‘ios submit_build_for_beta_review_and_distribute’ 🚀 [07:57:39]: ----------------------------- [07:57:39]: — Step: setup_circle_ci — [07:57:39]: ----------------------------- [07:57:39]: Creating temporary keychain: “fastlane_tmp_keychain”. [07:57:39]: $ security list-keychains -d user [07:57:39]: ▸ “/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db” [07:57:39]: Found keychain ‘/Users/distiller/Library/Keychains/fastlane_tmp_keychain-db’ in list-keychains, adding to search list skipped [07:57:39]: Enabling match readonly mode. [07:57:39]: Trying to create AppStoreConnectAPIKey via CI ENV variables… [07:57:39]: --------------------------------------- [07:57:39]: — Step: app_store_connect_api_key — [07:57:39]: --------------------------------------- [07:57:39]: -------------------------------------- [07:57:39]: — Step: get_ipa_info_plist_value — [07:57:39]: -------------------------------------- [07:57:39]: -------------------------------------- [07:57:39]: — Step: get_ipa_info_plist_value — [07:57:39]: -------------------------------------- [07:57:39]: Submitting foobar 1.0.0/1234 for review and distributing to external testers. [07:57:39]: ---------------------------------- [07:57:39]: — Step: upload_to_testflight — [07:57:39]: ---------------------------------- [07:57:39]: Creating authorization token for App Store Connect API [07:57:41]: Waiting for processing on… app_id: 12345678, app_version: 1.0.0, build_version: 1234, platform: IOS [07:57:43]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 1234) for IOS [07:58:14]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 1234) for IOS [07:58:45]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 1234) for IOS [07:59:17]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 1234) for IOS [07:59:48]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 1234) for IOS [08:00:19]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 1234) for IOS [08:00:50]: Waiting for App Store Connect to finish processing the new build (1.0.0 - 1234) for IOS …

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 59
  • Comments: 65 (8 by maintainers)

Commits related to this issue

Most upvoted comments

✨Official Update

Got confirmation that the App Store Connect API team is looking into the issue ✅

Will report back when I hear more and/or when it’s fixed!

✨Official Update

App Store Connect API is back to working for https://api.appstoreconnect.apple.com/v1/builds 💯 🥳

If you are able to test and report back that its working for you too that would be greatly appreciated 🙏

✨ OFFICIAL UPDATE

GET to https://api.appstoreconnect.apple.com/v1/builds isn’t returning any build beta details (which is what is the cause of this issue) but also…

GET to https://api.appstoreconnect.apple.com/v1/builds/<build_id>/buildBetaDetail` (which would be the work around) is 500ing… 😬

So it seems like there is a bigger issue on App Store Connect with serializing any build beta detail information.


🔨Solution I’m going to send an email to the App Store Connect API team with my HAR files of the failed requests tonight. I’m hoping I can get a response from them in the morning followed by a fix sometime tomorrow.


🩹 Workarounds

  1. To prevent this crash you could set skip_waiting_for_build_processing: true to prevent the crash from happening while waiting for the build to process
  2. Sleep the process for like an hour or just wait an hour 😛
  3. After some amount of time you could run upload_to_testflight again with distribute_only: true

I’m here now! Sorry, life is really crazy right now 😔 Familiarizing myself and seeing what I can do tonight 💪

I can confirm my upload action is working again without https://github.com/fastlane/fastlane/pull/20644 ! 🥳 thanks @joshdholtz

Looks like, Apple has changed something recently and no longer provides the buildBetaDetail when we list the builds using the GET https://api.appstoreconnect.apple.com/v1/builds

Adding the flow, if anyone is interested to contribute:

I don’t know if this is temporary Apple issue or they removed it completely. According to Apple document, we can expect buildBetaDetail in response Screenshot 2022-09-13 at 20 52 13

cc: A friendly ping to @joshdholtz to deal with it! 😅

Same here, My build always Waiting for App Store Connect to finish processing the new build (xxx - xxx009) for IOS even the build is already done processing.

Screen Shot 2022-09-12 at 16 15 08

Hello, I still got an issue like this. Can any have an idea? ENV:

  • Xcode 13.4.1
  • Fastlane 2.210.0

The API is working for us again - no workarounds or changes since prior to the issue 🙌

Dear all,

@bassrock PR https://github.com/fastlane/fastlane/pull/20644 looks like fix this issue. Adding steps to switch your Fastlane version to this PR

Switch your Fastlane version to PR

  • Update Gemfile to 👇 and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/bassrock/fastlane.git", :branch => "beta-build"

Please let us know if this PR fixed the issue for you or not and provide us your valuable feedback!

Thanks @joshdholtz for looking into it, much appreciated.


Regarding the workaround, unfortunately that doesn’t work, since even with distribute_only: true for a previously uploaded (and processed) build we run into this problem. See my OP. Just wanted to point that out 😃

Thanks @SSheldon for linking that other issue. The issues do indeed sound like they could have the same cause.

@joshdholtz since quite a few people are affected, may I drag you into this to get your expert opinion on this?

Pretty sure it’s not Fastlane though as using the same version before Friday last week worked fine

Yes, it worked without any problem last week for us as well. My first thought also was that (parts of the) ASC APIs are either temporarily broken or Apple changed some things under the hood and now the fastlane code needs to be adapted or something.

I have too little knowledge about the internals of fastlane to debug the communication with ASC API. Guess that would show the underlying problem.

Thanks @hendych @Baza207 @baderbenzribia for confirming that you have the same issue 👍

Having the same issue. Seems to have started last Friday 9th Sept as builds from the Thursday 8th were fine.

Builds this morning having the same issues, I can see them in App Store Connect but DevOps ends up timing out due to stuck at this step where Fastlane isn’t able to see the build has finished processing. 😞

I’ve tried the workaround, and while it uploads to TF it doesn’t seem to add the build to external test groups. I believe the beta build detail includes the ID it needs to submit those requests after the build is uploaded.

The beta build does not help as we get now error “no_build_beta_details” The forever loop on “waiting for app store connect to finish processing …” happens since last friday (9th september 2022). I’ve noticed that during processing I get following warning message. “App Store Connect API token expired at 2022-09-13 11:03:44 +0200… refreshing” It seems the token now expires after 8 minutes (i think it used to be 20 minutes)…

Today I tried again and now during processing in logs I see following: INFO [2022-09-13 12:12:24.53]: Waiting for App Store Connect to finish processing the new build (1.0 - 3961) for IOS Authentication credentials are missing or invalid. - Provide a properly configured and signed bearer token, and make sure that it has not expired. Learn more about Generating Tokens for API Requests https://developer.apple.com/go/?id=api-generating-tokens Token has expired or has been revoked! Trying to refresh… INFO [2022-09-13 12:13:02.35]: Waiting for App Store Connect to finish processing the new build (1.0 - 3961) for IOS

I am wondering if this issue where fastlane is unable to detect processing termination could be due to some token expiration/renewal issue…

We’re facing the same issue and can’t sadly try the workaround as we’re using fastlane via azure devops.

Same error here too

Error in ‘upload_app_to_testflight’: No build_beta_detail included

after raising version to beta I have “No build_beta_detail included” error with the same upload step that worked previously

Same for me.

It now detects the new version again, but errors out soon after

[13:16:40]: Successfully finished processing the build 1.1.6 - 638669436 for IOS
[13:16:40]: Build did include information for app, build beta detail and pre release version
[13:16:40]: Fetching a new build with all the information needed
[13:16:43]: Successfully set the changelog for build
[13:16:43]: Using App Store Connect's default for notifying external testers (which is true) - set `notify_external_testers` for full control
[13:16:43]: Distributing new build to testers: 1.1.6 - 638669436
+------------------+-----------------------------+
|                  Lane Context                  |
+------------------+-----------------------------+
| DEFAULT_PLATFORM | ios                         |
| PLATFORM_NAME    | ios                         |
| LANE_NAME        | ios upload_external_staging |
+------------------+-----------------------------+
[13:16:43]: No build_beta_detail included
+------+------------------------------+-------------+
|                 fastlane summary                  |
+------+------------------------------+-------------+
| Step | Action                       | Time (in s) |
+------+------------------------------+-------------+
| 1    | opt_out_usage                | 0           |
| 2    | default_platform             | 0           |
| 3    | Switch to ios getApiKey lane | 0           |
| 4    | app_store_connect_api_key    | 0           |
| 💥   | upload_to_testflight         | 1063        |
+------+------------------------------+-------------+
[13:16:43]: fastlane finished with errors

The same, using latest fastlane (2.209.1)

Same here too. We can see the build on TestFlight but Fastlane keep saying Waiting for App Store Connect to finish processing the new build...

Working for me too, including distribution to Groups!! Thanks everyone & @joshdholtz !!!

this PR seems relevant, it indicates that build beta details sometimes will not return from apple https://github.com/fastlane/fastlane/pull/16006

I am also facing the No build_beta_detail included error, but it did uploaded to TestFlight without being stuck.

Also I have a question regarding this workaround, does anyone distributing to external testers? If so does it works for you, are you able to see if the build was distributed to external testers.

Dear all,

@bassrock PR #20644 looks like fix this issue. Adding steps to switch your Fastlane version to this PR

Switch your Fastlane version to PR

  • Update Gemfile to 👇 and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/bassrock/fastlane.git", :branch => "beta-build"

Please let us know if this PR fixed the issue for you or not and provide us your valuable feedback!

after raising version to beta I have “No build_beta_detail included” error with the same upload step that worked previously

Dear all,

@bassrock PR #20644 looks like fix this issue. Adding steps to switch your Fastlane version to this PR

Switch your Fastlane version to PR

  • Update Gemfile to 👇 and run bundle install, bundle update fastlane, or bundle update
gem "fastlane", :git => "https://github.com/bassrock/fastlane.git", :branch => "beta-build"

Please let us know if this PR fixed the issue for you or not and provide us your valuable feedback!

If this works that’s great, but I have 2 questions:

  1. Does anyone know how we’d use this version when using Azure DevOps tasks when use Fastlane where we don’t use Fastlane directly? The fastlane version seems to only work with versions, not branches like this. 😞
  2. Would there be any timeline for a new version being released (assuming this fix works)?

Confirming we are also seeing this issue with the latest version of Fastlane. My assumption is that perhaps Apple changed a response?

same issue

Same here. Started last Friday approximately. I’m able to deliver new app version to App Store, however, the CI always fails because the processing lasts too long

We see the same issue. Build stays at “Waiting for App Store Connect to finish processing the new build” and times out after 5 hours. Builds show up in TestFlight as Ready to Submit, but they seem to be missing tester groups and change log. When we try to submit for review the build gets labeled Invalid Binary.