Xcode 7 无效设备状态 - XPC_ERROR
Xcode 7 Invalid Device State - XPC_ERROR
当我 运行 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
我知道还有其他一些帖子,但 none 似乎解决了我的问题。我 运行 将所有内容都本地化,权限已在用户目录中正确配置。我在 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 的排除文件夹中。最后,通过研究下面的 'could not store' 日志,我添加了 /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
感谢您的帮助
我知道你说的权限是正确的,但是这个 post 似乎暗示权限问题可能是它的原因。
http://zacvineyard.com/blog/2015/11/ionic-invalid-device-state-error-with-xcode-7-solved
https://github.com/driftyco/ionic/issues/4052
此外,您是否尝试过先打开 X-code,然后导航到 Ionic platforms/ios 文件夹以打开项目。从那里,您可以 运行 模拟器。
关于 XPC 错误。 (这与 Ionic 完全不同。这是一个 OSX 问题)。
Ionic 正在使用 "LaunchServices"(使用 XPC)启动模拟器。查看更多信息:
要解决错误 "Database mapping failed with result -10822",您可能需要尝试重建启动服务数据库。看
http://hints.macworld.com/article.php?story=20031215144430486
(kLSServerCommunicationErr -10822 错误是"There is a problem communicating with the server process that maintains the Launch >Services database.")
另请参阅 https://discussions.apple.com/message/7040998#7040998。我也会尝试 "DiskUtility -> RepairPermissions"
当我 运行 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
我知道还有其他一些帖子,但 none 似乎解决了我的问题。我 运行 将所有内容都本地化,权限已在用户目录中正确配置。我在 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 的排除文件夹中。最后,通过研究下面的 'could not store' 日志,我添加了 /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
感谢您的帮助
我知道你说的权限是正确的,但是这个 post 似乎暗示权限问题可能是它的原因。
http://zacvineyard.com/blog/2015/11/ionic-invalid-device-state-error-with-xcode-7-solved https://github.com/driftyco/ionic/issues/4052
此外,您是否尝试过先打开 X-code,然后导航到 Ionic platforms/ios 文件夹以打开项目。从那里,您可以 运行 模拟器。
关于 XPC 错误。 (这与 Ionic 完全不同。这是一个 OSX 问题)。
Ionic 正在使用 "LaunchServices"(使用 XPC)启动模拟器。查看更多信息:
要解决错误 "Database mapping failed with result -10822",您可能需要尝试重建启动服务数据库。看 http://hints.macworld.com/article.php?story=20031215144430486
(kLSServerCommunicationErr -10822 错误是"There is a problem communicating with the server process that maintains the Launch >Services database.")
另请参阅 https://discussions.apple.com/message/7040998#7040998。我也会尝试 "DiskUtility -> RepairPermissions"