英文:
Pseudo Terminal Setup Error ErrorCode: 7 Errno: 6 when trying to build and launch a Swift app on Simulator
问题
我在尝试通过iPhone 12 Pro模拟器在XCode上启动我的应用程序时遇到以下错误:
完整的日志如下:
详细信息
伪终端设置错误
Domain: IDEPseudoTerminalDomain
Code: 7
Failure Reason: ErrorCode: 7 Errno: 6
User Info: {
DVTErrorCreationDateKey = "2023-05-17 14:05:21 +0000";
IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher;
}
--
操作无法完成。设备未配置
Domain: NSPOSIXErrorDomain
Code: 6
Failure Reason: Device not configured
--
分析事件: com.apple.dt.IDERunOperationWorkerFinished : {
"device_model" = "iPhone13,3";
"device_osBuild" = "16.4 (20E247)";
"device_platform" = "com.apple.platform.iphonesimulator";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 50;
"operation_errorCode" = 7;
"operation_errorDomain" = IDEPseudoTerminalDomain;
"operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher;
"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.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_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphonesimulator16.4";
"sdk_osVersion" = "16.4";
"sdk_variant" = iphonesimulator;
}
--
系统信息
macOS Version 13.3.1 (Build 22E261)
Xcode 14.3 (21812) (Build 14E222b)
时间戳: 2023-05-17T22:05:21+08:00
我尝试过多次重启XCode,清除缓存,尝试其他模拟器,但仍然遇到相同的错误。
使用的规格为:
XCode版本 14.3
macOS版本 13.3.1 (22E261)
模拟器IOS版本 16
英文:
I am getting the error below when I try to launch my application on XCode via the iPhone 12 Pro simulator.
The full logs are
Details
Pseudo Terminal Setup Error
Domain: IDEPseudoTerminalDomain
Code: 7
Failure Reason: ErrorCode: 7 Errno: 6
User Info: {
DVTErrorCreationDateKey = "2023-05-17 14:05:21 +0000";
IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher;
}
--
The operation couldn’t be completed. Device not configured
Domain: NSPOSIXErrorDomain
Code: 6
Failure Reason: Device not configured
--
Analytics Event: com.apple.dt.IDERunOperationWorkerFinished : {
"device_model" = "iPhone13,3";
"device_osBuild" = "16.4 (20E247)";
"device_platform" = "com.apple.platform.iphonesimulator";
"launchSession_schemeCommand" = Run;
"launchSession_state" = 1;
"launchSession_targetArch" = arm64;
"operation_duration_ms" = 50;
"operation_errorCode" = 7;
"operation_errorDomain" = IDEPseudoTerminalDomain;
"operation_errorWorker" = IDELaunchiPhoneSimulatorLauncher;
"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.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_testing_launchedForTesting" = 0;
"param_testing_suppressSimulatorApp" = 0;
"param_testing_usingCLI" = 0;
"sdk_canonicalName" = "iphonesimulator16.4";
"sdk_osVersion" = "16.4";
"sdk_variant" = iphonesimulator;
}
--
System Information
macOS Version 13.3.1 (Build 22E261)
Xcode 14.3 (21812) (Build 14E222b)
Timestamp: 2023-05-17T22:05:21+08:00
I have tried restarting my XCode multiple times, clearing the cache, trying other simulators but I am still getting the same error.
The specs I am using are:
XCode ver 14.3
MacOS 13.3.1 (22E261)
Simulator IOS 16
I have tried restarting my XCode multiple times, clearing the cache, trying other simulators but I am still getting the same error.
答案1
得分: 1
Like the poster, I hit this hideously annoying issue. Likewise, clearing, restarting Xcode, rebooting and the issue persisted. Could not run ANY app from Xcode. Some older references to the same issue, hinted at errant, unterminated processes. Doing a ps -ef showed a large number of processes running (not wholly unexpected). Being suspicious of some process (yes, I am looking at you goolge chrome helper) I rebooted AND unchecked the "reopen windows" option, which I normally use. The number of running processes dropped significantly and Xcode was back to normal. So, I cannot identify any root cause, but this was the solution for me.
英文:
Like the poster, I hit this hideously annoying issue. Likewise, clearing, restarting Xcode, rebooting and the issue persisted. Could not run ANY app from Xcode. Some older references to the same issue, hinted at errant, unterminated processes. Doing a ps -ef showed a large number of processes running (not wholly unexpected). Being suspicious of some process (yes, I am looking at you goolge chrome helper) I rebooted AND unchecked the "reopen windows" option, which I normally use. The number of running processes dropped significantly and Xcode was back to normal. So, I cannot identify any root cause, but this was the solution for me.
答案2
得分: 1
我今天遇到了同样的问题,下面是帮助我的小窍门。
确保在切换到另一个项目之前关闭Xcode和模拟器。你应该像通常一样关闭这些应用程序(点击左上角的红色按钮),然后结束程序(同时点击Xcode图标和按钮命令,然后选择“结束”)。你还需要为模拟器执行相同的操作。之后,你的问题应该不再出现。
注意:在Mac屏幕底部有一个称为“Dock”的快速访问工具栏。
英文:
I got the same problem today an here is the trick that helped me.
Just make sure to close Xcode and the simulator wenn you want to move to another project. you should close this Apps like usually (by hitting the red button on top left) and end the program (by hitting the icon of Xcode in "the Dock" and the button command at the same time and then select "end". You have to do it as well for the simulator). After that, your should no longer appear.
NB: Down at the bottom of the Mac's screen is a quick access tool bar called "the Dock."
答案3
得分: 0
请尝试关闭Xcode、模拟器(确保不在后台运行)和终端(它会显示崩溃),然后打开终端并运行以下命令:sudo xcode-select -s /Library/Developer/CommandLineTools
当运行时,请在模拟器中选择一个iPhone类型(我的被清除了)。
英文:
Got this as well - try closing Xcode, Simulator (make sure not running in background) and Terminal (which will show the crash) - then open Terminal and sudo xcode-select -s /Library/Developer/CommandLineTools
Select an iPhone type in simulator when this runs (mine was cleared)
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论