bazelbuild / rules_apple

Bazel rules to build apps for Apple platforms.
Apache License 2.0
509 stars 264 forks source link

ios_xctestrun_runner crashing in Xcode 16 RC1 #2528

Closed andre-alves closed 2 weeks ago

andre-alves commented 2 weeks ago

ios_xctestrun_runner is crashing when running UI tests in Xcode 16 RC1

bazel test //test:ios_xctestrun_runner_ui_test

*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot initiate shared session more than once.'
*** First throw call stack:
(
    0   CoreFoundation                      0x00000001804b70ec __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x000000018008ede8 objc_exception_throw + 72
    2   CoreFoundation                      0x00000001804b6ffc -[NSException initWithCoder:] + 0
    3   XCTestCore                          0x00000001033c1240 +[XCTRunnerDaemonSession initiateSharedSessionWithCompletion:] + 88
    4   XCTestCore                          0x00000001033b91d4 __42-[XCTestDriver initWithTestConfiguration:]_block_invoke + 24
    5   XCTestCore                          0x00000001033bae34 __58-[XCTestDriver _prepareIDESessionWithIdentifier:exitCode:]_block_invoke + 148
    6   XCTestCore                          0x00000001033e8f74 +[XCTFuture futureWithTimeout:description:block:] + 180
    7   XCTestCore                          0x00000001033bacf0 -[XCTestDriver _prepareIDESessionWithIdentifier:exitCode:] + 192
    8   XCTestCore                          0x00000001033b931c -[XCTestDriver _prepareTestConfigurationAndIDESession] + 260
    9   XCTestCore                          0x00000001033b91f0 -[XCTestDriver run] + 20
    10  XCTestCore                          0x00000001033bbf90 _XCTestMain + 116
    11  libXCTestBundleInject.dylib         0x000000010243f168 __RunTests_block_invoke_2 + 0
    12  CoreFoundation                      0x00000001803e3d88 __CFMachPortPerform + 172
    13  CoreFoundation                      0x000000018041ba6c __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 56
    14  CoreFoundation                      0x000000018041b034 __CFRunLoopDoSource1 + 496
    15  CoreFoundation                      0x0000000180415628 __CFRunLoopRun + 2188
    16  CoreFoundation                      0x0000000180414960 CFRunLoopRunSpecific + 536
    17  XCTestCore                          0x00000001033ee920 +[XCTWaiter _synchronouslyWaitForTimeInterval:] + 112
    18  XCTestCore                          0x00000001033ef058 -[XCTWaiter _performWait:manager:completionHandler:] + 912
    19  XCTestCore                          0x00000001033ed004 -[XCTWaiter _waitForExpectations:timeout:enforceOrder:synchronously:completionHandler:] + 520
    20  XCTestCore                          0x00000001033ecdac -[XCTWaiter waitForExpectations:timeout:enforceOrder:] + 108
    21  XCTestCore                          0x00000001033e9558 -[XCTFuture _waitForFulfillment] + 780
    22  XCTestCore                          0x00000001033ea884 -[XCTFuture value] + 24
    23  XCTestCore                          0x00000001033b9350 -[XCTestDriver _prepareTestConfigurationAndIDESession] + 312
    24  XCTestCore                          0x00000001033b91f0 -[XCTestDriver run] + 20
    25  XCTestCore                          0x00000001033bbf90 _XCTestMain + 116
    26  XCTRunner                           0x00000001023c1818 -[_XCTRunnerAppDelegate application:didFinishLaunchingWithOptions:] + 0
    27  XCTRunner                           0x00000001023c1624 _XCTRunnerRunTests + 0
    28  CoreFoundation                      0x000000018041b0ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 20
    29  CoreFoundation                      0x000000018041a824 __CFRunLoopDoBlocks + 352
    30  CoreFoundation                      0x00000001804150c8 __CFRunLoopRun + 812
    31  CoreFoundation                      0x0000000180414960 CFRunLoopRunSpecific + 536
    32  GraphicsServices                    0x0000000190183b10 GSEventRunModal + 160
    33  UIKitCore                           0x0000000185aa2b40 -[UIApplication _run] + 796
    34  UIKitCore                           0x0000000185aa6d38 UIApplicationMain + 124
    35  XCTRunner                           0x00000001023c1a88 main + 176
    36  dyld                                0x00000001025b5410 start_sim + 20
    37  ???                                 0x000000010277e0e0 0x0 + 4336378080
    38  ???                                 0xfd6d800000000000 0x0 + 18261392801545584640