简体   繁体   English

Xcode 8.3中损坏的游乐场

[英]Playgrounds broken in Xcode 8.3

Since I started working Xcode 8.2 (and 8.3 lately), playgrounds are completely broken for me. 自从我开始使用Xcode 8.2(以及最近的8.3)以来,游乐场对我来说是完全崩溃了。

When opening a playground I see the message "Failed to launch process. Error returned in reply: Connection Interrupted" 打开操场时,我看到消息“无法启动过程。返回错误:连接中断”

Complete re-installation of Xcode or removing / re-creating /private/tmp folder (as suggested by some other posts) did not help. 完全重新安装Xcode或删除/重新创建/ private / tmp文件夹(如其他一些帖子所述)无济于事。

Did someone encounter a similar problem? 有人遇到过类似的问题吗? Are there other known work-arounds? 还有其他已知的解决方法吗? ( http://www.openradar.me/31296836 ) http://www.openradar.me/31296836

Here is some sample output from CoreSimulator.log 这是CoreSimulator.log的一些示例输出

Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error looking up host support port: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error looking up host support port: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:30 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error looking up host support port: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:40 sergey-macbook CoreSimulatorService[5859] <Error>: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutting Down" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutting Down}
Mar 28 16:19:40 sergey-macbook CoreSimulatorService[5859] <Error>: Error from finding pasteboard support port, Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutting Down" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutting Down}
Mar 28 16:19:40 sergey-macbook CoreSimulatorService[5859] <Error>: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutting Down" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutting Down}
Mar 28 16:19:40 sergey-macbook CoreSimulatorService[5859] <Error>: Error Domain=com.apple.CoreSimulator.SimError Code=163 "Unable to lookup in current state: Shutting Down" UserInfo={NSLocalizedDescription=Unable to lookup in current state: Shutting Down}
Mar 28 16:19:40 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}
Mar 28 16:19:40 sergey-macbook com.apple.dt.Xcode[6955] <Error>: Error from finding pasteboard support port, Error Domain=NSPOSIXErrorDomain Code=53 "Software caused connection abort" UserInfo={NSLocalizedDescription=Error returned in reply: Connection interrupted}

Note by the creator of Timing: this issue no longer occurs as of Timing 1.8.1 and Timing 2.0. Timing的创建者注意:从Timing 1.8.1和Timing 2.0开始不再出现此问题。

iOS playgrounds work ok in Xcode 8.3.x on my MacBook, but I got the launching simulator errors on my MBP. 在MacBook上的Xcode 8.3.x中,iOS游乐场可以正常运行,但是MBP出现启动模拟器错误。 The MacBook is for travelling, so has a minimal set of apps. MacBook是旅行用的,因此仅有少量应用程序。 In particular, it has fewer app icons in the status menu bar. 特别是,它在状态菜单栏中的应用程序图标更少。

So on my MBP, I quit all of those that aren't on the MB, and hey presto, playgrounds ran! 因此,在我的MBP上,我退出了所有不在MB上的那些文件,嘿,presto,操场跑了! I started the apps one by one, and it was Timing that brought back the launching simulator error — closing the menu bar icon fixed it again, even though Timing app itself was still running. 我一步一步地启动了应用程序,正是Timing带来了启动模拟器错误-关闭菜单栏图标再次修复了该问题,即使Timing应用程序本身仍在运行。

Not picking on Timing especially; 尤其不选择时间; could be any quick-access app in your menu bar. 可以是菜单栏中的任何快速访问应用。

Before this, I had reinstalled Sierra, but not a clean install. 在此之前,我已经重新安装了Sierra,但没有全新安装。 That would've been the next step. 那将是下一步。

退出Xcode defaults write com.apple.dt.xcode IDEPlaygroundDisableSimulatorAlternateFramebuffer -bool YES后,苹果工程师在终端下面的命令下运行时提供的解决方法, defaults write com.apple.dt.xcode IDEPlaygroundDisableSimulatorAlternateFramebuffer -bool YES

Have you tried deleting your derived data via XCode? 您是否尝试过通过XCode删除派生数据?

Shift+Alt+Command+K

OR the fastest way is open terminal and past the following: 或最快的方法是打开终端并超过以下条件:

rm -rf ~/Library/Developer/Xcode/DerivedData

Also ensure that there are no simulators or other versions of a playground running in the background. 另外,请确保没有模拟器或其他版本的游乐场在后台运行。

(不幸的是)我通过全新安装macOS解决了这个问题(当然,这不是解决问题的正确方法,但我需要尽快让游乐场工作)。

tl;dr My problems went away after checking if all simulators were installed (in Xcode Settings > Components), closing all projects which were heavily using IBDesignable and restarting the playground. tl; dr在检查是否已安装所有模拟器(在Xcode设置>组件中),关闭所有大量使用IBDesignable项目并重新启动操场之后,我的问题消失了。


I don't know if this helps in any way but might as well post it; 我不知道这是否有任何帮助,但最好将其发布。

The first thing I checked was if I had all iOS simulators installed in Xcode. 我检查的第一件事是我是否在Xcode中安装了所有iOS模拟器。 Surprisingly updating to Xcode 8.3 also removed my iOS 10.0 simulator; 令人惊讶的是,更新到Xcode 8.3还删除了我的iOS 10.0模拟器; reinstalled the simulator and reopened Xcode. 重新安装模拟器并重新打开Xcode。

Afterwards did a search on google and found a similar question . 之后在Google上进行搜索,发现了类似的问题

After reading the question I remembered I had an other project open in which I was heavily using IBDesignable for testing purposes. 阅读了问题之后,我记得我有另一个项目在打开,其中我大量使用IBDesignable进行测试。 Closing this project and restarting the playground solved my problems. 关闭该项目并重新启动操场解决了我的问题。

This might have had nothing to do with the playgrounds, but it did fixed my problems. 这可能与操场无关,但是确实解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM