Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: "Encountered error while creating the IPA" may only be a warning #2859

Open
TonyD-TuftAndPaw opened this issue Feb 6, 2025 · 8 comments
Labels
bug Something isn't working

Comments

@TonyD-TuftAndPaw
Copy link

TonyD-TuftAndPaw commented Feb 6, 2025

App ID: com.tuftandpaw.app.staging

Description

flutter build skims over the message "Encountered error while creating the IPA", where shorebird release halts.

Steps To Reproduce

(Sorry, maybe later?)

Expected Behavior

shorebird release should not halt on any warnings that flutter build doesn't halt on.

Additional Context

Logs attached for a successful and unsuccessful run, with the only material difference being the use of shorebird release instead of flutter build.

flutter build iOS success.txt
shorebird release iOS failure.txt

@TonyD-TuftAndPaw TonyD-TuftAndPaw added the bug Something isn't working label Feb 6, 2025
@eseidel
Copy link
Contributor

eseidel commented Feb 6, 2025

@TonyD-TuftAndPaw
Copy link
Author

The most relevant chunks from the logs:

From the success, not using shorebird:

...
[21:30:58]: ▸ Encountered error while creating the IPA:
[21:30:58]: ▸ Try distributing the app in Xcode:
[21:30:58]: ▸ open /Users/runner/work/TuftAndPawApp/TuftAndPawApp/build/ios/archive/Runner.xcarchive
[21:30:58]: Cruising back to lane 'ios build_flutter_app' 🚘
[21:30:58]: Cruising back to lane 'ios build_ipa' 🚘
[21:30:58]: Cruising back to lane 'ios release_app_store' 🚘
[21:30:58]: -----------------------
[21:30:58]: --- Step: build_app ---
[21:30:58]: -----------------------
[21:30:58]: Successfully loaded '/Users/runner/work/TuftAndPawApp/TuftAndPawApp/ios/fastlane/Gymfile' 📄

+-------------------------------------------+
| Detected Values from './fastlane/Gymfile' |
+---------------------+---------------------+
| scheme              | staging             |
| output_directory    | ./                  |
+---------------------+---------------------+

[21:30:58]: Resolving Swift Package Manager dependencies...
[21:30:58]: $ xcodebuild -resolvePackageDependencies -workspace ./Runner.xcworkspace -scheme staging
...

From the failure, using shorebird:

...
[20:31:20]: ▸ [   +2 ms] Encountered error while creating the IPA:
[20:31:20]: ▸ [        ] Try distributing the app in Xcode:
[20:31:20]: ▸ [        ]   open /Users/runner/work/TuftAndPawApp/TuftAndPawApp/build/ios/archive/Runner.xcarchive (360.8s)
[20:31:20]: ▸ If you aren't sure why this command failed, re-run with the --verbose flag to see more information.
[20:31:20]: ▸ You can also [file an issue](https://github.com/shorebirdtech/shorebird/issues/new/choose) if you think this is a bug. Please include the following log file in your report:
[20:31:20]: ▸ /Users/runner/Library/Application Support/shorebird/logs/1738873514613_shorebird.log
+----------------------------------------------------------------------------------------------------------+
|                                               Lane Context                                               |
+------------------------------------+---------------------------------------------------------------------+
| DEFAULT_PLATFORM                   | ios                                                                 |
| PLATFORM_NAME                      | ios                                                                 |
| LANE_NAME                          | ios release_app_store                                               |
| LATEST_BUILD_NUMBER                | 27                                                                  |
| LATEST_VERSION                     | 0.1.7                                                               |
| KEYCHAIN_PATH                      | ~/Library/Keychains/fastlane_tmp_keychain                           |
| ORIGINAL_DEFAULT_KEYCHAIN          | "/Users/runner/Library/Keychains/login.keychain-db"                 |
| SIGH_PROFILE_TYPE                  | app-store                                                           |
| MATCH_PROVISIONING_PROFILE_MAPPING | {"***"=>"match AppStore ***"} |
+------------------------------------+---------------------------------------------------------------------+
[20:31:21]: Called from Fastfile at line 22
[20:31:21]: ```
[20:31:21]:     20:	    authenticate_apple_store
[20:31:21]:     21:	    
[20:31:21]:  => 22:	    build_flutter_app(
[20:31:21]:     23:	      type: "ipa",
[20:31:21]:     24:	      no_codesign: options[:no_codesign] || false,
[20:31:21]: ```
[20:31:21]: Exit status of command 'cd /Users/runner/work/TuftAndPawApp/TuftAndPawApp && shorebird release ios  -- --release -- --no-pub -- --suppress-analytics -- --build-number=28 -- --build-name=v0.1.6 --flavor staging -t lib/main_staging.dart' was 70 instead of 0.
...

@eseidel
Copy link
Contributor

eseidel commented Feb 6, 2025

Hmm, I'm struggling to find a real error in that log. 🤔 @bryanoltman might know.

@bryanoltman
Copy link
Contributor

@geniuscva
Copy link

having the same problem

@eseidel
Copy link
Contributor

eseidel commented Feb 12, 2025

Bryan has been working on adding tooling to help surface common errors from logs. Although I'm still not sure what the error is in these logs. Most often errors building for iOS are signing errors, so another thing to try might be shorebird release ios --no-codesign (not as a final solution, just to see if it works while disabling XCode signing).

@TonyD-TuftAndPaw
Copy link
Author

Bryan has been working on adding tooling to help surface common errors from logs. Although I'm still not sure what the error is in these logs. Most often errors building for iOS are signing errors, so another thing to try might be shorebird release ios --no-codesign (not as a final solution, just to see if it works while disabling XCode signing).

Tried it; didn't work, logs attached. I'm having trouble reading the logs myself, but it seems like maybe shorebird succeeded, but something after that step failed, something that depended on code signing...?

shorebird release iOS failure no codesign.txt

@bryanoltman
Copy link
Contributor

2025-02-14T18:36:03.1250030Z error: exportArchive: No Team Found in Archive
2025-02-14T18:36:03.1250260Z 
2025-02-14T18:36:03.1251020Z Error Domain=IDEDistributionAnalyzeArchiveStepErrorDomain Code=0 "No Team Found in Archive" UserInfo={NSLocalizedDescription=No Team Found in Archive, NSLocalizedRecoverySuggestion=Use the Signing & Capabilities editor to assign a team to the targets and build a new archive.}
2025-02-14T18:36:03.1251760Z 
2025-02-14T18:36:03.1251910Z ** EXPORT FAILED **
2025-02-14T18:36:03.1252300Z [18:36:03]: �[31mExit status: 70�[0m
2025-02-14T18:36:03.1367330Z 
2025-02-14T18:36:03.1376060Z +----------------------------------------------+
2025-02-14T18:36:03.1377500Z |              �[32m�[33mBuild environment�[0m               |
2025-02-14T18:36:03.1378020Z +---------------+------------------------------+
2025-02-14T18:36:03.1378400Z | xcode_path    | /Applications/Xcode_15.4.app |
2025-02-14T18:36:03.1378650Z | gym_version   | 2.226.0                      |
2025-02-14T18:36:03.1378900Z | export_method | app-store                    |
2025-02-14T18:36:03.1379130Z | sdk           | iPhoneOS17.5.sdk             |
2025-02-14T18:36:03.1379430Z +---------------+------------------------------+
2025-02-14T18:36:03.1379680Z 
2025-02-14T18:36:03.1404250Z [18:36:03]: 
2025-02-14T18:36:03.1432720Z [18:36:03]: �[31mLooks like fastlane ran into a build/archive error with your project�[0m
2025-02-14T18:36:03.1433910Z [18:36:03]: �[31mIt's hard to tell what's causing the error, so we wrote some guides on how�[0m
2025-02-14T18:36:03.1434580Z [18:36:03]: �[31mto troubleshoot build and signing issues: https://docs.fastlane.tools/codesigning/getting-started/�[0m
2025-02-14T18:36:03.1435360Z [18:36:03]: �[31mBefore submitting an issue on GitHub, please follow the guide above and make�[0m
2025-02-14T18:36:03.1436120Z [18:36:03]: �[31msure your project is set up correctly.�[0m
2025-02-14T18:36:03.1436540Z [18:36:03]: �[31mfastlane uses `xcodebuild` commands to generate your binary, you can see the�[0m
2025-02-14T18:36:03.1437030Z [18:36:03]: �[31mthe full commands printed out in yellow in the above log.�[0m
2025-02-14T18:36:03.1437520Z [18:36:03]: �[31mMake sure to inspect the output above, as usually you'll find more error information there�[0m

looks relevant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants