'Unable to boot simulator' - Xcode 8.x and System Integrity

Hello,


I know this problem has been posted a few other times for older Xcode versions, however I can not find a serviceable, long-term solution. Specifically in Xcode 8.0, I attempted to boot the simulator and was given the 'Unable to boot simulator' message. I was also given a message on start up at the original issue saying something like 'could not write to /private/temp' with regards to CoreTelephony. After reading around, I tried a number of fixes including re-install Xcode, stop CoreSimulator service, delete simulators and re-add via terminal and Xcode interface. The only fix I found was to boot into recovery, disable System Integrity, restart and launch simulator, then re-boot into recovery and re-enable System Integrity (using csrutil disable/enable respectively). This helps bring back my simulator use, though will usually stop working requiring me to repeat these steps each time to regain access to my sims for development (have had to perform several times over the last few weeks).


I caught the console messages logged this time for Xcode 8.1 before repeating these steps, though I'm looking for a permanent and correct fix that doesn't require me to boot in recovery each time I modify my simulators from Xcode's device window. Console read this at launch failure:


10/28/16 9:57:12.901 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service com.apple.SystemConfiguration.PPPController: launch_sim_register_endpoint: 0xfffffecc
10/28/16 9:57:12.902 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service com.apple.audio.audiohald: launch_sim_register_endpoint: 0x44e
10/28/16 9:57:12.902 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service com.apple.coreservices.lsuseractivity.simulatorsupport: Failed to lookup com.apple.coreservices.lsuseractivity.simulatorsupport: 0x44e
10/28/16 9:57:12.902 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service com.apple.FSEvents: launch_sim_register_endpoint: 0x44e
10/28/16 9:57:12.902 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service com.apple.SystemConfiguration.configd: launch_sim_register_endpoint: 0x44e
10/28/16 9:57:12.902 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service IndigoHIDRegistrationPort: launch_sim_register_endpoint: 0x44e
10/28/16 9:57:12.903 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service PurpleFBServer: launch_sim_register_endpoint: 0x44e
10/28/16 9:57:12.903 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service PurpleFBTVOutServer: launch_sim_register_endpoint: 0x44e
10/28/16 9:57:12.903 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Could not register service com.apple.CoreSimulator.host.bootstrap_port: launch_sim_register_endpoint: 0x44e
10/28/16 9:57:12.903 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedDescription=Unable to boot the Simulator., NSLocalizedFailureReason=launchd failed to respond.}
10/28/16 9:57:12.905 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedDescription=Unable to boot the Simulator., NSLocalizedFailureReason=launchd failed to respond.}
10/28/16 9:57:12.905 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedDescription=Unable to boot the Simulator., NSLocalizedFailureReason=launchd failed to respond.}
10/28/16 9:57:12.907 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutdown" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutdown}
10/28/16 9:57:12.907 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error looking up host support port: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutdown" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutdown}
10/28/16 9:57:12.907 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state}
10/28/16 9:57:12.908 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutdown" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutdown}
10/28/16 9:57:12.908 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error looking up host support port: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutdown" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutdown}
10/28/16 9:57:12.908 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Invalid device state" UserInfo={NSLocalizedDescription=Invalid device state}
10/28/16 9:57:12.916 AM com.apple.CoreSimulator.CoreSimulatorService[60512]: Error Domain=NSPOSIXErrorDomain Code=60 "Operation timed out" UserInfo={NSLocalizedDescription=Unable to boot the Simulator., NSLocalizedFailureReason=launchd failed to respond.}


Any help and insight would greatly be appreciated.


Specs:

OS X - 10.11.6 (original error was 10.11.5)

Xcode - 8.1 (originally 8.0)

iMac Late 2015 Model

Accepted Reply

This has been discussed in many threads already here.


Options A:
Wait for a soution to be released.


Option B:

Upgrade to macOS Sierra.


Option B:
Remove the restricted bit from /private/tmp yourself by booting into recovery mode and doing:


chflags norestricted /Volumes/.../private/tmp


or a larger hammer:


rm -rf /Volumes/.../private/tmp
mkdir /Volumes/.../private/tmp
chmod 1777 /Volumes/.../private/tmp
chown root:wheel /Volumes/.../private/tmp


If you don't know what those do. Don't do them and just use option A or B.

Replies

Also, after I launched with SI off these are the conolse messages upon launching my simulator

10/28/16 10:27:40.000 AM kernel[0]: Sandbox: launchd(1) System Policy: deny(1) file-write-flags /private/tmp/com.apple.CoreSimulator.SimDevice.F52A82DE-CB47-4D5A-8AB4-0FA7BB78FF53.launchd_sim/syslogso
10/28/16 10:27:40.000 AM kernel[0]: Sandbox: launchd(1) System Policy: deny(1) file-write-unlink /private/tmp/com.apple.CoreSimulator.SimDevice.F52A82DE-CB47-4D5A-8AB4-0FA7BB78FF53.launchd_sim/syslogso
10/28/16 10:27:40.000 AM kernel[0]: Sandbox: launchd(1) System Policy: deny(1) file-write-flags /private/tmp/com.apple.CoreSimulator.SimDevice.F52A82DE-CB47-4D5A-8AB4-0FA7BB78FF53.launchd_sim
10/28/16 10:27:40.000 AM kernel[0]: Sandbox: launchd(1) System Policy: deny(1) file-write-unlink /private/tmp/com.apple.CoreSimulator.SimDevice.F52A82DE-CB47-4D5A-8AB4-0FA7BB78FF53.launchd_sim
10/28/16 10:29:46.000 AM kernel[0]: Sandbox: launchd(1) System Policy: allow(0) file-write-flags /private/tmp/com.apple.CoreSimulator.SimDevice.F52A82DE-CB47-4D5A-8AB4-0FA7BB78FF53.launchd_sim/syslogso
10/28/16 10:29:46.000 AM kernel[0]: Sandbox: launchd(1) System Policy: allow(0) file-write-flags /private/tmp/com.apple.CoreSimulator.SimDevice.F52A82DE-CB47-4D5A-8AB4-0FA7BB78FF53.launchd_sim
10/28/16 10:31:11.251 AM com.apple.CoreSimulator.CoreSimulatorService[513]: com.apple.CoreSimulator.CoreSimulatorService 307.14.2 starting.
10/28/16 10:31:14.545 AM com.apple.CoreSimulator.CoreSimulatorService[513]: Could not register service com.apple.coreservices.lsuseractivity.simulatorsupport: Failed to lookup com.apple.coreservices.lsuseractivity.simulatorsupport: 0x44e
10/28/16 10:31:15.902 AM sandboxd[185]: ([514]) launchd_sim(514) System Policy: allow file-write-create /private/tmp/com.apple.CoreSimulator.SimDevice.244B987F-FAFB-4637-A1A3-7CFDDEF85205.launchd_sim
10/28/16 10:31:15.908 AM sandboxd[185]: ([514]) launchd_sim(514) System Policy: allow file-write-create /private/tmp/com.apple.CoreSimulator.SimDevice.244B987F-FAFB-4637-A1A3-7CFDDEF85205.launchd_sim/syslogso

Did you file a bug?


Any plans to move to 10.12.1?

This has been discussed in many threads already here.


Options A:
Wait for a soution to be released.


Option B:

Upgrade to macOS Sierra.


Option B:
Remove the restricted bit from /private/tmp yourself by booting into recovery mode and doing:


chflags norestricted /Volumes/.../private/tmp


or a larger hammer:


rm -rf /Volumes/.../private/tmp
mkdir /Volumes/.../private/tmp
chmod 1777 /Volumes/.../private/tmp
chown root:wheel /Volumes/.../private/tmp


If you don't know what those do. Don't do them and just use option A or B.

Great thank you, I'll probably go the update route in the coming days since it's been suggested twice. In the mean time I'll mark as correct.


For the record, I can manage permissions via terminal just fine 🙂