dotdoom / fastlane-plugin-flutter

Flutter actions plugin for Fastlane
MIT License
36 stars 6 forks source link

flutter build ipa> build success xcarchive, build fail ipa should be fail, but not. #35

Open dfdgsdfg opened 7 months ago

dfdgsdfg commented 7 months ago

During flutter build ipa, then xcarchive success, but ipa fail, nothing happened. IMO, this is fail, so should be show the logs.

Fastlane Log

[13:07:48]: ---------------------------
[13:07:48]: --- Step: flutter_build ---
[13:07:48]: ---------------------------
[13:07:48]: Determined Flutter location as /Users/dev/flutter because 'flutter' executable in PATH is located there (current directory is /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app).
[13:07:48]: $ /Users/dev/flutter/bin/flutter build ipa --build-number 110235 --verbose --release --flavor dev --dart-define\=FLAVOR\=dev --no-tree-shake-icons --export-options-plist\=ios/Runner/ExportOptionsAdHoc.plist
[13:09:48]: FLUTTER_OUTPUT /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app/build/ios/archive/Runner.xcarchive

Actual log with flutter build ipa --verbose

2024-03-20T00:34:20.0550830Z [09:34:15]: ▸ [        ] Building release-testing IPA...
2024-03-20T00:34:20.0552500Z [09:34:15]: ▸ [        ] executing: /usr/bin/arch -arm64e xcrun xcodebuild -exportArchive -allowProvisioningDeviceRegistration -allowProvisioningUpdates -archivePath /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app/build/ios/archive/Runner.xcarchive -exportPath /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app/build/ios/ipa -exportOptionsPlist /Users/dev/actions-runner-01/_work/us-app/us-app/apps/insight_app/ios/Runner/ExportOptionsAdHoc.plist
2024-03-20T00:34:20.0552630Z [09:34:15]: ▸ [+9292 ms] ** EXPORT FAILED **
2024-03-20T00:34:20.0552690Z [09:34:15]: ▸ 
2024-03-20T00:34:20.0552760Z [09:34:15]: ▸ 
2024-03-20T00:34:20.0553590Z [09:34:15]: ▸            2024-03-20 09:34:05.693 xcodebuild[54492:1199369] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path "/var/folders/83/z8071391421g7q0jzq89kplm0000gn/T/dev_2024-03-20_09-34-05.693.xcdistributionlogs".
2024-03-20T00:34:20.0553760Z [09:34:15]: ▸            error: exportArchive: ipatool failed
2024-03-20T00:34:20.0553820Z [09:34:15]: ▸ 
2024-03-20T00:34:20.0554070Z [09:34:15]: ▸            AppThinning.StubError(errorDescription: Optional("ipatool failed"))
2024-03-20T00:34:20.0554270Z [09:34:15]: ▸ [        ] Building release-testing IPA... (completed in 9.3s)
2024-03-20T00:34:20.0554410Z [09:34:15]: ▸ [        ] "flutter ipa" took 106,850ms.
2024-03-20T00:34:20.0554550Z [09:34:15]: ▸ [ +179 ms] ensureAnalyticsSent: 177ms
2024-03-20T00:34:20.0554680Z [09:34:15]: ▸ [        ] Running 1 shutdown hook
2024-03-20T00:34:20.0554810Z [09:34:15]: ▸ [   +1 ms] Shutdown hooks complete
2024-03-20T00:34:20.0554930Z [09:34:15]: ▸ [        ] exiting with code 0
dotdoom commented 7 months ago

As flutter command exits with code 0 (which means "success"), the plugin merely propagates the same. I think this problem should be reported upstream, to the flutter tool.

I'll take a look if the issue is already reported, later.

dotdoom commented 7 months ago

This has been reported at https://github.com/flutter/flutter/issues/125609, but has been closed for inactivity. There are other issues which report the same behavior, only tangentially (e.g. https://github.com/flutter/flutter/issues/140212).