Watch OS app installation error - Could not attach to pid : “11996”

  • We've added a watch app extension in the developed iOS application source code. When we're selecting and running the watch application target, We're getting this application installation error with an alert:

Could not attach to pid : “11996”

attach failed ((os/kern) invalid argument)

  • This alert is coming only on M1 chip-based Mac systems. But the same code is running well on Intel-based Mac systems.

Any help from anyone is highly appreciable. Thank you.

Replies

Hello! Can you please file Feedback with a sysdiagnose from affected devices (Mac/sim or Mac/watch) and post the FB number here? Thanks very much!

  • Please find the full details log for the issue:

    Could not attach to pid : “46677” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: attach failed ((os/kern) invalid argument) User Info: { DVTRadarComponentKey = 855031; IDERunOperationFailingWorker = DBGLLDBLauncher; RawUnderlyingErrorMessage = "attach failed ((os/kern) invalid argument)"; }

    Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "Watch6,9"; "device_osBuild" = "8.0 (19R344)"; "device_platform" = "com.apple.platform.watchsimulator"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = "x86_64"; "operation_duration_ms" = 15269; "operation_errorCode" = 3; "operation_errorDomain" = IDEDebugSessionErrorDomain; "operation_errorWorker" = DBGLLDBLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 1; "param_destination_platform" = "com.apple.platform.watchsimulator"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 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.watchapp2"; "param_runnable_swiftVersion" = "5.5"; "param_runnable_type" = 2; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphonesimulator15.0"; "sdk_osVersion" = "15.0"; "sdk_variant" = iphonesimulator; }

    System Information

    macOS Version 11.5.2 (Build 20G95) Xcode 13.0 (19234) (Build 13A233) Timestamp: 2022-02-09T11:55:40+05:30

    Thank you.

Add a Comment

Please find the full details log for the issue:

Could not attach to pid : “46677” Domain: IDEDebugSessionErrorDomain Code: 3 Failure Reason: attach failed ((os/kern) invalid argument) User Info: { DVTRadarComponentKey = 855031; IDERunOperationFailingWorker = DBGLLDBLauncher; RawUnderlyingErrorMessage = "attach failed ((os/kern) invalid argument)"; }

Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : { "device_model" = "Watch6,9"; "device_osBuild" = "8.0 (19R344)"; "device_platform" = "com.apple.platform.watchsimulator"; "launchSession_schemeCommand" = Run; "launchSession_state" = 1; "launchSession_targetArch" = "x86_64"; "operation_duration_ms" = 15269; "operation_errorCode" = 3; "operation_errorDomain" = IDEDebugSessionErrorDomain; "operation_errorWorker" = DBGLLDBLauncher; "operation_name" = IDERunOperationWorkerGroup; "param_consoleMode" = 0; "param_debugger_attachToExtensions" = 0; "param_debugger_attachToXPC" = 1; "param_debugger_type" = 3; "param_destination_isProxy" = 1; "param_destination_platform" = "com.apple.platform.watchsimulator"; "param_diag_MainThreadChecker_stopOnIssue" = 0; "param_diag_MallocStackLogging_enableDuringAttach" = 0; "param_diag_MallocStackLogging_enableForXPC" = 1; "param_diag_allowLocationSimulation" = 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.watchapp2"; "param_runnable_swiftVersion" = "5.5"; "param_runnable_type" = 2; "param_testing_launchedForTesting" = 0; "param_testing_suppressSimulatorApp" = 0; "param_testing_usingCLI" = 0; "sdk_canonicalName" = "iphonesimulator15.0"; "sdk_osVersion" = "15.0"; "sdk_variant" = iphonesimulator; }

System Information

macOS Version 11.5.2 (Build 20G95) Xcode 13.0 (19234) (Build 13A233) Timestamp: 2022-02-09T11:55:40+05:30

Thank you.