Xcode crash when recording UI test

I'm trying to use Xcode UI tests for the first time. I added a UI Tests target and set up the signing, then opened the default AppnameUITests.swift file. I added a new function named testAboutPage(), clicked inside the block and clicked the Record UI Test button (red circle) at the bottom of the editor window. If the app is already running when I do this, Xcode crashes immediately. If the app is not running, Xcode builds and runs the app, then crashes.

I've seen reports of this going back years, but none of the posts have a solution. I do have a crash log to share. Does anyone know how to get past this?

This forum won't let me upload the complete crash log because it exceeds the size limit, but here's the first part through the stack trace of the crashed thread:

Process:               Xcode [46652]
Path:                  /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:            com.apple.dt.Xcode
Version:               16.2 (23507)
Build Info:            IDEApplication-23507000000000000~2 (16C5032a)
App Item ID:           497799835
App External ID:       870964517
Code Type:             ARM-64 (Native)
Parent Process:        launchd [1]
User ID:               503

Date/Time:             2025-02-04 12:58:05.5200 -0800
OS Version:            macOS 15.3 (24D60)
Report Version:        12
Anonymous UUID:        144B0B99-8D44-736B-0D9A-1F6FA6DF85F7


Time Awake Since Boot: 48000 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

Termination Reason:    Namespace SIGNAL, Code 6 Abort trap: 6
Terminating Process:   Xcode [46652]

Application Specific Information:
abort() called


Application Specific Signatures:
((result)) != nil

Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib        	       0x18a3b3720 __pthread_kill + 8
1   libsystem_pthread.dylib       	       0x18a3ebf70 pthread_kill + 288
2   libsystem_c.dylib             	       0x18a2f8908 abort + 128
3   IDEKit                        	       0x109e81554 +[IDEAssertionHandler _handleAssertionWithLogString:assertionSignature:assertionReason:extraBacktrace:] + 964
4   IDEKit                        	       0x109e819e4 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] + 876
5   DVTFoundation                 	       0x10600d358 _DVTAssertionHandler + 424
6   DVTFoundation                 	       0x10600d4d8 _DVTAssertionFailureHandler + 196
7   IDEKit                        	       0x10a1f99e4 -[IDEUIRecordingManager _workspaceTabController] + 176
8   IDEKit                        	       0x10a1fa528 __94-[IDEUIRecordingManager _startRecordingWithLaunchSession:alwaysAskForAPIAccess:reservedNames:]_block_invoke_3 + 252
9   DVTFoundation                 	       0x10611fc9c __DVT_CALLING_CLIENT_BLOCK__ + 16
10  DVTFoundation                 	       0x1061206c4 __DVTDispatchAsync_block_invoke + 152
11  libdispatch.dylib             	       0x18a237854 _dispatch_call_block_and_release + 32
12  libdispatch.dylib             	       0x18a2395b4 _dispatch_client_callout + 20
13  libdispatch.dylib             	       0x18a248040 _dispatch_main_queue_drain + 984
14  libdispatch.dylib             	       0x18a247c58 _dispatch_main_queue_callback_4CF + 44
15  CoreFoundation                	       0x18a5139d0 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 16
16  CoreFoundation                	       0x18a4d35bc __CFRunLoopRun + 1996
17  CoreFoundation                	       0x18a4d2734 CFRunLoopRunSpecific + 588
18  HIToolbox                     	       0x195a41530 RunCurrentEventLoopInMode + 292
19  HIToolbox                     	       0x195a47348 ReceiveNextEventCommon + 676
20  HIToolbox                     	       0x195a47508 _BlockUntilNextEventMatchingListInModeWithFilter + 76
21  AppKit                        	       0x18e04a848 _DPSNextEvent + 660
22  AppKit                        	       0x18e9b0c24 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 688
23  AppKit                        	       0x18e03d874 -[NSApplication run] + 480
24  IDEKit                        	       0x109e50f14 -[IDEApplication run] + 192
25  AppKit                        	       0x18e014068 NSApplicationMain + 888
26  dyld                          	       0x18a06c274 start + 2840

I just submitted a bug report to Feedback Assistant, FB16452674. I included the complete crash log and a minimal test project that has the same problem.

But I'd appreciate any available workarounds so I can proceed with using this functionality.

Xcode crash when recording UI test
 
 
Q