microsoft / fastlane-plugin-appcenter

App Center fastlane integration.
MIT License
508 stars 126 forks source link

Setting Xcode xcconfig for schemes causes extraction tool to fail with "Error fetching release: A problem occured while extracting your app" #281

Closed davejlin closed 2 months ago

davejlin commented 2 years ago

My Flutter app has two platform flavors (i.e. Xcode schemes), dev and prod.

With the Xcode xcconfigs set to the more general Debug.xcconfig and Release.xcconfig (which causes the below CocoaPods warnings), the App Center upload and extraction of the .ipa succeed.

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.debug-prod.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.debug-prod.xcconfig in your build configuration (Flutter/Debug.xcconfig).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.debug-dev.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.debug-dev.xcconfig in your build configuration (Flutter/Debug.xcconfig).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.release-prod.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.release-prod.xcconfig in your build configuration (Flutter/Release.xcconfig).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.release-dev.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.release-dev.xcconfig in your build configuration (Flutter/Release.xcconfig).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile-prod.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile-prod.xcconfig in your build configuration (Flutter/Release.xcconfig).

[!] CocoaPods did not set the base configuration of your project because your project already has a custom config set. In order for CocoaPods integration to work at all, please either set the base configurations of the target Runner to Target Support Files/Pods-Runner/Pods-Runner.profile-dev.xcconfig or include the Target Support Files/Pods-Runner/Pods-Runner.profile-dev.xcconfig in your build configuration (Flutter/Release.xcconfig).

However, when I set the Xcode xcconfigs to reference individual schemes config files to satisfy the CocoaPods warnings, the App Center’s “app extraction step” fails for the resulting .ipa, both on CICD as well as when I try to manually upload it for distribution.

Either way, the app builds and runs successfully both locally and on CICD.

Since I get this extraction error even when I try to manually upload the .ipa, the issue appears not to be solvable by some config setting.

Screen Shot 2021-10-20 at 4 46 22 AM
[13:56:19]: Successfully exported and compressed dSYM file
[13:56:19]: Successfully exported and signed the ipa file:
[13:56:19]: /Users/runner/work/app/app/flutter/app/ios/app.ipa
[13:56:19]: Cruising back to lane 'ios test_and_build' 🚘
[13:56:19]: Cruising back to lane 'ios test_and_build_qa' 🚘
[13:56:19]: ------------------------------
[13:56:19]: --- Step: appcenter_upload ---
[13:56:19]: ------------------------------
[13:56:21]: Starting release upload...
[13:56:22]: Setting Metadata...
[13:56:22]: Metadata set
[13:56:22]: Uploading release binary...
[13:56:23]: Chunk uploaded
[13:56:25]: Chunk uploaded
[13:56:26]: Chunk uploaded
[13:56:27]: Chunk uploaded
[13:56:29]: Chunk uploaded
[13:56:30]: Chunk uploaded
[13:56:30]: Binary uploaded
[13:56:30]: Finishing release...
[13:56:30]: Upload finished
[13:56:31]: Waiting for release to be ready...
[13:56:45]: Error fetching release: A problem occured while extracting your app. (Correlation ID: 4b2fc833-20c6-4e51-bac0-b30b2cf0afb5)
+------------------------------------+-----------------------------------------------------------------------------------------------+
|                                                            Lane Context                                                            |
+------------------------------------+-----------------------------------------------------------------------------------------------+
| DEFAULT_PLATFORM                   | ios                                                                                           |
| PLATFORM_NAME                      | ios                                                                                           |
| LANE_NAME                          | ios test_and_build_qa                                                                         |
| KEYCHAIN_PATH                      | ~/Library/Keychains/match_keychain                                                            |
| ORIGINAL_DEFAULT_KEYCHAIN          | "/Users/runner/Library/Keychains/login.keychain-db"                                           |
| SIGH_PROFILE_TYPE                  | enterprise                                                                                    |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"com.app"=>"match InHouse com.app"}                                                          |
| IPA_OUTPUT_PATH                    | /Users/runner/work/app/app/flutter/app/ios/app.ipa                                            |
| XCODEBUILD_ARCHIVE                 | /Users/runner/Library/Developer/Xcode/Archives/2021-10-19/app 2021-10-19 13.50.18.xcarchive   |
| DSYM_OUTPUT_PATH                   | /Users/runner/work/app/app/flutter/app/ios/app.app.dSYM.zip                                   |
+------------------------------------+-----------------------------------------------------------------------------------------------+
[13:56:45]: Failed to upload release

+------+------------------------------------------+-------------+
|                       fastlane summary                        |
+------+------------------------------------------+-------------+
| Step | Action                                   | Time (in s) |
+------+------------------------------------------+-------------+
| 1    | default_platform                         | 0           |
| 2    | Switch to ios test_and_build lane        | 0           |
| 3    | Switch to ios create_match_keychain lane | 0           |
| 4    | create_keychain                          | 0           |
| 5    | Switch to ios get_code_signing lane      | 0           |
| 6    | match                                    | 3           |
| 7    | Switch to ios turn_off_auto_signing lane | 0           |
| 8    | update_code_signing_settings             | 0           |
| 9    | Switch to ios update_provisioning lane   | 0           |
| 10   | update_project_provisioning              | 0           |
| 11   | Switch to ios app_signing lane           | 0           |
| 12   | build_app                                | 371         |
| 💥   | appcenter_upload                         | 25          |
+------+------------------------------------------+-------------+

[!] Failed to upload release
[13:56:45]: fastlane finished with errors
Error: Process completed with exit code 1.
DmitriyKirakosyan commented 2 years ago

Hi @davejlin , are you still facing this issue? Since you experience the same error when uploading the ipa manually, it is not related to the fastlane pluign itself. I would recommend you to reach out to the App Center support team.

DmitriyKirakosyan commented 2 months ago

Closing as stale.