fastlane: `upload_to_testflight` action hangs with "Waiting for App Store Connect to finish processing the new build ..."
New Issue Checklist
- Updated fastlane to the latest version
- I read the Contribution Guidelines
- I read docs.fastlane.tools
- I searched for existing GitHub issues
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_usageat 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
- Fix current problem with BETA review, see https://github.com/fastlane/fastlane/issues/20645 — committed to freeletics/fastlane by mathaeus 2 years ago
- Update fastlane to temporary version Update fastlane to temporary version (bassrock, beta-build) gem "fastlane", :git => "https://github.com/bassrock/fastlane.git", :branch => "beta-build" For more ... — committed to WeTransfer/WeTransfer-iOS-CI by peagasilva 2 years ago
- Update fastlane to temporary version Update fastlane to temporary version (bassrock, beta-build) gem "fastlane", :git => "https://github.com/bassrock/fastlane.git", :branch => "beta-build" For more ... — committed to WeTransfer/WeTransfer-iOS-CI by peagasilva 2 years ago
✨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
GETtohttps://api.appstoreconnect.apple.com/v1/buildsisn’t returning any build beta details (which is what is the cause of this issue) but also…GET tohttps://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
skip_waiting_for_build_processing: trueto prevent the crash from happening while waiting for the build to processupload_to_testflightagain withdistribute_only: trueI’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
buildBetaDetailwhen we list the builds using the GET https://api.appstoreconnect.apple.com/v1/buildsAdding the flow, if anyone is interested to contribute:
Step1: BuildWatcher is fetching the build details and expecting to return
buildBetaDetailalso https://github.com/fastlane/fastlane/blob/ff41f3556f1baf8e700477e50f65be728780aa94/fastlane_core/lib/fastlane_core/build_watcher.rb#L106Step2: Fetching build details with ESSENTIAL_INCLUDES (betaBuildDetail) https://github.com/fastlane/fastlane/blob/ff41f3556f1baf8e700477e50f65be728780aa94/spaceship/lib/spaceship/connect_api/models/build.rb#L124
Step3: Apple suppose to returns the
buildBetaDetailbecause we are requesting it here but stop returning 🤷♂️ https://github.com/fastlane/fastlane/blob/ff41f3556f1baf8e700477e50f65be728780aa94/spaceship/lib/spaceship/connect_api/models/build.rb#L46I don’t know if this is temporary Apple issue or they removed it completely. According to Apple document, we can expect
buildBetaDetailin responsecc: 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 IOSeven the build is already done processing.Hello, I still got an issue like this. Can any have an idea? ENV:
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
Gemfileto 👇 and runbundle install,bundle update fastlane, orbundle updatePlease 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: truefor 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?
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
fastlanecode needs to be adapted or something.I have too little knowledge about the internals of
fastlaneto 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
Same for me.
It now detects the new version again, but errors out soon after
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 includederror, 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.
after raising version to beta I have “No build_beta_detail included” error with the same upload step that worked previously
If this works that’s great, but I have 2 questions:
fastlane versionseems to only work with versions, not branches like this. 😞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 labeledInvalid Binary.