SBMainWorkspace - The request was denied by service delegate

Hello here !

I’m encountering a bug when launching an app on the simulator which is: The request was denied by service delegate (SBMainWorkspace).

I know that there are some topic about this error, but any solution works for me. 
This is what I have already try:

  • Clean Derived data + project
  • Reset simulator
  • Check empty environment variables (for all target + pod)
  • Update Xcode
  • Reinstall Xcode
  • Restart the Mac (multiple time)
  • Check for Mach-O Type build settings is set to executable
  • Try on different simulators (iPhone 15, 15 Pro & 15 Plus)
  • Try on different iOS versions (16, 17 & 17.0.1)
  • Desintegrate + reinstall pod
  • Kill simulators, restart Xcode
  • Clear Xcode cache from storage settings
  • Try on different Xcode versions (15, 15.0.1, 14.3.1)
  • Many of the things mentioned above at the same time

Note that this bug only occurs on one specific project. I can run any other project on simulator normally. The same project run also normally on other Mac.

Here’s my configuration: Xcode 15.0.1 (15A507) MacOS Sonoma 14.0 (23A344)

Here’s the full error log:

Simulator device returned an error for the requested operation.
Domain: FBSOpenApplicationServiceErrorDomain
Code: 1
Failure Reason: The request was denied by service delegate (SBMainWorkspace).
User Info: {
    BSErrorCodeDescription = RequestDenied;
    FBSOpenApplicationRequestID = 0x9ca3;
    IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher;
    SimCallingSelector = "launchApplicationWithID:options:pid:error:";
}
--
The request to open "com.abc.xyz" failed.
Domain: FBSOpenApplicationServiceErrorDomain
Code: 1
Failure Reason: The request was denied by service delegate (SBMainWorkspace).
User Info: {
    BSErrorCodeDescription = RequestDenied;
    FBSOpenApplicationRequestID = 0x9ca3;
}
--
The operation couldn’t be completed. The process failed to launch.
Domain: FBProcessExit
Code: 64
Failure Reason: The process failed to launch.
User Info: {
    BSErrorCodeDescription = "launch-failed";
}
--
The operation couldn’t be completed. Launch failed.
Domain: RBSRequestErrorDomain
Code: 5
Failure Reason: Launch failed.
--
Launchd job spawn failed
Domain: NSPOSIXErrorDomain
Code: 111
--

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "iPhone16,1";
    "device_osBuild" = "17.0.1 (21A342)";
    "device_platform" = "com.apple.platform.iphonesimulator";
    "dvt_coredevice_version" = "348.1";
    "dvt_mobiledevice_version" = "1643.2.4";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = arm64;
    "operation_duration_ms" = 11035;
    "operation_errorCode" = 1;
    "operation_errorDomain" = FBSOpenApplicationServiceErrorDomain;
    "operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.iphonesimulator";
    "param_diag_MainThreadChecker_stopOnIssue" = 0;
    "param_diag_MallocStackLogging_enableDuringAttach" = 0;
    "param_diag_MallocStackLogging_enableForXPC" = 1;
    "param_diag_allowLocationSimulation" = 1;
    "param_diag_checker_tpc_enable" = 1;
    "param_diag_gpu_frameCapture_enable" = 0;
    "param_diag_gpu_shaderValidation_enable" = 0;
    "param_diag_gpu_validation_enable" = 0;
    "param_diag_memoryGraphOnResourceException" = 0;
    "param_diag_queueDebugging_enable" = 1;
    "param_diag_runtimeProfile_generate" = 0;
    "param_diag_sanitizer_asan_enable" = 0;
    "param_diag_sanitizer_tsan_enable" = 0;
    "param_diag_sanitizer_tsan_stopOnIssue" = 0;
    "param_diag_sanitizer_ubsan_stopOnIssue" = 0;
    "param_diag_showNonLocalizedStrings" = 0;
    "param_diag_viewDebugging_enabled" = 1;
    "param_diag_viewDebugging_insertDylibOnLaunch" = 1;
    "param_install_style" = 0;
    "param_launcher_UID" = 2;
    "param_launcher_allowDeviceSensorReplayData" = 0;
    "param_launcher_kind" = 0;
    "param_launcher_style" = 0;
    "param_launcher_substyle" = 0;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_structuredConsoleMode" = 1;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "iphonesimulator17.0";
    "sdk_osVersion" = "17.0";
    "sdk_variant" = iphonesimulator;
}
--

I have a different error when running on iOS 16:

Application launch for 'com.abc.xyz' did not return a process handle nor launch error.
Domain: NSPOSIXErrorDomain
Code: 3
Failure Reason: No such process

Thanks in advance !

I am facing a similar issue. My project was working fine. After formatting, my system reinstalled OD and Xcode (from AppStore). Now, while running the app, it starts up and crashes with a similar error. @Leau have you, by any chance, tried downloading an older version of Xcode like v15.0.0 from Apple Download?

That was me on StackOverflow. Glad that it worked :)

Oh my holy god. I've sent so much time on this trying to figure out why the app won't run on a simulator ios 17.0.1 on the new machine I bought. It needed Rosetta 2 in order for the app to run. I don't see anywhere Apple mentions about this, and all I see is if Rosetta is needed, macOS will auto install it. Nope, didn't happen. I definitely feel like xcode is getting worse over time. Now onto why SwiftUI's preview won't work on the latest xcode.

I try installed Rosetta 2 and it work for me. Thank you

I face the same issue now. Could you share what you did to resolve this?

I even tried installing the rosetta, but yet not working. I am running in Xcode 15.4.

SBMainWorkspace - The request was denied by service delegate
 
 
Q