Xcode crashes when distributing product for App Store Connect

After building the Product Archive, the Organizer window opens, I click Distribute App. Next. Next. Next. Next. Crash. The crash happens before I'm able to export anything, so I cannot even use the Application Loader. The last message above the indeterminate progress indicator I can read before it crashes is "Packaging MyApp ...".

It would be really nice if an Apple engineer could help sort this out, because I already contacted the App Store Connect support and they told me that the only way I can get help is by writing on this forum, searching the Xcode documentation, or using one of the 2 free TSIs I get each year (which I have already used).

Stacktrace (I tried to paste the whole crash report, but I get an error that the message is too long and that I should click on the icon to attach a file instead, but I don't see such an icon):

Code Block
Process: Xcode [834]
Path: /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier: com.apple.dt.Xcode
Version: 12.2 (17535)
Build Info: IDEFrameworks-17535000000000000~23 (12B45b)
App Item ID: 497799835
App External ID: 838360538
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: Xcode [834]
User ID: 501
Date/Time: 2020-12-07 17:22:11.231 +0100
OS Version: macOS 11.0.1 (20B29)
Report Version: 12
Bridge OS Version: 3.0 (14Y908)
Anonymous UUID: 7A3F67B1-D68A-4230-40B2-B7EE13B51792
Sleep/Wake UUID: 4913FE52-7DB5-45E0-9396-EFBA2ADD0B5C
Time Awake Since Boot: 47000 seconds
Time Since Wake: 5900 seconds
System Integrity Protection: enabled
Crashed Thread: 17 Dispatch queue: ConcurrentQueue: -[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
Possibly stale failure hints from 2020-12-07 16:21:03 +0000:
0: Calling block provided by:
0 DVTDispatchAsync (in DVTFoundation)
1 56-[IDEArchiveProductSource updateArchivesWithCompletion:]_block_invoke_2 (in IDEProducts)
2 DVT_CALLING_CLIENT_BLOCK (in DVTFoundation)
3 DVTDispatchAsync_block_invoke (in DVTFoundation)
4 _dispatch_call_block_and_release (in libdispatch.dylib)
5 _dispatch_client_callout (in libdispatch.dylib)
6 _dispatch_continuation_pop (in libdispatch.dylib)
7 _dispatch_async_redirect_invoke (in libdispatch.dylib)
8 _dispatch_root_queue_drain (in libdispatch.dylib)
9 _dispatch_worker_thread2 (in libdispatch.dylib)
10 _pthread_wqthread (in libsystem_pthread.dylib)
11 start_wqthread (in libsystem_pthread.dylib)
ProductBuildVersion: 12B45b
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-17518/DVTFoundation/FilePaths/DVTFilePath.m:912
Details: url should be an instance inheriting from NSURL, but it is nil
Object: <DVTFilePath>
Method: +filePathForFileURL:
Thread: <NSThread: 0x7fa6c43458e0>{number = 4468, name = (null)}
Open FDs: 115/7168
Hints:
0: Calling block provided by:
0 DVTDispatchAsync (in DVTFoundation)
1 DVTAsyncPerformBlock (in DVTFoundation)
2 -[IDEDistributionPackagingStepViewController viewDidInstall] (in IDEKit)
3 -[DVTViewController _viewDidInstall] (in DVTViewControllerKit)
4 -[_DVTViewController_ViewLifecycleInterpositions viewDidMoveToWindow] (in DVTViewControllerKit)
5 -[NSView _setWindow:] (in AppKit)
6 -[NSView addSubview:] (in AppKit)
7 -[NSView setSubviews:] (in AppKit)
8 -[DVTBorderedView setContentView:] (in DVTUserInterfaceKit)
9 -[IDEDistributionAssistantWindowController setDistributionStepViewController:] (in IDEKit)
10 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKeys:count:maybeOldValuesDict:maybeNewValuesDict:usingBlock:] (in Foundation)
11 -[NSObject(NSKeyValueObservingPrivate) _changeValueForKey:key:key:usingBlock:] (in Foundation)
12 _NSSetObjectValueAndNotify (in Foundation)
13 -[IDEDistributionAssistantWindowController next:] (in IDEKit)
14 79-[IDEDistributionAutomaticSigningAssetsStepViewController _locateSigningAssets]_block_invoke_2 (in IDEKit)
15 DVT_CALLING_CLIENT_BLOCK (in DVTFoundation)
16 _DVTAsyncPerformBlockOnMainRunLoop_block_invoke (in DVTFoundation)
17 CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK (in CoreFoundation)
18 CFRunLoopDoBlocks (in CoreFoundation)
19 CFRunLoopRun (in CoreFoundation)
20 CFRunLoopRunSpecific (in CoreFoundation)
21 RunCurrentEventLoopInMode (in HIToolbox)
22 ReceiveNextEventCommon (in HIToolbox)
23 _BlockUntilNextEventMatchingListInModeWithFilter (in HIToolbox)
24 _DPSNextEvent (in AppKit)
25 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] (in AppKit)
26 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] (in DVTKit)
27 -[NSApplication run] (in AppKit)
28 NSApplicationMain (in AppKit)
29 start (in libdyld.dylib)
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 +[DVTFilePath filePathForFileURL:] (in DVTFoundation)
4 -[IDEDistributionSymbolsStep runWithError:] (in IDEFoundation)
5 -[IDEDistributionProcessingPipeline process:] (in IDEFoundation)
6 -[IDEDistributionPackagingStepViewController _runPipeline] (in IDEKit)
7 60-[IDEDistributionPackagingStepViewController viewDidInstall]_block_invoke_2 (in IDEKit)
8 DVT_CALLING_CLIENT_BLOCK (in DVTFoundation)
9 DVTDispatchAsync_block_invoke (in DVTFoundation)
10 _dispatch_call_block_and_release (in libdispatch.dylib)
11 _dispatch_client_callout (in libdispatch.dylib)
12 _dispatch_continuation_pop (in libdispatch.dylib)
13 _dispatch_async_redirect_invoke (in libdispatch.dylib)
14 _dispatch_root_queue_drain (in libdispatch.dylib)
15 _dispatch_worker_thread2 (in libdispatch.dylib)
16 _pthread_wqthread (in libsystem_pthread.dylib)
17 start_wqthread (in libsystem_pthread.dylib)
abort() called
Application Specific Signatures:
(url) != nil
...

ProductBuildVersion: 12B45b
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-17518/DVTFoundation/FilePaths/DVTFilePath.m:912
Details: url should be an instance inheriting from NSURL, but it is nil

Try an option clean build folder, in case you have a build issue.

Thanks for your help, but cleaning the build folder didn't help. I already recreated the Archive several times, without success.
Same issue here! Quite a ridiculous bug.

The very silly, no-good fix is to uncheck "Upload debug symbols..." when going through the upload flow, but no one really wants to do that!!!
Thanks for sharing this workaround. I hope that we won't have to rely on this for too long.
Had the same issue, try clear ALL your local stored provisions and manually add required again in xcode
Thank you GregVideoVillage. Unchecking "Upload debug symbols..." worked!! I mean it's abad fix, I like getting the crash reports already symbolicated, but at least I can get updates in the App Store for Big Sur. I had downloaded older version of Xcode and actually managed to fix the bug by using Xcode 11 command line tools in a script. But when uploading to the store from within Xcode it ignores the set version and uses the latest. Still present in Xcode 12.3.

In a follow up, I have to restart Xcode between uploads as won't find a file on the second try. The file is always the quicklook generator and spotlight MD Importer. As I think it might be what was giving the original bug. It finds it once, but not twice and hence why the URL was empty and the crash that follows.
"+1", unchecking debug symbols upload helps. Apple, your QA sucks...



Same issue here. I tried reporting it (FB8951560) but it was marked as "unable to diagnose". Perhaps if you tried to report it as well with the info you have, it might help them...
I'm seeing the same problem. I had been using Catalina to do all of my official builds, but for various reasons I wanted to try it with Big Sur this time. I had noticed problems when exporting Developer ID builds. Every other export would fail on my quick look plug in. I guess I have to re-write my quicklook plugins, eh?
4 months and one Xcode version (12.4) later, and still no fix...
Xcode crashes when distributing product for App Store Connect
 
 
Q