Issue Summary:
When attempting to upload a new build on the same version using Fastlane, despite incrementing the build number, facing an error indicating that the bundle version must be higher than the previously uploaded version. Even after hardcoding the build number, the issue persists.
Error Message:
[Application Loader Error Output]: The provided entity includes an attribute with a value that has already been used The bundle version must be higher than the previously uploaded version: ‘1’. (ID: 1bb8181b-599e-4627-90a3-ec74a58562d9) (-19232)
Logs:
Using existing authorization token for App Store Connect API
Fetching the latest build number for any version
Latest upload for version 0.10.1 on ios platform is build: 1
------------------------------------
--- Step: increment_build_number ---
------------------------------------
cd /path/to/ios && agvtool new-version -all 2 && cd -
Setting version of project Runner to: 2.
Also setting CFBundleVersion key (assuming it exists)
Updating CFBundleVersion in Info.plist(s)...
Updated CFBundleVersion in "Runner.xcodeproj/../Runner/Info.plist" to 2
Cannot find "Runner.xcodeproj/../YES"
-------------------
--- Step: pilot ---
-------------------
INFO [2024-05-11 16:14:42.42]: Creating authorization token for App Store Connect API
DEBUG [2024-05-11 16:14:42.42]: App identifier (io.abc.app)
INFO [2024-05-11 16:14:43.93]: Ready to upload new build to TestFlight (App: xxxx)...
DEBUG [2024-05-11 16:14:43.96]: App Platform (ios)
INFO [2024-05-11 16:14:44.76]: Wrote XML data to '/var/folders/n_/6_y2gmw17fq8jr38bf4q3jt00000gp/T/d20240511-57139-hqu8nk/6478811022-f5a9a8bb-2994-49b8-a60d-6ce7d837fd46.itmsp'
DEBUG [2024-05-11 16:14:44.76]: Using altool as transporter.
INFO [2024-05-11 16:14:44.86]: Going to upload updated app to App Store Connect
INFO [2024-05-11 16:14:44.86]: This might take a few minutes. Please don't interrupt the script.
DEBUG [2024-05-11 16:14:44.87]: API_PRIVATE_KEYS_DIR=YourTmpP8KeyDir xcrun altool --upload-app --apiKey YourKeyID --apiIssuer YourIssuerID -t ios -f /var/folders/n_/6_y2gmw17fq8jr38bf4q3jt00000gp/T/381b8a50-a3ba-4a50-9ad9-968a723a8782.ipa -k 100000
DEBUG [2024-05-11 16:14:57.99]: [altool]: {
DEBUG [2024-05-11 16:14:57.99]: [altool]: NSLocalizedDescription = "The provided entity includes an attribute with a value that has already been used";
DEBUG [2024-05-11 16:14:57.99]: [altool]: NSLocalizedFailureReason = "The bundle version must be higher than the previously uploaded version: U20181U2019. (ID: 1bb8181b-599e-4627-90a3-ec74a58562d9)";
DEBUG [2024-05-11 16:14:57.99]: [altool]: NSUnderlyingError = "Error Domain=IrisAPI Code=-19241 "The provided entity includes an attribute with a value that has already been used" UserInfo={status=409, detail=The bundle version must be higher than the previously uploaded version., source={n pointer = "/data/attributes/cfBundleVersion";n}, id=1bb8181b-599e-4627-90a3-ec74a58562d9, code=ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE, title=The provided entity includes an attribute with a value that has already been used, meta={n previousBundleVersion = 1;n}, NSLocalizedDescription=The provided entity includes an attribute with a value that has already been used, NSLocalizedFailureReason=The bundle version must be higher than the previously uploaded version.}";
DEBUG [2024-05-11 16:14:57.99]: [altool]: "iris-code" = "ENTITY_ERROR.ATTRIBUTE.INVALID.DUPLICATE";
DEBUG [2024-05-11 16:14:57.99]: [altool]: previousBundleVersion = 1;
DEBUG [2024-05-11 16:14:57.99]: [altool]: }
Versions Details:
| Name | Version |
| ——– | ——– |
| Fastlane | 2.220.0 |
| Flutter Version | 3.19.6 |
Additional Details:
The App Store Console displays only one build under the version I am trying to upload new build. Even when manually setting the build number to “2”, the issue persists.
Logs indicate successful build number incrementation but fail during the upload process.
Steps Taken:
- Fetch existing version and build number available on TestFlight.
- Incremental update the build number.
- Hardcoded the version and build number.
- Ensuring the bundle version is updated correctly in the Info.plist file.
- Attempting to upload the build using Fastlane (pilot action).