Skip to content

AppLifecycleTests testDismissedFlutterViewControllerNotRespondingToApplicationLifecycle is flaky #69438

@zanderso

Description

@zanderso

https://ci.chromium.org/p/flutter/builders/prod/Mac%20iOS%20Engine/7522

This test crashing then causes subsequent tests to fail as well.

Test Case '-[AppLifecycleTests testDismissedFlutterViewControllerNotRespondingToApplicationLifecycle]' started.
2020-10-30 13:21:40.828158-0700 Scenarios[73208:451238] flutter: Observatory listening on http://127.0.0.1:52667/xuLyvbNko4Y=/
2020-10-30 13:21:40.845987-0700 Scenarios[73208:451215] flutter: driver = {"method":"set_scenario","args":{"name":"poppable_screen"}}
2020-10-30 13:21:40.849788-0700 Scenarios[73208:451215] flutter: Loading scenario poppable_screen
2020-10-30 13:21:40.864886-0700 Scenarios[73208:451215] flutter: flutter/lifecycle = AppLifecycleState.inactive
2020-10-30 13:21:41.096176-0700 Scenarios[73208:451215] flutter: flutter/lifecycle = AppLifecycleState.resumed
/opt/s/w/ir/cache/builder/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosTests/AppLifecycleTests.m:110: error: -[AppLifecycleTests testDismissedFlutterViewControllerNotRespondingToApplicationLifecycle] : Asynchronous wait failed: Exceeded timeout of 5 seconds, with unfulfilled expectations: "Expected state AppLifecycleState.resumed during step showing a FlutterViewController".
Test Case '-[AppLifecycleTests testDismissedFlutterViewControllerNotRespondingToApplicationLifecycle]' failed (5.455 seconds).
Test Case '-[AppLifecycleTests testFlutterViewControllerDetachingSendsApplicationLifecycle]' started.
2020-10-30 13:21:46.214301-0700 Scenarios[73208:451215] flutter: flutter/lifecycle = AppLifecycleState.inactive
2020-10-30 13:21:46.219708-0700 Scenarios[73208:451215] flutter: flutter/lifecycle = AppLifecycleState.paused
2020-10-30 13:21:46.219984-0700 Scenarios[73208:451215] flutter: flutter/system = {"type":"memoryPressure"}
2020-10-30 13:21:46.224857-0700 Scenarios[73208:456234] flutter: driver = {"method":"set_scenario","args":{"name":"poppable_screen"}}
2020-10-30 13:21:46.227998-0700 Scenarios[73208:456234] flutter: Loading scenario poppable_screen
2020-10-30 13:21:46.240869-0700 Scenarios[73208:456234] flutter: flutter/lifecycle = AppLifecycleState.inactive
2020-10-30 13:21:46.265565-0700 Scenarios[73208:450329] *** Assertion failure in -[XCTestCase(Failures) _enqueueFailureWithDescription:inFile:atLine:expected:interruptTest:breakWhenDequeued:](), /Library/Caches/com.apple.xbs/Sources/XCTest_Sim/XCTest-14806/Sources/XCTestFramework/Core/XCTestCase+Failures.m:66
/opt/s/w/ir/cache/builder/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosTests/AppLifecycleTests.m:90: error: -[AppLifecycleTests testFlutterViewControllerDetachingSendsApplicationLifecycle] : failed: caught "NSInternalInconsistencyException", "Unable to report test assertion failure 'failed - Expected lifecycle AppLifecycleState.resumed but instead received AppLifecycleState.inactive' from /opt/s/w/ir/cache/builder/src/flutter/testing/scenario_app/ios/Scenarios/ScenariosTests/AppLifecycleTests.m:91 because it was raised inside test case -[AppLifecycleTests testDismissedFlutterViewControllerNotRespondingToApplicationLifecycle] which has no associated XCTestRun object. This may happen when test cases are constructed and invoked independently of standard XCTest infrastructure, or when the test has already finished."
(
	0   CoreFoundation                      0x00000001067d6bde __exceptionPreprocess + 350
	1   libobjc.A.dylib                     0x0000000106644b20 objc_exception_throw + 48
	2   CoreFoundation                      0x00000001067d6958 +[NSException raise:format:arguments:] + 88
	3   Foundation                          0x000000010606e7be -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] + 166
	4   XCTest                              0x000000012222553b -[XCTestCase(Failures) _enqueueFailureWithDescription:inFile:atLine:expected:interruptTest:breakWhenDequeued:] + 1864
	5   XCTest                              0x00000001221d95e7 _XCTFailureHandler + 531
	6   ScenariosTests                      0x00000001237be0c6 __90-[AppLifecycleTests testDismissedFlutterViewControllerNotRespondingToApplicationLifecycle]_block_invoke.65 + 774
	7   Flutter                             0x000000010459c51d __48-[FlutterBasicMessageChannel setMessageHandler:]_block_invoke + 110
	8   Flutter                             0x0000000103d9405c _ZNK7flutter21PlatformMessageRouter21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 166
	9   Flutter                             0x0000000103d99722 _ZN7flutter15PlatformViewIOS21HandlePlatformMessageEN3fml6RefPtrINS_15PlatformMessageEEE + 38
	10  Flutter                             0x0000000104114653 _ZNSt3__110__function6__funcIZN7flutter5Shell29OnEngineHandlePlatformMessageEN3fml6RefPtrINS2_15PlatformMessageEEEE4$_34NS_9allocatorIS8_EEFvvEEclEv + 83
	11  Flutter                             0x0000000103da311a _ZN3fml15MessageLoopImpl10FlushTasksENS_9FlushTypeE + 160
	12  Flutter                             0x0000000103da7f26 _ZN3fml17MessageLoopDarwin11OnTimerFireEP16__CFRunLoopTimerPS0_ + 26
	13  CoreFoundation                      0x000000010673a1e4 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 20
	14  CoreFoundation                      0x0000000106739ed2 __CFRunLoopDoTimer + 1026
	15  CoreFoundation                      0x000000010673952a __CFRunLoopDoTimers + 266
	16  CoreFoundation                      0x000000010673429e __CFRunLoopRun + 2238
	17  CoreFoundation                      0x00000001067336b6 CFRunLoopRunSpecific + 438
	18  XCTest                              0x00000001222209f9 -[XCTWaiter waitForExpectations:timeout:enforceOrder:] + 989
	19  XCTest                              0x00000001221b784b -[XCTestCase(AsynchronousTesting) waitForExpectationsWithTimeout:handler:] + 429
	20  ScenariosTests                      0x00000001237bf80d -[AppLifecycleTests testFlutterViewControllerDetachingSendsApplicationLifecycle] + 1069
	21  CoreFoundation                      0x00000001067dd95c __invoking___ + 140
	22  CoreFoundation                      0x00000001067dad8f -[NSInvocation invoke] + 287
	23  XCTest                              0x00000001221cc121 __24-[XCTestCase invokeTest]_block_invoke.208 + 78
	24  XCTest                              0x00000001222261e2 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57
	25  XCTest                              0x0000000122226100 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96
	26  XCTest                              0x00000001221cbc0a __24-[XCTestCase invokeTest]_block_invoke + 1153
	27  XCTest                              0x00000001221cb6e2 -[XCTestCase testContextPerformInScope:] + 211
	28  XCTest                              0x00000001221cb77c -[XCTestCase invokeTest] + 137
	29  XCTest                              0x00000001221cd4ed __26-[XCTestCase performTest:]_block_invoke_2 + 43
	30  XCTest                              0x00000001222261e2 -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] + 57
	31  XCTest                              0x0000000122226100 -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] + 96
	32  XCTest                              0x00000001221cd404 __26-[XCTestCase performTest:]_block_invoke.334 + 88
	33  XCTest                              0x0000000122239492 +[XCTContext runInContextForTestCase:block:] + 219
	34  XCTest                              0x00000001221ccb73 -[XCTestCase performTest:] + 668
	35  XCTest                              0x0000000122212077 -[XCTest runTest] + 57
	36  XCTest                              0x00000001221c714a __27-[XCTestSuite performTest:]_block_invoke + 365
	37  XCTest                              0x00000001221c6874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
	38  XCTest                              0x00000001221c6b71 -[XCTestSuite performTest:] + 355
	39  XCTest                              0x0000000122212077 -[XCTest runTest] + 57
	40  XCTest                              0x00000001221c714a __27-[XCTestSuite performTest:]_block_invoke + 365
	41  XCTest                              0x00000001221c6874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
	42  XCTest                              0x00000001221c6b71 -[XCTestSuite performTest:] + 355
	43  XCTest                              0x0000000122212077 -[XCTest runTest] + 57
	44  XCTest                              0x00000001221c714a __27-[XCTestSuite performTest:]_block_invoke + 365
	45  XCTest                              0x00000001221c6874 -[XCTestSuite _performProtectedSectionForTest:testSection:] + 54
	46  XCTest                              0x00000001221c6b71 -[XCTestSuite performTest:] + 355
	47  XCTest                              0x0000000122212077 -[XCTest runTest] + 57
	48  XCTest                              0x000000012224843e __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke + 171
	49  XCTest                              0x0000000122248541 __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.84 + 118
	50  XCTest                              0x00000001221e0e83 -[XCTestObservationCenter _observeTestExecutionForBlock:] + 588
	51  XCTest                              0x00000001222481fd -[XCTTestRunSession runTestsAndReturnError:] + 623
	52  XCTest                              0x00000001221aa6d7 -[XCTestDriver runTestsAndReturnError:] + 456
	53  XCTest                              0x00000001222356e4 _XCTestMain + 2484
	54  libXCTestBundleInject.dylib         0x0000000103b5abe7 __copy_helper_block_e8_32s + 0
	55  CoreFoundation                      0x00000001067398ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
	56  CoreFoundation                      0x0000000106739058 __CFRunLoopDoBlocks + 312
	57  CoreFoundation                      0x0000000106733ee4 __CFRunLoopRun + 1284
	58  CoreFoundation                      0x00000001067336b6 CFRunLoopRunSpecific + 438
	59  GraphicsServices                    0x0000000109cb8bb0 GSEventRunModal + 65
	60  UIKitCore                           0x00000001102f1a67 UIApplicationMain + 1621
	61  Scenarios                           0x0000000103aa6360 main + 112
	62  libdyld.dylib                       0x000000010714bcf5 start + 1
	63  ???                                 0x0000000000000005 0x0 + 5
)
Test Case '-[AppLifecycleTests testFlutterViewControllerDetachingSendsApplicationLifecycle]' failed (0.141 seconds).

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1High-priority issues at the top of the work listc: disabled testTracks the restoration of a disabled testc: flakeTests that sometimes, but not always, incorrectly passengineflutter/engine related. See also e: labels.platform-iosiOS applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions