Stan Sison
Stan Sison

Reputation: 33

Xcode crashes when attempting to validate or distribute to App Store connect

Has anyone else encountered this issue?

Running on Sonoma 14.5 and Xcode 15.4, Xcode will consistently crash when attempting to validate or distribute an archive.

On Organizer ->Select Target -> Press Distribute -> Select Appstore/Tesflight -> Click Distribute/also Click Cancel -> Crash

On Organizer ->Select Target -> Press Validate -> Select Target -> Click Validate -> Crash

Here is a snippet of the Crash Log
Exception Type:        EXC_CRASH (SIGABRT)
Exception Codes:       0x0000000000000000, 0x0000000000000000

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

Application Specific Information:
abort() called


Thread 0 Crashed::  Dispatch queue: com.apple.main-thread
0   libsystem_kernel.dylib              0x7ff80fe0b14a __pthread_kill + 10
1   libsystem_pthread.dylib             0x7ff80fe43ebd pthread_kill + 262
2   libsystem_c.dylib                   0x7ff80fd69a79 abort + 126
3   libswiftCore.dylib                  0x7ff8207eba6c swift::fatalErrorv(unsigned int, char const*, __va_list_tag*) + 124
4   libswiftCore.dylib                  0x7ff8207ebaeb swift::fatalError(unsigned int, char const*, ...) + 123
5   libswiftCore.dylib                  0x7ff8207ebd28 swift::swift_abortRetainUnowned(void const*) + 40
6   libswiftCore.dylib                  0x7ff8207edfee swift_unownedRetainStrong + 110
7   SwiftUI                             0x7ff91dd36978 0x7ff91c918000 + 21096824
8   SwiftUI                             0x7ff91dd36945 0x7ff91c918000 + 21096773
9   AppKit                              0x7ff813a9e679 -[_NSQuickActionAutovalidationScheduler windowDidUpdate:] + 159
10  CoreFoundation                      0x7ff80ff16710 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 137
11  CoreFoundation                      0x7ff80ffa7136 ___CFXRegistrationPost_block_invoke + 88
12  CoreFoundation                      0x7ff80ffa7080 _CFXRegistrationPost + 532
13  CoreFoundation                      0x7ff80fee602b _CFXNotificationPost + 682
14  Foundation                          0x7ff810e7cd0e -[NSNotificationCenter postNotificationName:object:userInfo:] + 82
15  CoreFoundation                      0x7ff80ff4bc40 -[NSArray makeObjectsPerformSelector:] + 245
16  AppKit                              0x7ff813595192 -[NSApplication(NSWindowCache) _updateWindowsUsingCache] + 118
17  AppKit                              0x7ff8135950eb -[NSApplication updateWindows] + 83
18  AppKit                              0x7ff813a5fb51 __38-[NSApplication setWindowsNeedUpdate:]_block_invoke_2 + 51
19  AppKit                              0x7ff813a64f17 ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
20  CoreFoundation                      0x7ff80ff20586 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
21  CoreFoundation                      0x7ff80ff204aa __CFRunLoopDoObservers + 493
22  CoreFoundation                      0x7ff80ff1fa2c __CFRunLoopRun + 850
23  CoreFoundation                      0x7ff80ff1f112 CFRunLoopRunSpecific + 557
24  HIToolbox                           0x7ff81a938a09 RunCurrentEventLoopInMode + 292
25  HIToolbox                           0x7ff81a938646 ReceiveNextEventCommon + 201
26  HIToolbox                           0x7ff81a938561 _BlockUntilNextEventMatchingListInModeWithFilter + 66
27  AppKit                              0x7ff81358fc61 _DPSNextEvent + 880
28  AppKit                              0x7ff813ea3dc0 -[NSApplication(NSEventRouting) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1273
29  DVTKit                                 0x10b7f4914 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 366
30  AppKit                              0x7ff813581075 -[NSApplication run] + 603
31  DVTKit                                 0x10b7f3a0f -[DVTApplication run] + 54
32  AppKit                              0x7ff813554ff3 NSApplicationMain + 816
33  dyld                                0x7ff80fab8366 start + 1942

I’ve tried it with a fresh swift project.

I’ve tried changing the target deployment from 12 -> 15 -> 16 -> Current

I’ve checked that there are no more pending agreements with Apple Developer

I’ve tried refreshing certificate and provisioning profiles.

Unfortunately, the problem prevents me from deploying new builds to TestFlight and even publishing an IPA for export through transporter.

Additionally, I’ve tried downgrading to Xcode 14. While I was able to get it to launch, by changing CFBundleVersion from 21815 to 22265, there were issues with signing in.

Any help would be appreciated.

Upvotes: 2

Views: 363

Answers (3)

Arda
Arda

Reputation: 902

Make sure that the developer account you use in Xcode has an "Apple Distribution Certificate" on your computer by following these steps:

  1. Accept all developer agreements by signing in to your account at https://developer.apple.com first as others have suggested
  2. Start Xcode and select "Settings..." from the Xcode menu
  3. Select the "Accounts" tab
  4. Select the Apple ID you want to use on the left pane (or add it if you don't already have it listed)
  5. Select the Team you want to use for distribution on the right pane (this would usually be your company/business name or your own name I guess if you're not incorporated)
  6. Click the "Manage Certificates..." button
  7. If you don't see an Apple Distribution certificate, click the + button on the bottom left corner, and select Apple Distribution

Doing these steps fixed the crash issue for me and I was finally able to make a new release.

Upvotes: 0

In my case, the problem was related to accepting Apple's terms on the page https://developer.apple.com/account, after accepting I was able to publish normally.

Upvotes: 0

Shafqat ullah Khan
Shafqat ullah Khan

Reputation: 57

Yesterday I also faced this problem, when I tried to validate my app, xcode crashed and when I tried to upload app without validation, it gives the error that "You don't have permissions to perform this action". Then I asked Account Holder to check if there are any agreements pending from their account, when he checked, it was found that license has to be renewed. After license renewal, validation worked as expected.

It is silly that if license is expired, xcode crashes. Rather than crashing, It should show proper message so that it helps developers.

Upvotes: 0

Related Questions