【发布时间】:2016-06-03 04:41:23
【问题描述】:
当我运行cordova emulate ios(或ionic emulate ios)时,我得到一个无效的设备状态错误代码=159。如果我让模拟器保持打开状态,重置内容,然后重新运行命令,我不会收到上述错误,但模拟器永远不会完成加载应用程序。
在这两种情况下,系统都会记录来自instruments 或mdworker 的数百个XPC_ERROR_CONNECTION_INTERRUPTED 条目。这是最近一次尝试的最后几篇:
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: Database mapping failed with result -10822, retrying
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: Database mapping failed with result -10822, retrying
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: Database mapping failed with result -10822, retrying
Feb 21, 2016, 2:08:59 PM instruments[93351]: LaunchServices: received XPC_ERROR_CONNECTION_INTERRUPTED trying to map database
Feb 21, 2016, 2:08:59 PM com.apple.xpc.launchd[1]: Caller not allowed to perform action: instruments.93351, action = service submission, code = 1: Operation not permitted, uid = 503, euid = 503, gid = 20, egid = 20, asid = 100007
Feb 21, 2016, 2:09:30 PM com.apple.CoreSimulator.CoreSimulatorService[549]: Error Domain=com.apple.CoreSimulator.SimError Code=159 "Unable to lookup in current state: Shutdown" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutdown}
Feb 21, 2016, 2:09:30 PM com.apple.CoreSimulator.CoreSimulatorService[549]: Error Domain=com.apple.CoreSimulator.SimError Code=159 "Unable to lookup in current state: Shutdown" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutdown}
Feb 21, 2016, 2:09:30 PM com.apple.CoreSimulator.CoreSimulatorService[549]: Error looking up host support port
Feb 21, 2016, 2:09:32 PM com.apple.CoreSimulator.CoreSimulatorService[549]: Error Domain=com.apple.CoreSimulator.SimError Code=159 "Unable to lookup in current state: Shutdown" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutdown}
Feb 21, 2016, 2:09:32 PM com.apple.CoreSimulator.CoreSimulatorService[549]: Error Domain=com.apple.CoreSimulator.SimError Code=159 "Unable to lookup in current state: Shutdown" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutdown}
Feb 21, 2016, 2:09:32 PM com.apple.CoreSimulator.CoreSimulatorService[549]: Error looking up host support port
我知道还有其他一些关于此的帖子,但似乎都没有解决我的问题。我在本地运行所有内容,权限在用户目录中正确配置。我已经在 Xcode 7.21 和 7.3 上重现了这个错误,使用防火墙和不使用防火墙,通过 nvm 和单独使用节点。
我当前的配置:
Cordova CLI: 6.0.0
Gulp version: CLI version 3.9.1
Gulp local: Local version 3.9.1
Ionic Version: 1.2.4-nightly-1917
Ionic CLI Version: 1.7.14
Ionic App Lib Version: 0.7.0
ios-deploy version: 1.8.5
ios-sim version: 5.0.6
OS: Mac OS X El Capitan 10.11.3
Node Version: v5.6.0
Xcode version: Xcode 7.3 Build version 7D141l
一些帖子表明这与 Time Machine 和 Spotlight 有关。我不知道,但如果有帮助 - 我目前没有使用 Time Machine,我已将整个 HD 放在 TM 的排除文件夹中。最后,通过研究下面的“无法存储”日志,我添加了/private/var/db/lsd 文件夹……但是它并没有解决问题。这可能无关,但我不确定。
Feb 21, 2016, 3:06:28 PM com.apple.xpc.launchd[1]: Service only ran for 1 seconds. Pushing respawn out by 9 seconds.
Feb 21, 2016, 3:06:29 PM com.apple.usbmuxd[94227]: stopping.
Feb 21, 2016, 3:06:30 PM com.apple.usbmuxd[16479]: log filter changed from 4 to 6
Feb 21, 2016, 3:06:30 PM com.apple.usbmuxd[16479]: usbmuxd-364 on Aug 4 2015 at 14:36:18, running 64 bit
Feb 21, 2016, 3:07:37 PM lsd[295]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
Feb 21, 2016, 3:07:37 PM lsd[295]: LaunchServices: Could not store lsd-identifiers file at /private/var/db/lsd/com.apple.lsdschemes.plist
Feb 21, 2016, 3:08:27 PM syslogd[51]: ASL Sender Statistics
感谢您的帮助
【问题讨论】:
标签: cordova ionic-framework ios-simulator xcode7 osx-elcapitan