xcode crashes with Assertion Failure at launch - xcode

Right in the middle of working in Xcode, when adding a simulator to it, it crashed. When I reopen Xcode, it crashes again but gives opportunity to send error report to apple. In the window I can read:
ASSERTION FAILURE in /Library/Caches/com.apple.xbs/Sources/DVTiOSFrameworks/DVTiOSFrameworks-11515/IDEiOSSupportCore/DVTiPhoneSimulator.m:615
Details: Unexpectedly found two active proxied devices for companion dvtdevice-iphonesimulator:E32D007F-6826-4EE3-BD9A-DB9B8CE1796F: dvtdevice-iphonesimulator:F8874B60-9233-423E-9C9C-2DC3E3A3509D and dvtdevice-iphonesimulator:F8874B60-9233-423E-9C9C-2DC3E3A3509D
I have removed Xcode from my computer and reinstalled it from scratch. But to no avail. There is something hiding in the cache that I should get rid of, but I have no clue what it could be.

Related

Unable to compile dependencies on Xcode 13

The error: "Command CompileSwiftSources failed with a non-zero exit code"
Cause: Simply messing with 2 Xcode installs by installing both Xcode 13 and Xcode 14 beta (with Xcodes)
Consequences: First, Xcode lost connection with SwiftUI Previews device. Then compiling issues occur. All simulators were also gone from the list. The error keeps showing up for each dependency of the project.
Unsuccessful attempts to solve this:
Uninstalling Xcode by moving it to trash, even performing a clean-uninstall with CleanMyMacX
Manually wiping every Xcode-related file possible (browse the internet or perform a find / -path "*Xcode*" 2> /dev/null)
Recreating a brand new project and moving all previous Swift files into it
Removing and re-adding a bunch of times all my dependencies
Solution: Check the answer below.
The solution came from nowhere. I was trying to open Xcodes to check which versions were installed on the Mac when I accidentally pressed enter on the wrong Spotlight result: Xcode Server Builder.
I have no clue what that is, but I assume it's an embedded Xcode component used for compilation. That is, I opened it and it prompted me some Accessibility access request. I fulfilled it because why not, and I tried by curiosity to compile with ⌘+B, and it worked.
About the empty list of simulators, I simply downloaded the latest available iOS 15.4 Simulator, and every device showed up as before.

Xcode 8.0 Simulator broken

Something has gone wrong with my Xcode install... I was running my app and seeing odd behaviour within the app itself, for starters I wasn't able to run the build in the simulator.. it'd install and never launch, eventually putting up a dialogue box about being unable to bless the connection to the simulator. I'd had this problem a few days before but it eventually went away, googling just revealed people having issues with the beta builds or beta MacOSX.
Eventually today I rebooted my Mac and having done so, launching Xcode gave me some other error about the simulator, which I didn't properly take notice of. Since then my project no longer lists any simulators to deploy with, if i try to add new simulators the button to add the simulator does nothing and I have to cancel the dialogue box. If I try and run the simulator or watch simulator directly it just beach balls indefinitely and i have to force kill it.
I've created a new user account and within that made a new Xcode project, which also has no simulators.
I've got a zipped backup of my Xcode from before this problem occurred which I've extracted and swapped in place and it makes no difference.
I guess I could do with redownloading the app off the AppStore in hope that the installer would do something to fix this problem.
Anyone got any thoughts on other things I can try?!
Cheers
What is most likely to be the case is that your XCode installation is corrupt. The best thing to do is to delete Xcode entirely and also these directories and files:
~/Library/Caches/com.apple.dt.*
~/Library/Caches/xctest
~/Library/Containers/com.apple.dt.*
~/Library/Developer
~/Library/MobileDevice
~/Library/Preferences/com.apple.dt.*
~/Library/SavedState/com.apple.dt.*
Then reboot your system and reinstall Xcode. Hopefully that should have cleared out the issue.

Xcode 7.3 wont attach to simulator to debug

So I upgraded to Xcode 7.3.1 and now my Xcode will build, and deploy my apps (yes every app, even a brand new blank one) to the simulator but the app never launches on the simulator and the debugger never attaches, Xcode just hangs and has to be force quit. I've completely wiped out Xcode and all simulators and re-installed to no avail. I've scoured Stack Overflow and Google trying every piece of advice and still no luck. Anyone anywhere have any idea how to solve this issue? If I downgrade to 7.2.1 I'm able to debug in the simulator just fine.
Let me know if you need more information.
My Apps run just fine on the simulator, and if I try to attach the debugger to a running app it wont and Xcode hangs in the attempt, when attempting to attach this way at least Xcode doesn't have to be force quit.
FYI, I can debug on a device this is only a simulator issue.
I had this same issue, and tried fixing my projects and reinstalled Xcode twice before I was able to get Simulator to crash and give me an error report that called out Cylance. Luckily I have access to administer our Cylance portal, so I was able to work through the issue to narrow down the problem.
Symptoms:
When running an app from Xcode, the Simulator launches but the application does not launch within the Simulator
Trying to stop the application from within Xcode does not work, and generates no messages
Trying to re-run the application from within Xcode generates the following message: ‘An instance of “APPLICATION NAME” is already running. Choose “Stop” to terminate and launch a new instance.’ But pressing Stop does nothing.
Xcode will not quit, and eventually the user must Force Quit to exit Xcode
Within the OS X console, the following messages are displayed:
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] main process is a platform binary, but mapped executable file is not: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
6/3/16 7:35:38.000 PM kernel[0]: AMFI: com.apple.dt.ins(pid 2239) - [deny-mmap] mapped file has team identifier XXXX: /Library/Application Support/Cylance/Desktop/CyMemDef.dylib
Resolution:
The problem is caused by Memory Protection being turned on within the policy assigned to the Mac within the Cylance portal.
To resolve the issue, place the Mac into a zone/policy that does not have Memory Protection turned on. Auto Quarantine and Protection Settings can be left on.
During my testing, I was not able to come up with a list of exclusions that allowed me to leave Memory Protection on, so I ended up disabling it completely.

XcodeServer only one simulated device may be used at a time error

I setup a bot to build the project then test on all the simulators. This has been working, but today the integration had 28 errors. Each said the same thing (but for each simulator device name):
Xcode cannot launch apps on the simulated device “Resizable iPad”, as
it is currently running an app on “iPhone 5s”. Only one simulated
device may be used at a time...
After manually running the bot I received no warnings. What could cause this? (I enjoy the success streak)
I only had one project running and had the same issue. Control Quit out of xcode and start it back up.
I had this same problem. I had multiple projects open and a different one still had
'Running appName on deviceName' displayed
Currently open projects can be accessed from the Window section on the toolbar on top. Pressing the Stop button (or the command from the Product Menu) on any projects that were still 'running' freed that particular device for other projects.
Alternatively, Rebooting Xcode works as it closes all projects.
See: https://stackoverflow.com/a/22267017/5172836
I encountered the same error today with the simulator.
The only way i've find is to reboot Xcode. After that the error disappeared and the application launch corectely in the simulator.
I don't know how the error has been originally produce, but Xcode is not a reliability model, so...

suddenly getting wait_fences: failed to receive reply: 10004003

I have an Xcode 4.2 project with ios5 targeting 4.3 and am now suddenly getting "wait_fences: failed to receive reply: 10004003" error.
It occurs on the 4.3 Simulator (don't have a 4.3 device). It does NOT occur on 5.0 simulator or device.
App runs as before and when the keyboard appears, all is good. When I tap the keyboard. I get the error. Description is displayed once in the console. Subsequent runs still crash app but error is not written to console! (So I'm assuming subsequent crashes are the same) It's suddenly started occurring and I can't see anywhere the in the code, changes could affect it.
Has anyone else experienced this same issue and or managed to resolve it?
NB: I have already read the other posts regarding this error.
Have now confirmed that it is not the code so my iOS Simulator must have been corrupted some how.

Resources