Simulator error FBSSystemServiceDomain code 4

IosIos SimulatorXcode6ios8.1

Ios Problem Overview


I'm trying to run an app in the simulator but get this error message:

Unable to run app in Simulator
An error was encountered while running (Domain = FBSSystemServiceDomain, Code = 4)

Screenshot for error

I've not seen any previous references to this from googling around.

Its using XCode 6 Beta, the app is in Swift which links to a Obj-C static library. It runs fine on the device.

Any ideas?

Ios Solutions


Solution 1 - Ios

Go to the iOS Simulator menu and select Reset Content and Settings.

Alternatively, you could quit and reopen the Simulator.

enter image description here

Solution 2 - Ios

It's enough to quit and re-open the Simulator, this has been verified in the Xcode 6.0.1 release.

Solution 3 - Ios

This issue is discussed in the Xcode 6 Release Notes

> Testing on iOS Simulator may produce an error indicating that the > application could not be installed or launched. Re-run testing or > start another integration. (17733855)

And is also discussed in my sticky post in the Apple Developer Forums for iOS Simulator Debugging

> "(Domain = FBSOpenApplicationErrorDomain, Code = 4)", "(Domain NSPOSIXErrorDomain, Code = 3"), > "Domain=IDEUnitTestsOperationsObserverErrorDomain Code=3", "Lost > Connection to ...", "Debugger disconnected", or app getting SIGKILLed > soon after launch Upon installation of an app, SpringBoard will > SIGKILL that app's process in order to force a relaunch of the app > with the new executable. The problem is that there is a race > condition whereby SpringBoard may accidentally SIGKILL a new process > that we just launched rather than the old process. Which of the > various error messages you get depends on exactly when in the launch > process the SIGKILL was delivered. Normally, this shouldn't happen, > so the advise is to just try again (sorry =/). If you find that this > happes to you all the time or more frequently than you can tollerate, > we are incredibly sorry. We are aware that systems with slower disk > I/O will see this happen more frequently than faster systems, so if > you are using an NFS home directory, you may want to create a local > directory for your simulator data and setup a simlink to it from > ~/Library/Developer/CoreSimulator

Note that the original question is about domain FBSSystemServiceDomain whereas my post on devforums mentions FBSOpenApplicationErrorDomain. FBSSystemServiceDomain was used in earlier versions of iOS 8.0 betas.

Solution 4 - Ios

You can either Reset Content and Setting or just close iOS Simulator and relaunch.

Solution 5 - Ios

None of the solutions worked for me including the accepted answer of "Reset Content and Settings".

The only way I was able to get it to work was by downloading a previous iOS simulator version which let me install the app.

Solution 6 - Ios

I suggest you to use stable version of Xcode 6.1.

FBSOpenApplicationErrorDomain, code =4 error suggests it is an error from 
cached data on the simulator.

There are three possible solutions :

  1. Clean simulator. Use (Command + Shift + k) as shortcut key or goto Product -> Clean

  2. Quit simulator and relaunch it.

  3. Open simulator. Select iOS simulator -> Reset contents and settings...

Screenshot for step 3

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionGruntcakesView Question on Stackoverflow
Solution 1 - IosMarieView Answer on Stackoverflow
Solution 2 - IosFrancescoView Answer on Stackoverflow
Solution 3 - IosJeremy Huddleston SequoiaView Answer on Stackoverflow
Solution 4 - Iosuser1824791View Answer on Stackoverflow
Solution 5 - IosSteveView Answer on Stackoverflow
Solution 6 - IosJayprakash DubeyView Answer on Stackoverflow