-
Notifications
You must be signed in to change notification settings - Fork 14
Description
We are using fvm in our Flutter project. This means essentially that you have to prefix every flutter shell command with fvm to work.
This action is not compatible with fvm as we just recently discovered. The issue is that the action doesn't find the Flutter installation on the host system, then installs the most recent Flutter version, and continues.
This wasn't an issue before because it worked. But now, we are currently on 3.27.5, but the action installs 3.29.0 (flutter --version fails)
The final error is related to the flutterfire_cli which cannot be activated because it doesn't support Dart 3.6.0.
Btw: We also have flutterfire_cli installed in our pipeline but it gets overriden by this earlier version.
name: Build and distribute - Stage (iOS)
on:
workflow_dispatch:
env:
PACKAGE_REPOSITORY_TOKEN: ${{ secrets.PACKAGE_REPOSITORY_TOKEN }}
ENV_STAGE: ${{ secrets.ENV_STAGE }}
jobs:
build:
name: build
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Basic setup
uses: ./.github/actions/basic-setup
with:
ENV_FILE: $ENV_STAGE
ENV: stage
- name: Quality check
uses: ./.github/actions/quality-check
# required for building the iOS app and upload the debug symbols to Firebase Crashlytics
- name: Install FlutterFire CLI
run: |
dart pub global activate flutterfire_cli
export PATH="$PATH":"$HOME/.pub-cache/bin"
# run integration tests
# - name: Integration test
# uses: ./.github/actions/integration-test-ios
- uses: cedvdb/action-flutter-build-ios@v1
with:
# always use --export-options-plist=ios/GithubActionsExportOptions.plist
build-cmd: fvm flutter build ipa --release --flavor stage --build-number ${{ github.run_number }} --export-options-plist=ios/GithubActionsExportOptionsStage.plist
certificate-base64: ${{ secrets.IOS_BUILD_CERTIFICATE_BASE64 }}
certificate-password: ${{ secrets.IOS_BUILD_CERTIFICATE_PASSWORD }}
provisioning-profile-base64: ${{ secrets.IOS_MOBILE_PROVISIONING_PROFILE_STAGE_BASE64 }}
keychain-password: ${{ secrets.IOS_GITHUB_KEYCHAIN_PASSWORD }}
- name: Archive IPA
uses: actions/upload-artifact@v4
with:
name: ipa-stage
# Try running the build locally with the build command to be sure of this path
path: build/ios/ipa/xxx.ipa
if-no-files-found: error
- name: 'Upload app to TestFlight'
uses: apple-actions/upload-testflight-build@v1
with:
app-path: 'build/ios/ipa/xxx.ipa'
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_API_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_API_PRIVATE_KEY }}Here is the error section of the action:
Details
2025-02-19T15:14:00.6871420Z Can't load Kernel binary: Invalid kernel binary format version.
2025-02-19T15:14:00.6872050Z FINE: Pub 3.6.0
2025-02-19T15:14:00.6872490Z ERR : flutterfire_cli as globally activated doesn't support Dart 3.6.0.
2025-02-19T15:14:00.6872990Z |
2025-02-19T15:14:00.6873280Z | try:
2025-02-19T15:14:00.6873700Z | `dart pub global activate flutterfire_cli` to reactivate.
2025-02-19T15:14:00.6874230Z FINE: Exception type: DataException
2025-02-19T15:14:00.6874790Z FINE: package:pub/src/utils.dart 575:36 dataError
2025-02-19T15:14:00.6875460Z | package:pub/src/global_packages.dart 418:9 GlobalPackages.find.<fn>
2025-02-19T15:14:00.6876090Z | dart:_compact_hash _LinkedHashMapMixin.forEach
2025-02-19T15:14:00.6876740Z | package:pub/src/global_packages.dart 409:29 GlobalPackages.find
2025-02-19T15:14:00.6877390Z | package:pub/src/command/global_run.dart 76:44 GlobalRunCommand.runProtected
2025-02-19T15:14:00.6878130Z | package:pub/src/command.dart 197:21 PubCommand.run.<fn>
2025-02-19T15:14:00.6878720Z | dart:async new Future.sync
2025-02-19T15:14:00.6879280Z | package:pub/src/utils.dart 138:12 captureErrors.wrappedCallback
2025-02-19T15:14:00.6879950Z | package:stack_trace Chain.capture
2025-02-19T15:14:00.6880510Z | package:pub/src/utils.dart 155:11 captureErrors
2025-02-19T15:14:00.6881120Z | package:pub/src/command.dart 196:13 PubCommand.run
2025-02-19T15:14:00.6881820Z | package:args/command_runner.dart 212:27 CommandRunner.runCommand
2025-02-19T15:14:00.6882460Z | package:dartdev/dartdev.dart 240:30 DartdevRunner.runCommand
2025-02-19T15:14:00.6883200Z | package:args/command_runner.dart 122:25 CommandRunner.run.<fn>
2025-02-19T15:14:00.6884020Z | dart:async new Future.sync
2025-02-19T15:14:00.6884600Z | package:args/command_runner.dart 122:14 CommandRunner.run
2025-02-19T15:14:00.6908960Z | package:dartdev/dartdev.dart 47:29 runDartdev
2025-02-19T15:14:00.6909560Z | /Volumes/Work/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart 13:11 main
2025-02-19T15:14:00.6910130Z | ===== asynchronous gap ===========================
2025-02-19T15:14:00.6910580Z | dart:async Future.catchError
2025-02-19T15:14:00.6911130Z | package:pub/src/utils.dart 140:10 captureErrors.wrappedCallback
2025-02-19T15:14:00.6911760Z | package:stack_trace Chain.capture
2025-02-19T15:14:00.6912460Z | package:pub/src/utils.dart 155:11 captureErrors
2025-02-19T15:14:00.6913190Z | package:pub/src/command.dart 196:13 PubCommand.run
2025-02-19T15:14:00.6914010Z | package:args/command_runner.dart 212:27 CommandRunner.runCommand
2025-02-19T15:14:00.6914790Z | package:dartdev/dartdev.dart 240:30 DartdevRunner.runCommand
2025-02-19T15:14:00.6915490Z | package:args/command_runner.dart 122:25 CommandRunner.run.<fn>
2025-02-19T15:14:00.6916090Z | dart:async new Future.sync
2025-02-19T15:14:00.6916590Z | package:args/command_runner.dart 122:14 CommandRunner.run
2025-02-19T15:14:00.6919060Z | package:dartdev/dartdev.dart 47:29 runDartdev
2025-02-19T15:14:00.6920360Z | /Volumes/Work/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart 13:11 main
2025-02-19T15:14:00.6920790Z ---- Log transcript ----
2025-02-19T15:14:00.6921060Z FINE: Pub 3.6.0
2025-02-19T15:14:00.6921400Z ERR : flutterfire_cli as globally activated doesn't support Dart 3.6.0.
2025-02-19T15:14:00.6921780Z |
2025-02-19T15:14:00.6922010Z | try:
2025-02-19T15:14:00.6922330Z | `dart pub global activate flutterfire_cli` to reactivate.
2025-02-19T15:14:00.6922750Z FINE: Exception type: DataException
2025-02-19T15:14:00.6923220Z FINE: package:pub/src/utils.dart 575:36 dataError
2025-02-19T15:14:00.6923840Z | package:pub/src/global_packages.dart 418:9 GlobalPackages.find.<fn>
2025-02-19T15:14:00.6924430Z | dart:_compact_hash _LinkedHashMapMixin.forEach
2025-02-19T15:14:00.6924990Z | package:pub/src/global_packages.dart 409:29 GlobalPackages.find
2025-02-19T15:14:00.6925570Z | package:pub/src/command/global_run.dart 76:44 GlobalRunCommand.runProtected
2025-02-19T15:14:00.6926200Z | package:pub/src/command.dart 197:21 PubCommand.run.<fn>
2025-02-19T15:14:00.6926720Z | dart:async new Future.sync
2025-02-19T15:14:00.6927240Z | package:pub/src/utils.dart 138:12 captureErrors.wrappedCallback
2025-02-19T15:14:00.6927780Z | package:stack_trace Chain.capture
2025-02-19T15:14:00.6928290Z | package:pub/src/utils.dart 155:11 captureErrors
2025-02-19T15:14:00.6928810Z | package:pub/src/command.dart 196:13 PubCommand.run
2025-02-19T15:14:00.6929370Z | package:args/command_runner.dart 212:27 CommandRunner.runCommand
2025-02-19T15:14:00.6929970Z | package:dartdev/dartdev.dart 240:30 DartdevRunner.runCommand
2025-02-19T15:14:00.6930910Z | package:args/command_runner.dart 122:25 CommandRunner.run.<fn>
2025-02-19T15:14:00.6931440Z | dart:async new Future.sync
2025-02-19T15:14:00.6931930Z | package:args/command_runner.dart 122:14 CommandRunner.run
2025-02-19T15:14:00.6932490Z | package:dartdev/dartdev.dart 47:29 runDartdev
2025-02-19T15:14:00.6933020Z | /Volumes/Work/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart 13:11 main
2025-02-19T15:14:00.6933480Z | ===== asynchronous gap ===========================
2025-02-19T15:14:00.6933870Z | dart:async Future.catchError
2025-02-19T15:14:00.6934400Z | package:pub/src/utils.dart 140:10 captureErrors.wrappedCallback
2025-02-19T15:14:00.6934940Z | package:stack_trace Chain.capture
2025-02-19T15:14:00.6935440Z | package:pub/src/utils.dart 155:11 captureErrors
2025-02-19T15:14:00.6935980Z | package:pub/src/command.dart 196:13 PubCommand.run
2025-02-19T15:14:00.6936530Z | package:args/command_runner.dart 212:27 CommandRunner.runCommand
2025-02-19T15:14:00.6937110Z | package:dartdev/dartdev.dart 240:30 DartdevRunner.runCommand
2025-02-19T15:14:00.6937690Z | package:args/command_runner.dart 122:25 CommandRunner.run.<fn>
2025-02-19T15:14:00.6938220Z | dart:async new Future.sync
2025-02-19T15:14:00.6938750Z | package:args/command_runner.dart 122:14 CommandRunner.run
2025-02-19T15:14:00.6939470Z | package:dartdev/dartdev.dart 47:29 runDartdev
2025-02-19T15:14:00.6940000Z | /Volumes/Work/s/w/ir/x/w/sdk/pkg/dartdev/bin/dartdev.dart 13:11 main
2025-02-19T15:14:00.6940430Z ---- End log transcript ----
2025-02-19T15:14:00.6940870Z IO : Writing 14656 characters to text file /Users/runner/.pub-cache/log/pub_log.txt.
2025-02-19T15:14:00.6941390Z MSG : Logs written to /Users/runner/.pub-cache/log/pub_log.txt.
2025-02-19T15:14:00.6941850Z Command PhaseScriptExecution failed with a nonzero exit code
Full log is attached.
The fix is quite easy: Don't use fvm in the pipeline. I tried with 3.27.5 and 3.29.0 and both versions work. However, I don't fully understand why the pipeline fails in the flutterfire step.