flutter_secure_storage icon indicating copy to clipboard operation
flutter_secure_storage copied to clipboard

[macOS] macOS app does not launch after keychain sharing capability was selected

Open Spyspyspy opened this issue 2 years ago • 10 comments

Details

Could not launch “Target” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error. User Info: { DVTErrorCreationDateKey = "2022-10-20 18:51:35 +0000"; DVTRadarComponentKey = 968756; IDERunOperationFailingWorker = IDELaunchServicesLauncher; }

The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed.

Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 153

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "Macmini9,1"; "device_osBuild" = "12.6 (21G115)"; "device_platform" = "com.apple.platform.macosx"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 179; "operation_errorCode" = 20; "operation_errorDomain" = IDELaunchErrorDomain; "operation_errorWorker" = IDELaunchServicesLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 0; "param_destination_platform" = "com.apple.platform.macosx"; "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" = 99; "param_launcher_substyle" = 8192; "param_runnable_appExtensionHostRunMode" = 0; "param_runnable_productType" = "com.apple.product-type.application"; "param_runnable_type" = 2; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "macosx12.3"; "sdk_osVersion" = "12.3"; "sdk_variant" = macos; }

System Information

macOS Version 12.6 (Build 21G115) Xcode 14.0.1 (21336) (Build 14A400) Timestamp: 2022-10-20T21:51:35+03:00

Spyspyspy avatar Oct 20 '22 18:10 Spyspyspy

Same issue here.

Details

Could not launch “project”
Domain: IDELaunchErrorDomain
Code: 20
Recovery Suggestion: The LaunchServices launcher has returned an error. Please check the system logs for the underlying cause of the error.
User Info: {
    DVTErrorCreationDateKey = "2022-11-03 19:30:05 +0000";
    DVTRadarComponentKey = 968756;
    IDERunOperationFailingWorker = IDELaunchServicesLauncher;
}
--
The operation couldn’t be completed. Launch failed.
Domain: RBSRequestErrorDomain
Code: 5
Failure Reason: Launch failed.
--
Launchd job spawn failed
Domain: NSPOSIXErrorDomain
Code: 153
--

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
    "device_model" = "MacBookPro16,1";
    "device_osBuild" = "12.6 (21G115)";
    "device_platform" = "com.apple.platform.macosx";
    "launchSession_schemeCommand" = Run;
    "launchSession_state" = 1;
    "launchSession_targetArch" = "x86_64";
    "operation_duration_ms" = 25;
    "operation_errorCode" = 20;
    "operation_errorDomain" = IDELaunchErrorDomain;
    "operation_errorWorker" = IDELaunchServicesLauncher;
    "operation_name" = IDERunOperationWorkerGroup;
    "param_consoleMode" = 0;
    "param_debugger_attachToExtensions" = 0;
    "param_debugger_attachToXPC" = 1;
    "param_debugger_type" = 3;
    "param_destination_isProxy" = 0;
    "param_destination_platform" = "com.apple.platform.macosx";
    "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" = 99;
    "param_launcher_substyle" = 8192;
    "param_runnable_appExtensionHostRunMode" = 0;
    "param_runnable_productType" = "com.apple.product-type.application";
    "param_runnable_type" = 2;
    "param_testing_launchedForTesting" = 0;
    "param_testing_suppressSimulatorApp" = 0;
    "param_testing_usingCLI" = 0;
    "sdk_canonicalName" = "macosx12.3";
    "sdk_osVersion" = "12.3";
    "sdk_variant" = macos;
}
--


System Information

macOS Version 12.6 (Build 21G115)
Xcode 14.0.1 (21336) (Build 14A400)
Timestamp: 2022-11-03T20:30:05+01:00

suculent avatar Nov 03 '22 19:11 suculent

By the way, this works on MacOS 12.4 with Xcode 13.4.1.

suculent avatar Nov 03 '22 19:11 suculent

Same issue here. After added keychain-access-groups setting, application stop at building with error. If I remove keychain setting, app build again, but doesn't storage keys. macOS Version 12.6 - Xcode 13.1

#0 throwToolExit (package:flutter_tools/src/base/common.dart:10:3) #1 RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:713:9) #2 FlutterCommand.run. (package:flutter_tools/src/runner/flutter_command.dart:1209:27) #3 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #4 CommandRunner.runCommand (package:args/command_runner.dart:209:13) #5 FlutterCommandRunner.runCommand. (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9) #6 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #7 FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5) #8 run.. (package:flutter_tools/runner.dart:62:9) #9 AppContext.run. (package:flutter_tools/src/base/context.dart:150:19) #10 main (package:flutter_tools/executable.dart:91:3)

valientegaston avatar Nov 13 '22 17:11 valientegaston

So, I've built the application with xcode 13.4.1 app launches on local machine, but if i send it to another mac it tells ; "application cannot be opened"

Spyspyspy avatar Dec 19 '22 07:12 Spyspyspy

Just FYI, it works for me without problems, but following needs to be done:

  • Set 'Hardened Runtime'
  • Notarize the app in order for other users to run the app

Then you can distribute a Developer ID signed version. With Keychain Sharing you have to have Notarization which then requires Hardened Runtime

imdatceleste avatar Dec 23 '22 08:12 imdatceleste

Also experiencing this problem. Has there been any progress on this issue?

amazingCoding avatar Apr 14 '23 10:04 amazingCoding

same issue :(

maphongba008 avatar Jul 01 '23 16:07 maphongba008

Here's what I am seeing. Could not launch “MyAppName” Domain: IDELaunchErrorDomain Code: 20 Recovery Suggestion: Runningboard has returned error 5. Please check the system logs for the underlying cause of the error. User Info: { DVTErrorCreationDateKey = "2023-09-27 03:23:51 +0000"; DVTRadarComponentKey = 968756; IDERunOperationFailingWorker = IDELaunchServicesLauncher; } The operation couldn’t be completed. Launch failed. Domain: RBSRequestErrorDomain Code: 5 Failure Reason: Launch failed. Launchd job spawn failed Domain: NSPOSIXErrorDomain Code: 153

CodeSpyder avatar Oct 02 '23 13:10 CodeSpyder

I am having this issue also and none of the above fixes have worked. Any other suggestions?

willm132 avatar Oct 09 '23 22:10 willm132

Check if you have unnecessary keys in entitlements, I've fixed identical problem by removal of com.apple.developer.driverkit.userclient-access key from application entitlements (as this is for extensions only)

Boris-Sh avatar Nov 04 '23 21:11 Boris-Sh

I am closing all older issues. If this issue still exists in the latest version, please let me know.

juliansteenbakker avatar Aug 13 '24 19:08 juliansteenbakker