【问题标题】:Unable to boot the iOS Simulator after deleting /private/tmp删除 /private/tmp 后无法启动 iOS 模拟器
【发布时间】:2015-11-21 06:38:48
【问题描述】:

本周我无法启动我的模拟器,我尝试了一些文章中的几种解决方案,但它不起作用。我的 MacOS 版本是 OS X 10.10.5 (14F27),我的模拟器是 iOS 8.4。

我从 ~/Library/Logs/CoreSimulator/CoreSimulator.log 获取日志

8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:可以 不注册服务 com.apple.SystemConfiguration.PPPController: launch_sim_register_endpoint:0xfffffecc 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务 com.apple.audio.audiohald:launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:不能 注册服务 com.apple.coreservices.lsuseractivity.simulatorsupport: launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务 com.apple.FSEvents:launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:不能 注册服务 com.apple.SystemConfiguration.configd: launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:无法注册服务 IndigoHIDRegistrationPort:launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:不能 注册服务 PurpleFBTVOutServer:launch_sim_register_endpoint: 0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]: 无法注册服务 PurpleFBServer: launch_sim_register_endpoint:0x44e 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误域=NSPOSIXErrorDomain Code=60 "无法启动 iOS 模拟器。"用户信息=0x7fbb204683f0 {NSLocalizedDescription=无法启动 iOS 模拟器。, NSLocalizedFailureReason=launchd 未能响应。} 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误 Domain=NSPOSIXErrorDomain Code=60 "无法启动 iOS 模拟器。" UserInfo=0x7fbb204683f0 {NSLocalizedDescription=无法启动 iOS 模拟器。,NSLocalizedFailureReason=launchd 未能响应。} 八月 27 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误 Domain=com.apple.CoreSimulator.SimError Code=146 "无法在 当前状态:关机” UserInfo=0x7fbb20808710 {NSLocalizedDescription=无法在当前状态下查找:关机} 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误 查找主机支持端口 Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误 Domain=com.apple.CoreSimulator.SimError Code=146 "无效设备 state" UserInfo=0x7fbb2083b420 {NSLocalizedDescription=无效设备 state} Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316] : 错误域=com.apple.CoreSimulator.SimError 代码=146 “无法在当前状态下查找:关机” UserInfo=0x7fbb2080c350 {NSLocalizedDescription=无法在当前状态下查找:关机} 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误 Domain=com.apple.CoreSimulator.SimError Code=146 "无法在 当前状态:关机” UserInfo=0x7fbb2080c350 {NSLocalizedDescription=无法在当前状态下查找:关机} 8 月 27 日 11:29:14 LL-MBP.local com.apple.iphonesimulator[8330]: Error Domain=NSPOSIXErrorDomain Code=60 "无法启动 iOS 模拟器。” UserInfo=0x7fda2a9020f0 {NSLocalizedDescription=无法 启动 iOS 模拟器。, NSLocalizedFailureReason=launchd 失败 响应。} 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316] : 错误域=com.apple.CoreSimulator.SimError 代码=146 “无法在当前状态下查找:关机” UserInfo=0x7fbb20b0f850 {NSLocalizedDescription=无法在当前状态下查找:关机} 8 月 27 日 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误 查找主机支持端口 Aug 27 11:29:14 LL-MBP.local CoreSimulatorService[8316]:错误 Domain=com.apple.CoreSimulator.SimError Code=146 "无效设备 state" UserInfo=0x7fbb20b00e20 {NSLocalizedDescription=无效设备 状态}

有人对此有任何想法吗?

我会很感激的!

最后我在@Jeremy Huddleston Sequoia 的帮助下解决了这个问题。一开始,我在网上尝试了很多解决方案,包括删除 /private/tmp 文件夹。所以无论我清理多少次重新安装模拟器,它都不起作用。所以要小心这个

【问题讨论】:

  • 你重启电脑了吗?
  • 更新了标题,因为我们知道了原因。希望这将有助于吸引其他搜索相同问题的人的注意力。

标签: ios xcode ios-simulator simulator


【解决方案1】:

这些错误表明 launchd_sim 未加载或未运行,并且看门狗已触发以通知您失败。

如果您在 OS X 10.10.5 中禁用 AMFI,模拟器运行时将无法使用,并且会像这样显示。

但是,在您的情况下,launchd_sim 在启动时崩溃。崩溃日志表明它在尝试在 /private/tmp 中创建其状态目录时遇到错误。

这可能发生在您删除 /private/tmp (或错误地重新创建它)。要创建 /private/tmp,请执行以下操作:

sudo mkdir /private/tmp
sudo chmod 1777 /private/tmp

【讨论】:

  • 这是我尝试启动 xcode 和模拟器时的 system.log:
  • 类 IDEBlockScrollView 在 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/IDEKit 和 /Applications/Xcode.app/Contents/PlugIns/IDEProductsUI.ideplugin/ 中都实现了内容/MacOS/IDEProductsUI。将使用两者之一。哪一个是未定义的。 8 月 27 日 14:57:51 LL-MBP.local com.apple.usbmuxd[77]:LOCKDOWN_V2_BONJOUR_SERVICE_NAME 是 _apple-mobdev2._tcp,90a107ed
  • 我检查了我没有引导参数配置 nvram: 获取变量时出错 - 'boot-argus': (iokit/common) 数据未找到
  • system.log 中肯定还有更多内容。您引用的那条特定行在这里不相关。另请查找任何 launchd_sim 崩溃日志。
  • 日志太长,这里不能贴,可以给我一个邮箱地址,我可以发给你吗?
猜你喜欢
  • 2017-02-27
  • 2016-07-19
  • 1970-01-01
  • 1970-01-01
  • 2015-11-10
  • 1970-01-01
  • 2021-07-14
  • 2014-09-17
相关资源
最近更新 更多