Xcode 11 crashes when opening the project

I downloaded new XCode 11 today and when I am trying to open my project, XCode will always crash. Does anyone else experience this problem ? I have provided part of crash log. It's IDE related problem, but I would be really glad, someone has a solution to this.


Crashed Thread: 25 Dispatch queue: ConcurrentQueue: -[IDEProvisioningMechanic _executeNextRepairIfNeeded]_block_invoke
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
ProductBuildVersion: 11A420a
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/IDEFrameworks/IDEFrameworks-14936/IDEFoundation/Provisioning/Mechanic/IDEProvisioningRepairStepGenerator.m:252
Details: Didn't find a single primary certificate type from {(
)}
Object: <IDEProvisioningRepairStepGenerator_Automatic: 0x7fdc55061ef0>
Method: -_evaluateCertificatesWithSession:context:repairable:steps:userAction:error:
Thread: <NSThread: 0x7fdc44944ca0>{number = 20, name = (null)}
Hints:
Backtrace:
0 -[IDEAssertionHandler handleFailureInMethod:object:fileName:lineNumber:assertionSignature:messageFormat:arguments:] (in IDEKit)
1 _DVTAssertionHandler (in DVTFoundation)
2 _DVTAssertionFailureHandler (in DVTFoundation)
3 -[IDEProvisioningRepairStepGenerator_Automatic _evaluateCertificatesWithSession:context:repairable:steps:userAction:error:] (in IDEFoundation)
4 -[IDEProvisioningRepairStepGenerator_Automatic stepsWithSession:context:userAction:error:] (in IDEFoundation)
5 -[IDEProvisioningRepair execute] (in IDEFoundation)
6 __53-[IDEProvisioningMechanic _executeNextRepairIfNeeded]_block_invoke_2 (in IDEFoundation)
7 __DVT_CALLING_CLIENT_BLOCK__ (in DVTFoundation)
8 __DVTDispatchAsync_block_invoke (in DVTFoundation)
9 _dispatch_call_block_and_release (in libdispatch.dylib)
10 _dispatch_client_callout (in libdispatch.dylib)
11 _dispatch_continuation_pop (in libdispatch.dylib)
12 _dispatch_async_redirect_invoke (in libdispatch.dylib)
13 _dispatch_root_queue_drain (in libdispatch.dylib)
14 _dispatch_worker_thread2 (in libdispatch.dylib)
15 _pthread_wqthread (in libsystem_pthread.dylib)
16 start_wqthread (in libsystem_pthread.dylib)


I have deleted caches in library, derivated data, even disabled automati signing, but none of these work, also /Library/Caches/com.apple.xbs does not exist.
I have asked this question on SO - https://stackoverflow.com/questions/58052418/xcode-11-crashes-when-opening-the-project

Did you try to restart the Mac ?


It seems there is a certificate issue. Should check in this area.


That may be related to new certificates in XCode11

Signing and Distribution


New Features

  • Signing and capabilities settings are now combined within a new Signing & Capabilities tab in the Project Editor. The new tab enables using different app capabilities across multiple build configurations. The new capabilities library makes it possible to search for available capabilities. (35254597)
  • Xcode 11 supports the new Apple Development and Apple Distribution certificate types. These certificates support building, running, and distributing apps on any Apple platform. Preexisting iOS and macOS development and distribution certificates continue to work, however, new certificates you create in Xcode 11 use the new types. Previous versions of Xcode don’t support these certificates. (45527608)


Could also read this:

h ttps://github.com/apollographql/apollo-ios/issues/568

Quoting the Xcode 11.1 GM (9.24.19) Seed release notes:


"Fixed a crash that sometimes occurred when compiling XIB files in iOS projects that backwards deploy to iOS versions earlier than 13.0."

I have the same problem with XCODE 11.1 and XCODE 11.2. It works to open some of the projects but not all of them. Did you find a fix?

Same problem for me. Xcode 11.2.1 (on Catalina latest GA build) crashes immediately after opening a project, or trying to create a new project. Crashes occur only on my iMac, and not (for some weird reason) on my MacBook (which has the identical versions of Catalina and Xcode). Tried uninstalling completely, rebooting, disabling all Xcode extensions, etc. etc. to no avail.


(Truncated) Crash log is below (showing details of thread 10, which is the culprit here):


Process: Xcode [72506]

Path: /Applications/Xcode.app/Contents/MacOS/Xcode

Identifier: com.apple.dt.Xcode

Version: 11.2.1 (15526.1)

Build Info: IDEFrameworks-15526001000000000~2 (11B53)

Code Type: X86-64 (Native)

Parent Process: ??? [1]

Responsible: Xcode [72506]

User ID: 501



Date/Time: 2019-11-07 16:43:20.141 -0500

OS Version: Mac OS X 10.15.1 (19B88)

Report Version: 12

Anonymous UUID: 6A75EC4C-D487-36D3-BA06-BC76DC164C9B





Time Awake Since Boot: 81000 seconds



System Integrity Protection: enabled



Crashed Thread: 10 Dispatch queue: com.apple.root.user-interactive-qos



Exception Type: EXC_BAD_ACCESS (SIGBUS)

Exception Codes: KERN_MEMORY_ERROR at 0x0000000127eba000

Exception Note: EXC_CORPSE_NOTIFY



Termination Signal: Bus error: 10

Termination Reason: Namespace SIGNAL, Code 0xa

Terminating Process: exc handler [72506]



VM Regions Near 0x127eba000:

mapped file 0000000127eb8000-0000000127eba000 [ 8K] r--/rw- SM=COW

--> mapped file 0000000127eba000-0000000127ebd000 [ 12K] r--/rw- SM=COW

mapped file 0000000127ebd000-0000000127ec0000 [ 12K] r--/rw- SM=COW



Application Specific Information:

Sending goNextOrFinish: to IDEAssistantWindowController from <NSButton: 0x7fc42b177f20>

ProductBuildVersion: 11B53

Performing @selector(goNextOrFinish:) from sender NSButton 0x7fc42b177f20


Thread 10 Crashed:: Dispatch queue: com.apple.root.user-interactive-qos

0 libsystem_platform.dylib 0x00007fff734b2da9 _platform_memmove$VARIANT$Haswell + 169

1 libcrypto.35.dylib 0x00007fff70932269 mem_read + 85

2 libcrypto.35.dylib 0x00007fff7092ea52 BIO_read + 100

3 libcrypto.35.dylib 0x00007fff70915335 asn1_d2i_read_bio + 162

4 libcrypto.35.dylib 0x00007fff709156a3 ASN1_item_d2i_bio + 55

5 com.apple.mobiledevice 0x00007fff61ffefc5 MISCryptoVerifyCMSSignature + 90

6 com.apple.mobiledevice 0x00007fff61fff0a7 MISCryptoCopyAttachedDataFromCMSSignature + 25

7 com.apple.mobiledevice 0x00007fff61ffc92c _MISProfileLoadPayload + 61

8 com.apple.mobiledevice 0x00007fff61ffcf06 MISProfileGetValue + 18

9 com.apple.dt.IDE.IDEiOSSupportCore 0x000000011e98ed6a -[IDEEmbeddedProvisioningProfile initWithProfileRef:error:] + 54

10 com.apple.dt.IDE.IDEiOSSupportCore 0x000000011e961861 -[IDEEmbeddedProvisioningProfileProvider provisioningProfileFromData:error:] + 121

11 com.apple.dt.IDE.IDEiOSSupportCore 0x000000011e961ad1 -[IDEEmbeddedProvisioningProfileProvider provisioningProfileFromFilePath:error:] + 199

12 com.apple.dt.DVTFoundation 0x0000000105df7d7d -[DVTProvisioningProfileSource _profileWithPath:error:] + 179

13 com.apple.dt.DVTFoundation 0x0000000105df7804 __55-[DVTProvisioningProfileSource _profilesFromFilePaths:]_block_invoke + 86

14 com.apple.dt.DVTFoundation 0x0000000105e871cf __DVTDispatchApply_block_invoke_3 + 18

15 com.apple.dt.DVTFoundation 0x0000000105e843ba __DVT_CALLING_CLIENT_BLOCK__ + 7

16 com.apple.dt.DVTFoundation 0x0000000105e86c73 __DVTDispatchApply_block_invoke + 179

17 libdispatch.dylib 0x00007fff73264543 _dispatch_client_callout2 + 8

18 libdispatch.dylib 0x00007fff73274ee2 _dispatch_apply_invoke_and_wait + 157

19 libdispatch.dylib 0x00007fff73274a35 dispatch_apply_f + 761

20 com.apple.dt.DVTFoundation 0x0000000105e86b8a DVTDispatchApply + 166

21 com.apple.dt.DVTFoundation 0x0000000105df7739 -[DVTProvisioningProfileSource _profilesFromFilePaths:] + 371

22 com.apple.dt.DVTFoundation 0x0000000105df7b51 -[DVTProvisioningProfileSource _profilesFromSearchPath:] + 370

23 com.apple.dt.DVTFoundation 0x0000000105df72f3 __58-[DVTProvisioningProfileSource _fetchProvisioningProfiles]_block_invoke + 286

24 libdispatch.dylib 0x00007fff7326450e _dispatch_client_callout + 8

25 libdispatch.dylib 0x00007fff73270567 _dispatch_lane_barrier_sync_invoke_and_complete + 60

26 com.apple.dt.DVTFoundation 0x0000000105e86650 DVTDispatchBarrierSync + 208

27 com.apple.dt.DVTFoundation 0x0000000105e5da78 -[DVTDispatchLock performLockedBlock:] + 64

28 com.apple.dt.DVTFoundation 0x0000000105df707c -[DVTProvisioningProfileSource _fetchProvisioningProfiles] + 166

29 com.apple.dt.DVTFoundation 0x0000000105df68bb __55-[DVTProvisioningProfileSource allProvisioningProfiles]_block_invoke + 26

30 com.apple.dt.DVTFoundation 0x0000000105c71a59 ___DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock_block_invoke_2 + 75

31 libdispatch.dylib 0x00007fff7326450e _dispatch_client_callout + 8

32 libdispatch.dylib 0x00007fff73270a72 _dispatch_sync_invoke_and_complete + 60

33 com.apple.dt.DVTFoundation 0x0000000105c719df ___DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock_block_invoke + 154

34 libdispatch.dylib 0x00007fff7326450e _dispatch_client_callout + 8

35 libdispatch.dylib 0x00007fff73270a72 _dispatch_sync_invoke_and_complete + 60

36 com.apple.dt.DVTFoundation 0x0000000105c71660 _DVTPreventInvalidationForObjectAllowingRecursiveCallsDuringBlock + 382

37 com.apple.dt.DVTFoundation 0x0000000105c71cfb DVTPreventInvalidationDuringBlock + 32

38 com.apple.dt.DVTFoundation 0x0000000105df6825 -[DVTProvisioningProfileSource allProvisioningProfiles] + 133

39 com.apple.dt.DVTFoundation 0x0000000105d018c6 -[DVTProvisioningProfileManager forceProfileLoadingWithCallback:] + 302

40 com.apple.dt.DVTFoundation 0x0000000105d01791 __48-[DVTProvisioningProfileManager initWithSource:]_block_invoke_2 + 49

41 com.apple.dt.DVTFoundation 0x0000000105e843ba __DVT_CALLING_CLIENT_BLOCK__ + 7

42 com.apple.dt.DVTFoundation 0x0000000105e85a92 __DVTDispatchAsync_block_invoke + 809

43 libdispatch.dylib 0x00007fff73263583 _dispatch_call_block_and_release + 12

44 libdispatch.dylib 0x00007fff7326450e _dispatch_client_callout + 8

45 libdispatch.dylib 0x00007fff732666c0 _dispatch_continuation_pop + 414

46 libdispatch.dylib 0x00007fff73265dbe _dispatch_async_redirect_invoke + 703

47 libdispatch.dylib 0x00007fff732727e2 _dispatch_root_queue_drain + 326

48 libdispatch.dylib 0x00007fff73272f22 _dispatch_worker_thread2 + 92

49 libsystem_pthread.dylib 0x00007fff734bd6d5 _pthread_wqthread + 220

50 libsystem_pthread.dylib 0x00007fff734bd57b start_wqthread + 15

I have the exact same issue. Started with Xcode 11.1 and is still in 11.2 and 11.2.1 GM Seed.

I was having the same crash on XCode 11.2.1 . I went on to "Show package contents" of the ".xcworkspace" workspace directory and deleted "xcuserdata" folder. This resolved the crash for me.

I had the same problem several times. Your solution fixes the problem.

Deleting the contents of xcuserdata folder within the workspace folder only works if Xcode actually gets past creating a project / workspace in the first place. In my case, Xcode is crashing immediately each time I try to create a project—that is, never gets as far as creating the workspace and project folder on disk.

I have a similar issue. Since Catalina my main project crashes Xcode on opening.

I created a clean install thumbdrive of Catalina and it reproduces there.

I created a clean install of Mojave and there it runs no problem in the current 11.2.1 version of Xcode.


I've deleted the xcuserdata as above and tried to delete all xcode prefs on the machine.


Odd thing is that I work with another dev and he is on Catalina and does not have the issue. He installed on another machine and there again it did not crash. Really strange. I am stumpted.

"


Tried Xcode 11.3 beta tonight, running on the latest Catalina beta (10.15.2 Developer Beta 2), and Xcode still crashes a split second after clicking the Next button after selecting project type when trying to create a project. Interestingly the stack trace line "0 libsystem_platform.dylib 0x00007fff71f1bda9 _platform_memmove$VARIANT$Haswell + 169" makes it look as though some memmove optimization (?) in Catalina might be at fault here. Just guessing. Anyway, short story is that Xcode is totally useless at this point... sure would like a fix from Apple.


Same symptoms as before:


Process: Xcode [76554]

Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode

Identifier: Xcode

Version: 11.3 (15710)

Build Info: IDEFrameworks-15710000000000000~27 (11C24b)

Code Type: X86-64 (Native)

Parent Process: ??? [1]

Responsible: Xcode [76554]

User ID: 501


Date/Time: 2019-11-13 22:49:09.338 -0500

OS Version: Mac OS X 10.15.2 (19C32e)

Report Version: 12

Anonymous UUID: 6A75EC4C-D487-36D3-BA06-BC76DC164C9B


Time Awake Since Boot: 43000 seconds


System Integrity Protection: enabled


Crashed Thread: 2 Dispatch queue: com.apple.root.user-interactive-qos


Exception Type: EXC_BAD_ACCESS (SIGBUS)

Exception Codes: KERN_MEMORY_ERROR at 0x0000000139e5c000

Exception Note: EXC_CORPSE_NOTIFY


Termination Signal: Bus error: 10

Termination Reason: Namespace SIGNAL, Code 0xa

Terminating Process: exc handler [76554]


VM Regions Near 0x139e5c000:

mapped file 0000000139e5a000-0000000139e5c000 [ 8K] r--/rw- SM=COW

--> mapped file 0000000139e5c000-0000000139e5f000 [ 12K] r--/rw- SM=COW

mapped file 0000000139e5f000-0000000139e62000 [ 12K] r--/rw- SM=COW


Application Specific Information:

Sending goNextOrFinish: to IDEAssistantWindowController from <NSButton: 0x7feb99c8bb00>

ProductBuildVersion: 11C24b

Performing @selector(goNextOrFinish:) from sender NSButton 0x7feb99c8bb00


...


Thread 2 Crashed:: Dispatch queue: com.apple.root.user-interactive-qos

0 libsystem_platform.dylib 0x00007fff71f1bda9 _platform_memmove$VARIANT$Haswell + 169

1 libcrypto.35.dylib 0x00007fff6f396269 mem_read + 85

2 libcrypto.35.dylib 0x00007fff6f392a52 BIO_read + 100

3 libcrypto.35.dylib 0x00007fff6f379335 asn1_d2i_read_bio + 162

4 libcrypto.35.dylib 0x00007fff6f3796a3 ASN1_item_d2i_bio + 55

5 com.apple.mobiledevice 0x0000000124b20ec5 MISCryptoVerifyCMSSignature + 90

6 com.apple.mobiledevice 0x0000000124b20fa7 MISCryptoCopyAttachedDataFromCMSSignature + 25

7 com.apple.mobiledevice 0x0000000124b1e82c _MISProfileLoadPayload + 61

8 com.apple.mobiledevice 0x0000000124b1ee06 MISProfileGetValue + 18

9 com.apple.dt.IDE.IDEiOSSupportCore 0x00000001248fdd6a -[IDEEmbeddedProvisioningProfile initWithProfileRef:error:] + 54

10 com.apple.dt.IDE.IDEiOSSupportCore 0x00000001248d0861 -[IDEEmbeddedProvisioningProfileProvider provisioningProfileFromData:error:] + 121

11 com.apple.dt.IDE.IDEiOSSupportCore 0x00000001248d0ad1 -[IDEEmbeddedProvisioningProfileProvider provisioningProfileFromFilePath:error:] + 199

12 com.apple.dt.DVTFoundation 0x000000010bc1f84d -[DVTProvisioningProfileSource _profileWithPath:error:] + 179

13 com.apple.dt.DVTFoundation 0x000000010bc1f2d4 __55-[DVTProvisioningProfileSource _profilesFromFilePaths:]_block_invoke + 86

14 com.apple.dt.DVTFoundation 0x000000010bcaec8b __DVTDispatchApply_block_invoke_2.61 + 18

15 com.apple.dt.DVTFoundation 0x000000010bcabe8a __DVT_CALLING_CLIENT_BLOCK__ + 7

16 com.apple.dt.DVTFoundation 0x000000010bcaeb07 __DVTDispatchApply_block_invoke + 1143

17 libdispatch.dylib 0x00007fff71ccd543 _dispatch_client_callout2 + 8

18 libdispatch.dylib 0x00007fff71cdd439 _dispatch_apply_invoke + 157

19 libdispatch.dylib 0x00007fff71ccd50e _dispatch_client_callout + 8

20 libdispatch.dylib 0x00007fff71cdb933 _dispatch_root_queue_drain + 663

21 libdispatch.dylib 0x00007fff71cdbf22 _dispatch_worker_thread2 + 92

22 libsystem_pthread.dylib 0x00007fff71f26536 _pthread_wqthread + 220

23 libsystem_pthread.dylib 0x00007fff71f263db start_wqthread + 15

Yep, I deleted xcuserdata from the problematic project and then File > Open > myproject.xcodeproj and my project opened perfectly fine.

Digging further tonight, I'm able to launch Xcode (11.2.1 or 11.3 beta) and have it remain running as long as I don't:


- Attempt to create a new project

- Attempt to open an existing project (deleting xcuserdata makes no difference)

- Attempt to show the Accounts tab in preferences.


The moment I click on Accounts tab in preferences, Xcode will reliably crash. Crash logs (of which I have very many now) all show the same issue (shown below). Seeing the stack trace I wondered if creating new development certs for my Apple Dev ID would help, so I recreated Dev certs for both macOS and iOS and imported into Keychain Access, and deleted the old certs. Firing up Xcode and attempting any of the above 3 items causes a crash.


At this point I'm giving up. Perhaps someone at Apple will see this thread and care to investigate (?).


=======================================================

Process: Xcode [64359]

Path: /Applications/Xcode-beta.app/Contents/MacOS/Xcode

Identifier: Xcode

Version: 11.3 (15710)

Build Info: IDEFrameworks-15710000000000000~27 (11C24b)

Code Type: X86-64 (Native)

Parent Process: ??? [1]

Responsible: Xcode [64359]

User ID: 501


Date/Time: 2019-11-14 18:24:10.554 -0500

OS Version: Mac OS X 10.15.2 (19C39d)

Report Version: 12

Anonymous UUID: 6A75EC4C-D487-36D3-BA06-BC76DC164C9B


Time Awake Since Boot: 68000 seconds


System Integrity Protection: enabled


Crashed Thread: 4 Dispatch queue: com.apple.root.user-interactive-qos


Exception Type: EXC_BAD_ACCESS (SIGBUS)

Exception Codes: KERN_MEMORY_ERROR at 0x0000000135fc6000

Exception Note: EXC_CORPSE_NOTIFY


Termination Signal: Bus error: 10

Termination Reason: Namespace SIGNAL, Code 0xa

Terminating Process: exc handler [64359]


VM Regions Near 0x135fc6000:

mapped file 0000000135fc3000-0000000135fc6000 [ 12K] r--/rw- SM=COW

--> mapped file 0000000135fc6000-0000000135fc9000 [ 12K] r--/rw- SM=COW

mapped file 0000000135fc9000-0000000135fcc000 [ 12K] r--/rw- SM=COW


Application Specific Information:

com.apple.main-thread

ProductBuildVersion: 11C24b


Thread 4 Crashed:: Dispatch queue: com.apple.root.user-interactive-qos

0 libsystem_platform.dylib 0x00007fff657f77e9 _platform_memmove$VARIANT$Haswell + 169

1 libcrypto.35.dylib 0x00007fff62c6e269 mem_read + 85

2 libcrypto.35.dylib 0x00007fff62c6aa52 BIO_read + 100

3 libcrypto.35.dylib 0x00007fff62c51335 asn1_d2i_read_bio + 162

4 libcrypto.35.dylib 0x00007fff62c516a3 ASN1_item_d2i_bio + 55

5 com.apple.mobiledevice 0x0000000121be6ec5 MISCryptoVerifyCMSSignature + 90

6 com.apple.mobiledevice 0x0000000121be6fa7 MISCryptoCopyAttachedDataFromCMSSignature + 25

7 com.apple.mobiledevice 0x0000000121be482c _MISProfileLoadPayload + 61

8 com.apple.mobiledevice 0x0000000121be4e06 MISProfileGetValue + 18

9 com.apple.dt.IDE.IDEiOSSupportCore 0x00000001219c3d6a -[IDEEmbeddedProvisioningProfile initWithProfileRef:error:] + 54

10 com.apple.dt.IDE.IDEiOSSupportCore 0x0000000121996861 -[IDEEmbeddedProvisioningProfileProvider provisioningProfileFromData:error:] + 121

11 com.apple.dt.IDE.IDEiOSSupportCore 0x0000000121996ad1 -[IDEEmbeddedProvisioningProfileProvider provisioningProfileFromFilePath:error:] + 199

12 com.apple.dt.DVTFoundation 0x0000000108d5284d -[DVTProvisioningProfileSource _profileWithPath:error:] + 179

13 com.apple.dt.DVTFoundation 0x0000000108d522d4 __55-[DVTProvisioningProfileSource _profilesFromFilePaths:]_block_invoke + 86

14 com.apple.dt.DVTFoundation 0x0000000108de1c8b __DVTDispatchApply_block_invoke_2.61 + 18

15 com.apple.dt.DVTFoundation 0x0000000108ddee8a __DVT_CALLING_CLIENT_BLOCK__ + 7

16 com.apple.dt.DVTFoundation 0x0000000108de1b07 __DVTDispatchApply_block_invoke + 1143

17 libdispatch.dylib 0x00007fff655a8543 _dispatch_client_callout2 + 8

18 libdispatch.dylib 0x00007fff655b8439 _dispatch_apply_invoke + 157

19 libdispatch.dylib 0x00007fff655a850e _dispatch_client_callout + 8

20 libdispatch.dylib 0x00007fff655b6933 _dispatch_root_queue_drain + 663

21 libdispatch.dylib 0x00007fff655b6f22 _dispatch_worker_thread2 + 92

22 libsystem_pthread.dylib 0x00007fff658026b6 _pthread_wqthread + 220

23 libsystem_pthread.dylib 0x00007fff65801827 start_wqthread + 15

One last note—I notice that AppCode is unable to build, with BuildService seemingly running into the same crash (IDEEmbeddedProvisioningProfile initWithProfileRef:error:).


If there are any Apple engineers reading this, please take a serious look at this thread and provide a fix asap. At this point I can do zero development—well, zero Apple development. Perhaps it's time to learn Kotlin...?

I had the same issue as well and this solved the issue for me! Thanks a lot!

That's really frustrating. This Catalina update and Xcode 11 messed up too much. I'm getting random crashes here and there every hour as well. Anyways if you still wanna give it another try, remove everything related to XCode and Apple account from Keychain as it seems for your case it always fails when fetching your apple account profiles. Keep iCloud sync for keychains off as well.

Xcode 11 crashes when opening the project
 
 
Q