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 !