fastlane: Deliver submits the wrong app version for review
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
Deliver uploaded version 5.5.0 (135) of our app, but actually submitted version 5.5.0 (117) for review. This would have been a catastrophic error should it have gone uncaught.
Here’s the full scenario:
- Earlier in the week we use Deliver to upload (but not submit) a build to the App Store (5.5.0 build 117). Shortly after uploading we discovered a critical bug in the build and did not submit.
- Today we used Deliver to upload and submit a new build of the app (5.5.0 build 135).
- During the upload, we received a series of warnings.
First we received this:
[Transporter Error Output]: description length:3150067
Followed by:
[Transporter Warning Output]: WARNING ITMS-90191: “Missing beta entitlement. Your app does not include the beta-reports-active entitlement. If you intend to distribute this build via TestFlight for beta testing, please re-build this app with an App Store Distribution provisioning profile. Do not use ad-hoc profiles.”
[17:55:37]: [Transporter Warning Output]: WARNING ITMS-90719: “Missing App Store Icon. WatchOS Apps must include a 1024x1024px App Store Icon in PNG format. Without providing the icon in the Asset Catalog or via iTunes Connect, apps cannot be submitted for App Review or Beta App Review. Refer to https://developer.apple.com/watchos/human-interface-guidelines/icons-and-images/home-screen-icons/ for more information.”
I don’t remember ever seeing this beta entitlement issue before, but we don’t use TestFlight so I don’t believe that’s relevant to the issue. ITMS-90719 was actually an issue – Since the release of the iPhone X, there’s now a new Apple Watch app icon size (1024x1024) and we forgot to add it.
Regardless, Deliver appeared to succeed. It then continued to upload the app. We received this log:
[17:55:44]: Selecting the latest build...
[17:55:46]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:56:18]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:56:52]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:57:24]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:57:58]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:58:30]: Selecting build 5.5.0 (117)...
[17:58:32]: Successfully selected build
[17:58:32]: Submitting the app for review...
[17:58:46]: Setting ‘add_id_info_serves_ads’ to ‘false’...
[17:58:46]: Setting ‘add_id_info_tracks_action’ to ‘true’...
[17:58:46]: Setting ‘add_id_info_tracks_install’ to ‘true’...
[17:58:46]: Setting ‘add_id_info_uses_idfa’ to ‘true’...
[17:58:46]: Setting ‘export_compliance_encryption_updated’ to ‘false’...
[17:59:00]: Successfully submitted the app for review!
Deliver is waiting for 5.5.0 (135) to finish processing, but then just 3 minutes later (oddly fast for processing) it chooses build 5.5.0 (117) – aka the BROKEN build – and submits it for review. Yikes.
After catching Deliver’s mistake, I rejected the build and opted to manually submit using Xcode. We were immediately rejected due to ITMS-90719 when uploading through Xcode (it’s unclear to me why this failure didn’t occur during the Deliver upload). We added the icon, bumped the build number, and uploaded again manually via Xcode without issue.
Regardless of iTunes Connect issues, this seems like a potentially critical bug to me.
Deliver should validate that the build number being submitted matches the build number that was uploaded.
Here’s the full Deliver log with our Apple ID and bundle ID changed for privacy:
+-----------------------+-----------------------+
| Detected Values from ‘./fastlane/Deliverfile’ |
+-----------------------+-----------------------+
| app_identifier | com.company.app . |
| username | foo@bar.com |
+-----------------------+-----------------------+
[17:53:17]: Login to iTunes Connect (foo@bar.com)
[17:53:19]: Login successful
+--------------------------------------+--------------------------------------+
| deliver 2.64.0 Summary |
+--------------------------------------+--------------------------------------+
| ipa | /mobile/App/App-AdHoc-5.5.0-135.ipa |
| submit_for_review | true |
| force | false |
| metadata_path | ./fastlane/metadata |
| app_version | 5.5.0 |
| skip_screenshots | true |
| automatic_release | true |
| submission_information.add_id_info_ | false |
| serves_ads | |
| submission_information.add_id_info_ | true |
| tracks_action | |
| submission_information.add_id_info_ | true |
| tracks_install | |
| submission_information.add_id_info_ | true |
| uses_idfa | |
| submission_information.export_compl | false |
| iance_encryption_updated | |
| app_identifier | com.company.app |
| username | foo@bar.com |
| screenshots_path | ./fastlane/screenshots |
| edit_live | false |
| platform | ios |
| skip_binary_upload | false |
| skip_metadata | false |
| skip_app_version_update | false |
| overwrite_screenshots | false |
| run_precheck_before_submit | true |
| precheck_default_rule_level | warn |
| ignore_language_directory_validatio | false |
| n | |
| precheck_include_in_app_purchases | true |
+--------------------------------------+--------------------------------------+
[17:53:20]: Making sure the latest version on iTunes Connect matches ‘5.5.0’ from the ipa file...
[17:53:22]: ‘5.5.0’ is the latest version on iTunes Connect
[17:53:22]: Loading ‘./fastlane/metadata/en-US/description.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/en-US/keywords.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/en-US/release_notes.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/en-US/support_url.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/en-US/marketing_url.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/en-US/promotional_text.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/en-US/name.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/en-US/subtitle.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/en-US/privacy_url.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/copyright.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/primary_category.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/secondary_category.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/primary_first_sub_category.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/primary_second_sub_category.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/secondary_first_sub_category.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/secondary_second_sub_category.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/trade_name.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/first_name.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/last_name.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/address_line1.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/address_line2.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/city_name.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/state.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/country.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/postal_code.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/phone_number.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/email_address.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/trade_representative_contact_information/is_displayed_on_app_store.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/review_information/first_name.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/review_information/last_name.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/review_information/phone_number.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/review_information/email_address.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/review_information/demo_user.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/review_information/demo_password.txt’...
[17:53:22]: Loading ‘./fastlane/metadata/review_information/notes.txt’...
[17:53:23]: Verifying the upload via the HTML file can be disabled by either adding
[17:53:23]: `force true` to your Deliverfile or using `fastlane deliver --force`
[17:53:23]: Does the Preview on path ‘./Preview.html’ look okay for you? (y/n)
y
[17:54:20]: HTML file confirmed...
[17:54:24]: Activating language en-US...
[17:54:27]: Uploading metadata to iTunes Connect
[17:54:29]: Successfully uploaded set of metadata to iTunes Connect
[17:54:30]: Uploading app icon...
[17:54:34]: Uploading apple watchapp icon...
[17:54:40]: Uploading binary to iTunes Connect
[17:54:40]: Going to upload updated app to iTunes Connect
[17:54:40]: This might take a few minutes. Please don’t interrupt the script.
[17:54:53]: [Transporter Error Output]: description length:3150067
[17:55:37]: [Transporter Warning Output]: WARNING ITMS-90191: “Missing beta entitlement. Your app does not include the beta-reports-active entitlement. If you intend to distribute this build via TestFlight for beta testing, please re-build this app with an App Store Distribution provisioning profile. Do not use ad-hoc profiles.”
[17:55:37]: [Transporter Warning Output]: WARNING ITMS-90719: “Missing App Store Icon. WatchOS Apps must include a 1024x1024px App Store Icon in PNG format. Without providing the icon in the Asset Catalog or via iTunes Connect, apps cannot be submitted for App Review or Beta App Review. Refer to https://developer.apple.com/watchos/human-interface-guidelines/icons-and-images/home-screen-icons/ for more information.”
[17:55:37]: iTunes Transporter successfully finished its job
[17:55:38]: WARNING ITMS-90191: “Missing beta entitlement. Your app does not include the beta-reports-active entitlement. If you intend to distribute this build via TestFlight for beta testing, please re-build this app with an App Store Distribution provisioning profile. Do not use ad-hoc profiles.”
WARNING ITMS-90719: “Missing App Store Icon. WatchOS Apps must include a 1024x1024px App Store Icon in PNG format. Without providing the icon in the Asset Catalog or via iTunes Connect, apps cannot be submitted for App Review or Beta App Review. Refer to https://developer.apple.com/watchos/human-interface-guidelines/icons-and-images/home-screen-icons/ for more information.”
[17:55:38]: [iTMSTransporter] [2017-11-17 17:55:37 EST] <main> DBG-X: Releasing token file lock
[17:55:38]: [iTMSTransporter] [2017-11-17 17:55:37 EST] <main> DBG-X: Removing token at path /Users/foo/.itmstransporter/UploadTokens/Foos-MacBook-Pro.local_JF7AWS3M92_852691916.itmsp.token
[17:55:38]: [iTMSTransporter] [2017-11-17 17:55:37 EST] <main> INFO: Done performing uploadDone notification to Apple.
[17:55:38]: [iTMSTransporter] [2017-11-17 17:55:37 EST] <main> INFO: The package: /tmp/852691916.itmsp has been successfully uploaded.
[17:55:38]: [iTMSTransporter] [2017-11-17 17:55:37 EST] <main> INFO: The following warnings were received from Apple’s web service ...
[17:55:38]: [iTMSTransporter] [2017-11-17 17:55:37 EST] <main> WARN: WARNING ITMS-90191: “Missing beta entitlement. Your app does not include the beta-reports-active entitlement. If you intend to distribute this build via TestFlight for beta testing, please re-build this app with an App Store Distribution provisioning profile. Do not use ad-hoc profiles.”
[17:55:38]: [iTMSTransporter] [2017-11-17 17:55:37 EST] <main> WARN: WARNING ITMS-90719: “Missing App Store Icon. WatchOS Apps must include a 1024x1024px App Store Icon in PNG format. Without providing the icon in the Asset Catalog or via iTunes Connect, apps cannot be submitted for App Review or Beta App Review. Refer to https://developer.apple.com/watchos/human-interface-guidelines/icons-and-images/home-screen-icons/ for more information.”
[17:55:38]: [iTMSTransporter]
[17:55:38]: [iTMSTransporter]
[17:55:38]: [iTMSTransporter]
[17:55:38]: [iTMSTransporter] Package Summary:
[17:55:38]: [iTMSTransporter]
[17:55:38]: [iTMSTransporter] 1 packages were uploaded successfully:
[17:55:38]: [iTMSTransporter] /tmp/852691916.itmsp
[17:55:38]: [iTMSTransporter] [2017-11-17 17:55:37 EST] <main> DBG-X: Returning 0
[17:55:38]: iTunes Transporter output above ^
[17:55:38]: description length:3150067
[17:55:38]: Although errors occurred during execution of iTMSTransporter, it returned success status.
[17:55:38]: --------------------------------------------------------------------
[17:55:38]: Successfully uploaded package to iTunes Connect. It might take a few minutes until it’s visible online.
[17:55:38]: --------------------------------------------------------------------
[17:55:38]: Finished the upload to iTunes Connect
[17:55:38]: Running precheck before submitting to review, if you’d like to disable this check you can set run_precheck_before_submit to false
[17:55:38]: Making sure we pass precheck 👮♀️ 👮 before we submit 🛫
+--------------------------+----------------------+
| Summary for precheck 2.64.0 |
+--------------------------+----------------------+
| default_rule_level | warn |
| include_in_app_purchases | true |
| app_identifier | com.company.app |
| username | foo@bar.com |
+--------------------------+----------------------+
[17:55:38]: Checking app for precheck rule violations
[17:55:41]: Reading in-app purchases. If you have a lot, this might take a while
[17:55:41]: You can disable IAP checking by setting the `include_in_app_purchases` flag to `false`
[17:55:42]: Done reading in-app purchases
[17:55:42]: ✅ Passed: No negative sentiment
[17:55:42]: ✅ Passed: No placeholder text
[17:55:42]: ✅ Passed: No mentioning competitors
[17:55:42]: ✅ Passed: No future functionality promises
[17:55:42]: ✅ Passed: No words indicating test content
[17:55:42]: ✅ Passed: No curse words
[17:55:42]: ✅ Passed: No words indicating your IAP is free
[17:55:42]: ✅ Passed: Incorrect, or missing copyright date
[17:55:42]: ✅ Passed: No broken urls
[17:55:42]: precheck 👮♀️ 👮 finished without detecting any potential problems 🛫
[17:55:44]: Selecting the latest build...
[17:55:46]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:56:18]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:56:52]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:57:24]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:57:58]: Waiting iTunes Connect processing for build 5.5.0 (135)... this might take a while...
[17:58:30]: Selecting build 5.5.0 (117)...
[17:58:32]: Successfully selected build
[17:58:32]: Submitting the app for review...
[17:58:46]: Setting ‘add_id_info_serves_ads’ to ‘false’...
[17:58:46]: Setting ‘add_id_info_tracks_action’ to ‘true’...
[17:58:46]: Setting ‘add_id_info_tracks_install’ to ‘true’...
[17:58:46]: Setting ‘add_id_info_uses_idfa’ to ‘true’...
[17:58:46]: Setting ‘export_compliance_encryption_updated’ to ‘false’...
[17:59:00]: Successfully submitted the app for review!
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Reactions: 3
- Comments: 24 (4 by maintainers)
In the docs for deliver, I see:
My deliver command looks like this:
Which, to me, means that if the build number is not explicitly supplied (which it’s not), Fastlane should enforce that only the build number of the uploaded ipa should be submitted. Perhaps this could be fixed by explicitly passing
build_numberwith the deliver command, but I still strongly believe this should be default behavior.Setting aside the iTunes Transporter issue, seems like
"Selecting the latest build..."is what you wanted:https://github.com/fastlane/fastlane/blob/e76a04773a191772701e01095f72e066bfff6569/deliver/lib/deliver/submit_for_review.rb#L34-L44
But your issue was caused because
wait_for_buildselects the latest candidate build that isn’t processing:https://github.com/fastlane/fastlane/blob/e76a04773a191772701e01095f72e066bfff6569/deliver/lib/deliver/submit_for_review.rb#L52-L69
Candidate builds are basically uploaded but unreleased builds for the current version number:
https://github.com/fastlane/fastlane/blob/d4710276a5ba20a1db0dc1eb44b0cd23650b9b24/spaceship/lib/spaceship/tunes/app_version.rb#L326-L335
So if this happens again, I think you can avoid it by bumping the version number. But I also think fastlane should throw a warning if the build# selected is different from the build# you just uploaded.
Working on a fix for this ^ 💪
#13297