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

Replies

Unfortunately none of the above solutions worked in my particular situation. So far the problem seems to be on just one project, XCode would immediately crash when I tried to open the project via any means. The last time it worked was with XCode before version 11.2.1. 11.2.1 has acted really funky trying to open other projects but no absolute XCode death. It looks like Roravec141's project was some sort of certificate error. The crash reports here would show a problem re-opening a tab - the error was in a method called "restoreSelectedTabsByIdentifierFromStateSaving". To fix this I did a show contents on the project.xcodeproj file and then deleted the xcuserdata folder and renamed project.xcworkspace to rrr_project.xcworkspace. Then did an "open" from XCode's file menu and it worked. This created a new xcuserdata folder and a new project.xcworkspace file. Hope this helps someone else that has this same problem.

Just upgraded my iMac to Catalina 10.15.2 beta 4, vainly hoping that, perhaps, macOS was to blame. Alas, though... Xcode 11.2.1 and 11.3 beta still both crash instantly after hitting the Next button while trying to create a new app. Really, really need a fixed Xcode from Apple...

Thanks a lot.
I every time make git clone when found this issue:)
You save my time.

Just updated to macOS 10.15.2 (final release) and Xcode 11.3 (final release), and have the exact same problem. Xcode crashes instantly after clicking the Next button on the first dialog when trying to create a new app, and crashes instantly when trying to open an existing app.


Does anyone know how the **** I go about communicating to Apple that their flagship IDE is seriously broken?


I'm beyond frustrated at this point. Seriously, Apple... :-(

I have the same problem. It doe not open any projects!!! This is the first time I hate this IDE.

Here's what always works for me to fix the open-a-project crashes: Delete the project.xcworkspace file inside the <project name>.xcodeproj bundle.

Happens several times a day for me so I created an Applescript for each project that sits on my Desktop that I can activate to fix this situation.

That did the trick for me! Many thanks! I had been beating my head against this for a while.

Thanks soumik it heldped me now xcode is not crashing after deleting that folder.

This worked with me! Thanks for the help. Someone gues what cause this error?

Thanks! This helped me

Perfect. Thanks a lot! My project was fine when I shutdown and today crashes for the select tab crash. Deleting the workspace worked unfortunately I had already deleted the userdata whicch did not help. Now to recreate the schemes that I had set up. ;(

Thank you! You saved my a lot of time! Works perfectly! (Catalina, Xcode 11.2)

I had the same issue and used git status to check the modified files and found a file that was not expected to be modified:

modified: <PROJECT_NAME>.xcworkspace/xcuserdata/tonyayoub.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

I checked out this file to undo any changes and this resolved my issue:

git checkout <PROJECT_NAME>.xcworkspace/xcuserdata/tonyayoub.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

That's why deleting the whole xcuserdata folder as others suggest also resolves the issue.
To access xcuserdata, right click on xcworkspace(xcodeproj if it is absent) -> show package contents.
What worked for me:
  • delete xcuserdata folder within the xcworkspace package

  • Open (or create & open) another project, this worked for me

  • Clear recents

  • [important] Open *not* the folder but the MyApp.xcodeproj file