Xcode 9 iOS模拟器 - 无法获取有效的流程句柄 [英] Xcode 9 iOS Simulator - Unable To Obtain Valid Process Handle

查看:693
本文介绍了Xcode 9 iOS模拟器 - 无法获取有效的流程句柄的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已升级到Xcode 9,而10.3和11的iOS模拟器无效。所有股票和我的应用程序在尝试运行时都会强行关闭。

I have upgraded to Xcode 9, and the iOS Simulator for 10.3 and 11 are not working. All stock and my apps are force closing when trying to run.

当我尝试运行日历,首选项等时,Xcode控制台错误如下所示。Unable是什么获取有效的流程句柄是吗?

Xcode Console errors like the following show when I try to run Calendar, Preferences etc. What does the "Unable to obtain valid process handle" mean?

Process handle (com.apple.Preferences, <BSProcessHandle: 0x7fe84552b8b0; Preferences:9270; valid: NO>) is invalid. Returning error {
    BKSProcessExitReason = 0;
    BKSProcessJobLabel = "UIKitApplication:com.apple.Preferences[0x90bf][6825]";
    NSLocalizedFailureReason = "Unable to obtain valid process handle";
}

[com.apple.Preferences] Bootstrap failed with error: <NSError: 0x600000846c60; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Unable to obtain valid process handle">

Bootstrapping failed for <FBApplicationProcess: 0x7ffae944f990; com.apple.Preferences; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID com.apple.Preferences" UserInfo={NSLocalizedFailureReason=Unable to obtain valid process handle, BKSProcessExitReason=0, BSErrorCodeDescription=bootstrap-failed, BKSProcessJobLabel=UIKitApplication:com.apple.Preferences[0x90bf][6825], NSLocalizedDescription=Unable to bootstrap process with bundleID com.apple.Preferences}

Process handle (com.apple.mobilecal, <BSProcessHandle: 0x7fe845525860; MobileCal:9363; valid: NO>) is invalid. Returning error {
    BKSProcessExitReason = 0;
    BKSProcessJobLabel = "UIKitApplication:com.apple.mobilecal[0xf53][6825]";
    NSLocalizedFailureReason = "Unable to obtain valid process handle";
}

[com.apple.mobilecal] Bootstrap failed with error: <NSError: 0x604000643ae0; domain: BKSProcessErrorDomain; code: 1 (bootstrap-failed); reason: "Unable to obtain valid process handle">

Bootstrapping failed for <FBApplicationProcess: 0x7ffaeb141220; com.apple.mobilecal; pid: -1> with error: Error Domain=BKSProcessErrorDomain Code=1 "Unable to bootstrap process with bundleID com.apple.mobilecal" UserInfo={NSLocalizedFailureReason=Unable to obtain valid process handle, BKSProcessExitReason=0, BSErrorCodeDescription=bootstrap-failed, BKSProcessJobLabel=UIKitApplication:com.apple.mobilecal[0xf53][6825], NSLocalizedDescription=Unable to bootstrap process with bundleID com.apple.mobilecal}

Unable to find framework using path: /System/Library/Frameworks/VideoSubscriberAccount.framework






我在iPhone X,iPhone上尝试过它带有iOS 11 / 10.3.1的8/8 +和iPhone 6+模拟器,都具有相同的崩溃结果。如果我在较旧的iOS模拟器(如iPhone 6+ iOS 9.2)上试用它,那么它运行正常。


I've tried it on iPhone X, iPhone 8/8+ and iPhone 6+ simulators with iOS 11 / 10.3.1, all with the same crashing result. If I try it on older iOS simulators such as iPhone 6+ iOS 9.2, then it runs fine.

如果我尝试多次启动它,即40 - 50次对于Safari或日历,有时特定应用程序可能会运行,并且一旦成功运行,它将在会话的其余部分保持如此(直到我在任务切换器关闭应用程序,然后同样的问题再次出现)。对于我的Xcode编译应用程序也是如此。

If I try to launch it many times, i.e. 40 - 50 times for Safari or Calendar, sometimes that specific app may run, and once successfully ran, it'll remain so for the rest of the session (until I close the app at the task switcher, then same problem recurs). The same happens for my Xcode compiled app too.

我的iMac 2009一直在运行El Capitan和Xcode 8,我刚刚用Xcode升级到High Sierra 9。

My iMac 2009 has been running El Capitan and Xcode 8 fine all the while, and I just upgraded to High Sierra with Xcode 9.

我尝试过Xcode 9.1 Beta,但同样的问题仍然存在。

I tried Xcode 9.1 Beta, but same problems persisted.

请帮助,谢谢。

推荐答案

感谢@ russbishop关于禁用第三方内核扩展的建议,我找到了罪魁祸首 - 一个周期性的防火墙

Thanks to @russbishop's suggestion of disabling 3rd party kernel extensions, I have found the culprit — One Periodic's Hands Off Firewall!

我用这个命令卸载了kext :

I unloaded the kext with this command:

kextunload -b com.metakine.handsoff.driver

立即iOS模拟器中的所有股票应用程序都可以正常启动。请注意,您必须 卸载 kext。简单地禁用Hands Off中的规则并不能解决问题。

And immediately all the stock apps in iOS Simulator can start perfectly fine. Note that you must unload the kext. Simply disabling the rules in Hands Off does not fix the problem.

但是,我不能 kextload 支持Hands off驱动程序完成重新激活防火墙。需要重新启动系统。

However, I cannot "kextload" back the Hands Off driver once I am done to reactivate the firewall. A system reboot is needed.

我已将此问题报告给Hands Off,并希望在下一版本中看到修复。

I have reported this issue to Hands Off as well, and hopefully see a fix in the next release.

感谢@JeremyHuddlestonSequoia帮助诊断。

Thanks @JeremyHuddlestonSequoia for helping with the diagnosis too.

这篇关于Xcode 9 iOS模拟器 - 无法获取有效的流程句柄的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆