Skip to content

Commit f98b683

Browse files
HyunwookYooclaude
andcommitted
ci: verbose iOS integration test attempts to locate the simulator hang
First attempts on this task's code failed 3 of 3 (627500e, both job attempts, and 0ddbca9); on the earlier code (b98d1c7, eb9b3f4) they passed 5 of 5. All of them used the same runner image (macos-26-arm64 20260907.0351.1, Hosted Compute Agent 20260828.587) and the same iPhone 17 simulator, so a runner-pool cause is unlikely. In a hang Runner logs "The Dart VM service is listening", but we do not know whether flutter test misses that line (flutter/flutter#181771) or gets the URL, connects, and then waits for the integration-test isolate, which would mean the app's Dart entrypoint is not running. In 0ddbca9 attempt 2 "Connection closed before test suite loaded" means the tool connected once and the app then died. Temporary, to see where the tool waits (no app code changes): - flutter test -v in all three attempts; - attempts 2 and 3 print the leftover flutter_tools, log stream and Runner.app processes before simctl terminate; - Simulator diagnostics also runs when a later attempt passes, and its predicate is ENDSWITH "/Runner", so BackgroundShortcutRunner no longer pushes the real lines out of tail -300. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01G3n8VQCkYmLnMTjmfu5PUV
1 parent 0ddbca9 commit f98b683

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,13 @@ jobs:
255255
# flutter test sometimes misses the VM service line in the simulator log and then waits
256256
# forever after "Xcode build done" (flutter/flutter#181771, fix proposed in #193142). The
257257
# timeouts end that hang and the next steps try up to two more times. Drop them once Flutter
258-
# has the fix.
258+
# has the fix. -v is temporary, to see where a hang waits; remove it with the fix.
259259
- name: Integration tests on the simulator
260260
id: tests
261261
working-directory: app
262262
timeout-minutes: 15
263263
continue-on-error: true
264-
run: flutter test integration_test/core_test.dart -d "${{ steps.sim.outputs.udid }}"
264+
run: flutter test -v integration_test/core_test.dart -d "${{ steps.sim.outputs.udid }}"
265265
- name: Integration tests on the simulator, second attempt
266266
id: tests2
267267
if: steps.tests.outcome != 'success'
@@ -270,16 +270,18 @@ jobs:
270270
continue-on-error: true
271271
run: |
272272
echo "::warning::The first test attempt failed or hung; trying once more (flutter/flutter#181771)."
273+
ps -axo pid,ppid,etime,command | grep -E '[f]lutter_tools|[l]og stream|[R]unner.app' || true
273274
xcrun simctl terminate "${{ steps.sim.outputs.udid }}" dev.chatproject.chatapp || true
274-
flutter test integration_test/core_test.dart -d "${{ steps.sim.outputs.udid }}"
275+
flutter test -v integration_test/core_test.dart -d "${{ steps.sim.outputs.udid }}"
275276
- name: Integration tests on the simulator, third attempt
276277
if: steps.tests.outcome != 'success' && steps.tests2.outcome != 'success'
277278
working-directory: app
278279
timeout-minutes: 8
279280
run: |
280281
echo "::warning::The second test attempt also failed or hung; trying a last time (flutter/flutter#181771)."
282+
ps -axo pid,ppid,etime,command | grep -E '[f]lutter_tools|[l]og stream|[R]unner.app' || true
281283
xcrun simctl terminate "${{ steps.sim.outputs.udid }}" dev.chatproject.chatapp || true
282-
flutter test integration_test/core_test.dart -d "${{ steps.sim.outputs.udid }}"
284+
flutter test -v integration_test/core_test.dart -d "${{ steps.sim.outputs.udid }}"
283285
- name: The extension is embedded in the test build
284286
run: |
285287
appex="$(find app/build/ios/iphonesimulator -maxdepth 3 -name NotificationService.appex -print -quit)"
@@ -289,7 +291,7 @@ jobs:
289291
# For the log: the extension must link system libraries only, not the Pods frameworks (chat_ffi).
290292
find "$appex" -type f \( -name NotificationService -o -name '*.dylib' \) -exec otool -L {} \;
291293
- name: Simulator diagnostics
292-
if: failure()
294+
if: failure() || steps.tests.outcome == 'failure' || steps.tests2.outcome == 'failure'
293295
timeout-minutes: 5
294296
env:
295297
UDID: ${{ steps.sim.outputs.udid }}
@@ -298,7 +300,7 @@ jobs:
298300
set +e
299301
t() { perl -e 'alarm shift; exec @ARGV' "$@"; }
300302
echo "::group::Runner log inside the simulator (last 40 minutes)"
301-
t 90 xcrun simctl spawn "$UDID" log show --last 40m --style compact --predicate 'processImagePath ENDSWITH "Runner"' | tail -300
303+
t 90 xcrun simctl spawn "$UDID" log show --last 40m --style compact --predicate 'processImagePath ENDSWITH "/Runner"' | tail -300
302304
echo "::endgroup::"
303305
echo "::group::Crash reports"
304306
ls -lt ~/Library/Logs/DiagnosticReports | head -10

0 commit comments

Comments
 (0)