mogol / flutter_secure_storage

A Flutter plugin to store data in secure storage
https://pub.dartlang.org/packages/flutter_secure_storage
BSD 3-Clause "New" or "Revised" License
1.12k stars 368 forks source link

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

Closed Spyspyspy closed 1 month ago

Spyspyspy commented 1 year ago

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

suculent commented 1 year ago

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 commented 1 year ago

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

valientegaston commented 1 year ago

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)
       <asynchronous suspension>
       #2      FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1209:27)
       <asynchronous suspension>
       #3      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #4      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
       <asynchronous suspension>
       #5      FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:281:9)
       <asynchronous suspension>
       #6      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #7      FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:229:5)
       <asynchronous suspension>
       #8      run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
       <asynchronous suspension>
       #9      AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
       <asynchronous suspension>
       #10     main (package:flutter_tools/executable.dart:91:3)
       <asynchronous suspension>
Spyspyspy commented 1 year ago

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"

imdatceleste commented 1 year ago

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

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

amazingCoding commented 1 year ago

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

maphongba008 commented 1 year ago

same issue :(

CodeSpyder commented 1 year ago

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

willm132 commented 12 months ago

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

Boris-Sh commented 11 months ago

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)

juliansteenbakker commented 1 month ago

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

ataknakbulut commented 1 month ago

same issue here.

fikretsengul commented 15 hours ago

Same issue here too @juliansteenbakker.

Could not launch “[DEV] Fab” 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 = "2024-10-05 20:32:53 +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: 162

Event Metadata: com.apple.dt.IDERunOperationWorkerFinished : { "device_identifier" = "00006000-000659C022E2801E"; "device_model" = "MacBookPro18,3"; "device_osBuild" = "14.5 (23F79)"; "device_platform" = "com.apple.platform.macosx"; "device_thinningType" = "MacBookPro18,3"; "dvt_coredevice_version" = "397.21"; "dvt_coresimulator_version" = 987; "dvt_mobiledevice_version" = "1759.2.1"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = arm64; "operation_duration_ms" = 32; "operation_errorCode" = 20; "operation_errorDomain" = IDELaunchErrorDomain; "operation_errorWorker" = IDELaunchServicesLauncher; "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.macosx"; "param_diag_113575882_enable" = 0; "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_guardMalloc_enable" = 0; "param_diag_memoryGraphOnResourceException" = 0; "param_diag_mtc_enable" = 1; "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_enable" = 0; "param_diag_sanitizer_ubsan_stopOnIssue" = 0; "param_diag_showNonLocalizedStrings" = 0; "param_diag_viewDebugging_enabled" = 1; "param_diag_viewDebugging_insertDylibOnLaunch" = 1; "param_install_style" = 2; "param_launcher_UID" = 2; "param_launcher_allowDeviceSensorReplayData" = 0; "param_launcher_kind" = 0; "param_launcher_style" = 99; "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" = "macosx15.0"; "sdk_osVersion" = "15.0"; "sdk_variant" = macos; }

System Information

flutter_secure_storage Version ^9.2.2 Flutter Version 3.24.3 macOS Version 14.5 (Build 23F79) Xcode 16.0 (23051) (Build 16A242d) Timestamp: 2024-10-05T23:32:53+03:00