Skip to content

flutter test (Integration Tests) on iOS simulator sometimes never starts test execution after build #181771

@nilsreichardt

Description

@nilsreichardt

Steps to reproduce

  1. Run flutter create .
  2. Following instructions from https://docs.flutter.dev/testing/integration-tests
  3. Setup a GitHub Action that runs iOS Flutter integration tests
  4. Run the GitHub Actions 20 or more times.

Expected results

After the Xcode build completes, the integration test should reliably start, connect to the VM service, execute the test cases, and either pass or fail with logs. The process should terminate normally.

Actual results

Intermittently, after "Xcode build done" (XCode build takes around 15 minutes), the flutter test process produces no further output and appears to hang indefinitely. No test logs are printed, and the CI job eventually times out at the GitHub Actions job limit (60 minutes). The same workflow and code succeed in other runs without changes.

Running pod install...                                      2s
Running Xcode build...                                          
Xcode build done.                                           84.2s
Error: The operation was canceled.

This happend 3x out of 40 runs. See

Code sample

This is the repository that followed the "Steps to reproduce": https://github.com/nilsreichardt/integration_test_problem

GitHub Actions workflow (20 runs per commit)
name: integration-tests-app-ci

on:
  push:

permissions: {}

jobs:
  ios-integration-test:
    runs-on: macos-26
    timeout-minutes: 30
    strategy:
        fail-fast: false
        matrix:
            # 20 runs
            parameter1: [1,2,3,4,5,6,7,8,9,10]
            parameter2: [1,2]
    steps:
      - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8

      - name: Set Flutter version from FVM config file to environment variables
        id: fvm-config-action
        uses: kuhnroyal/flutter-fvm-config-action@fcdb62b682dade6f0d9e0c6eae6acc647ca8c31d

      - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e
        with:
          flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
          channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}

      - uses: futureware-tech/simulator-action@6a2cef2c27540a25595e53c969fd85988700d451
        id: simulator
        with:
          wait_for_boot: true
          model: "iPhone 17"
          boot_retries: "3"
          boot_timeout_seconds: "300"

      - name: Run integration tests
        env:
          SIMULATOR_UDID: ${{ steps.simulator.outputs.udid }}
        # We use --ignore-timeouts to avoid the 12 minute timeout during the
        # build. Flutter has a timeout of 12 minutes for the build, but building
        # our iOS app takes longer. Using --ignore-timeouts is the current
        # recommended workaround, see
        # https://github.com/flutter/flutter/issues/105913#issuecomment-2770877374
        run: |
          flutter test integration_test/app_test.dart \
            -d $SIMULATOR_UDID \
            --ignore-timeouts \
            --verbose

Logs

[  +22 ms] executing: /usr/bin/arch -arm64e xcrun simctl launch 39E3AD27-11FF-4669-A561-E9AA11474751 com.example.integrationTestProblem --enable-dart-profiling --disable-vm-service-publication --enable-checked-mode --verify-entry-points
[ +120 ms] executing: /usr/bin/arch -arm64e xcrun simctl spawn 39E3AD27-11FF-4669-A561-E9AA11474751 log stream --style json --predicate eventType = logEvent AND processImagePath ENDSWITH "Runner" AND (senderImagePath ENDSWITH "/Flutter" OR senderImagePath ENDSWITH "/libswiftCore.dylib" OR processImageUUID == senderImageUUID) AND NOT(eventMessage CONTAINS ": could not find icon for representation -> com.apple.") AND NOT(eventMessage BEGINSWITH "assertion failed: ") AND NOT(eventMessage CONTAINS " libxpc.dylib ")
[+21968 ms] com.example.integrationTestProblem: 6285
[   +3 ms] Waiting for VM Service port to be available...
Error: The operation was canceled.

Full logs with --verbose: https://firebasestorage.googleapis.com/v0/b/nilsreichardt.appspot.com/o/exchange%2Fgithub%2Fintegration_test_logs.txt?alt=media&token=cd9fbfef-2488-40d9-893d-c795fcdaca67

Flutter Doctor output

2026-02-03T21:27:46.3451190Z SET ENV 'FLUTTER_VERSION' = 3.38.8
2026-02-03T21:27:46.3484090Z SET ENV 'FLUTTER_CHANNEL' = stable
2026-02-03T21:27:46.3924310Z ##[group]Run subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e
2026-02-03T21:27:46.3924710Z with:
2026-02-03T21:27:46.3924850Z   flutter-version: 3.38.8
2026-02-03T21:27:46.3925020Z   channel: stable
2026-02-03T21:27:46.3925170Z   architecture: ARM64
2026-02-03T21:27:46.3925330Z   cache: false
2026-02-03T21:27:46.3925510Z   pub-cache-path: default
2026-02-03T21:27:46.3925670Z   dry-run: false
2026-02-03T21:27:46.3925930Z   git-source: https://github.com/flutter/flutter.git
2026-02-03T21:27:46.3926160Z env:
2026-02-03T21:27:46.3926280Z   FLUTTER_VERSION: 3.38.8
2026-02-03T21:27:46.3926440Z   FLUTTER_CHANNEL: stable

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Important issues not at the top of the work listgood first issueRelatively approachable for first-time contributorsplatform-iosiOS applications specificallyteam-iosOwned by iOS platform teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-iosTriaged by iOS platform team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions