The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified.

With the latest XCode release I do reglarly get the following error message when I try to run/debug an App in the simulator:


The request to open "the.bundle.identifier" failed.

The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified.


Just trying again will usually work, though sometimes I do get the error again, so I have to try to launch the App several times before it actually works. This is totally unpredictable. Often I can run the App in the simulator without any problem, but overall I do still get this error far too often to ignore it.


So what does this error mean? "unspecified" is not a very specific message. And how can I fix this?


This issue seems to be related to the simulator only. It never happens when debugging on a real device.

Replies

I am seeing this issue as well. A lot in fact. I almost cannot do my work. I've tried everything everyone said online to try. I also delted Xcode and reinstalled it. I have yet to try wiping my Mac. This only started after Xcode 8.3. Can anyone help?

In my case I have to repeatedly run in the debugger until it works. Sometimes it takes 4 or 5 tries from Xcode to run in the debugger before get a debug session in the simulator.


I tried... with no effect..

  • wiping the DerivedData folder manually from the project. (yours could be here ~//Library/Developer/Xcode/DerivedData)
  • wiping Xcode main cache ~/Library/Caches/com.apple.dt.Xcode
  • Simulator -> Reset Contents and Settings...


macOS suffers the typical unix issues with file system corruption causing all sorts of side effects. Caching being a huge issue accordingly. Never the less, none of this helped.


I have not tried sacrificing a chicken yet, but we will see around dinner time if that works.

Latest version of Xcode (09-Jun) did not change anything and in fact made it worse.


The only relief is to kill the simulator and let the build and run relaunch the simulator... that seems to help keep the re-run count down before I get a debug session.


And oh, by the way, same issue whether it is my project or a bona fide Apple sample project downloaded and untouched before test-launch.

Did you ever get this solved? I am having a very simular problem. The first time I build and run app in a brand new 10.3 simulator I get this error:

Could not attach to pid : “xxxx”


But then every time after I run in simulator I get this error:


The request to open "my.app" failed. The request was denied by service delegate (SBMainWorkspace) for reason: Unspecified.


I am running XCode 8.3.3 and iOS 10.3 simulator.


Thanks for any help.

No solution so far. If this error occurs, I just have to try again for 4-5 times until it works again. Therefore I do directly test on the device and avoid the simulator completely. I only use the simulator when I need test on devices I do not have (like the 12.9" iPad Pro to check if the UI is good on the large screen as well).

Crud, this is a real pain. Using xcode 8.3.3 after also installing Xcode 9 final and now it happens all the time. This is really bad, I uninstalled Xcode 9 and it is still happening.

Please check the simulator device's system log for the underlying reason for the failure.

I'm having the same problem as the thread starter. I'm looking at my System Log (for a Simulator of iPhone 6 iOS 11.1). The last line is:


Oct 16 11:13:58 Waynes-MBP com.apple.CoreSimulator.SimDevice.B19E2292-0B91-4370-8289-CC2C11B91376[37966] (com.apple.videosubscriptionsd[38232]): Service exited with abnormal code: 1


There is also a line above that which seems suspicious:


Oct 16 11:04:27 Waynes-MBP homed[38084]: objc[38084]: Class HMPBEncodeOption is implemented in both /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/Frameworks/HomeKit.framework/HomeKit (0x107f16170) and /Applications/Xcode-beta.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/Library/CoreSimulator/Profiles/Runtimes/iOS.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/HomeKitDaemon.framework/HomeKitDaemon (0x101c516d0). One of the two will be used. Which one is undefined.


There's a lot of other stuff that is suspicious but I can't pretend to understand it. I can supply it as needed, if these two lines are not enough of a clue.


I have an additonal problem that the app will no longer install on my genuine iPhone6 either. At the last seconds of launch, this error pops up in Xcode:

Could not launch “myApp”

My iPhone6 has denied the launch request.

For what it's worth, I can get the Simulator to work if I reset it (Erase All Content and Settings), quit both the Simulator and Xcode, and then relaunch my project and finally run it on the Simulator. That will work for a while but I'm pretty sure it fails again if I make changes to the code and then try to Run it again.


I can't get it to work by running it on my iPhone.

*** WORKAROUND ***


See here:

https://forums.developer.apple.com/message/258839


Very easy and works for me.

Is the issue fixed yet as i am facing the same issue again and again, I tried reinstalling xcode again but it didnt work, if anyone has the solution please update.

I met below errors during running test cases, as in the setUp() I will delete the old app and then launch the app again.
Xcode11.7
Simulator device type: iPhone 11 (13.7)

The request was denied by service delegate (SBMainWorkspace) for reason: NotFound ("Application "com.***.***" is unknown to FrontBoard").


Hello people.
I'm new to iOS development. While learning how apple ecosistem is working and trying to set some debugging flags for my iOS app at one point I tried to set an Environment Variable in PRODUCT>SCHEME>EDIT SCHEME, in Arguments tab.
Even though I just hit the plus button to set the new variable without actually setting one I introduced this bug.
After removing the empty environment variable from the scheme everything started working correctly.
Hope this will help others.


  • I had an empty variable that was checked. I removed the check and the message and error went away. Thanks for the pointer.

Add a Comment
^ I did the same as Aleti while messing around with Environment Variables for pod build targets. This suggestion fixed it for me.

+1 for Aleti's answer clicking the + sign in the environment variables section will add an empty variable even if you hit cancel, deleting that empty variable fixed it for me as well.

Add a Comment