【问题标题】:Playgrounds broken in Xcode 8.3Xcode 8.3 中损坏的 Playgrounds
【发布时间】:2017-03-28 14:28:01
【问题描述】:

自从我开始使用 Xcode 8.2(以及最近的 8.3)以来,游乐场对我来说完全崩溃了。

打开 Playground 时,我看到消息“启动进程失败。回复错误:连接中断”

完全重新安装 Xcode 或删除/重新创建 /private/tmp 文件夹(如其他一些帖子所建议的那样)没有帮助。

有人遇到过类似的问题吗?还有其他已知的解决方法吗? (http://www.openradar.me/31296836)

这是 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}

【问题讨论】:

    标签: ios xcode


    【解决方案1】:

    Timing 创建者注意:从 Timing 1.8.1 和 Timing 2.0 起不再出现此问题。

    iOS Playground 在我的 MacBook 上的 Xcode 8.3.x 中运行良好,但我的 MBP 上出现启动模拟器错误。 MacBook 适合旅行,所以只有最少的应用程序集。特别是,它在状态菜单栏中的应用程序图标更少。

    所以在我的 MBP 上,我退出了所有不在 MB 上的,嘿,马上,操场跑了!我一一启动了应用程序,是 Timing 带回了启动模拟器错误 - 关闭菜单栏图标再次修复它,即使计时应用程序本身仍在运行。

    特别不挑时间;可以是菜单栏中的任何快速访问应用程序。

    在此之前,我重新安装了 Sierra,但不是全新安装。那将是下一步。

    【讨论】:

    • 嗨,Audrey,Daniel,这里是 Timing 的开发者。感谢您指出这一点!我现在知道这个问题并将在下周进行调查。在此之前,您能否检查一下在终端中运行以下命令是否可以缓解问题:sqlite3 ~/Library/Application\ Support/info.eurocomp.Timing*/ActivityStore.db "update zapplication set zapplescripttrackingdisabled = 1 where zbundleidentifier like '%xcode%'"。不幸的是,这会降低 Timing 跟踪 Xcode 的准确性,但总比没有好:-) 如果这个命令对你有用,请告诉我!
    • 感谢奥黛丽 - 禁用计时对我有用。我按照@MrMage 的建议运行了终端命令。它需要重新启动 Timing 应用程序和 Xcode(也许其中一个会起作用),但 iOS 游乐场现在正在运行 Timing。希望更新能解决这个问题,然后我需要终端命令来扭转这个变通办法。
    • 哦。我的。上帝。我已经失去了至少 8 个小时来尝试解决这个问题。我从来没有想过 Timing2 可能是问题所在。确认存在 Timing2 应用程序、运行 Sql 命令并重新启动 Xcode 解决了问题。
    • 很好的答案!!!我被这个问题困扰了半年多,甚至不知道为什么。我偶然发现了这个答案,它就像一个魅力。这可能是我在 stackoverflow 中找到的最有价值的答案!
    • 你无法想象我在这上面花了多少时间。我多次更新操作系统、Xcode 并重新启动我的 MB。最后是因为计时应用程序。已卸载!
    【解决方案2】:

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

    【讨论】:

    • 在 IDEPlaygroundDisableSimulatorAlternateFramebuffer 上的 Google 搜索表明,此解决方法是针对完全不同的问题提供的。你确定它也解决了崩溃的模拟器服务吗?
    • 运行这个之后我的playground崩溃了,现在我已经安装了以前版本的Xcode that is 8.2.1,我认为问题与isUserInteractionEnabled有关,每次我尝试交互它都会崩溃
    【解决方案3】:

    您是否尝试过通过 XCode 删除派生数据?

    Shift+Alt+Command+K

    或者最快的方法是打开终端并通过以下方式:

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

    还要确保没有模拟器或其他版本的游乐场在后台运行。

    【讨论】:

    • 完全重新安装 Xcode 包括擦除派生数据和 Xcode 相关的所有内容。我刚刚完成了干净安装 macOS(作为最后的手段),这为我消除了问题,但并没有说明问题所在。对于此类问题,完全重新安装操作系统是一个相当昂贵的解决方案:-(
    【解决方案4】:

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

    【讨论】:

      【解决方案5】:

      tl;dr 在检查是否安装了所有模拟器(在 Xcode 设置 > 组件中),关闭所有大量使用 IBDesignable 的项目并重新启动 Playground 后,我的问题就消失了。


      我不知道这是否有任何帮助,但不妨发布它;

      我检查的第一件事是我是否在 Xcode 中安装了所有 iOS 模拟器。令人惊讶的是,更新到 Xcode 8.3 也删除了我的 iOS 10.0 模拟器;重新安装模拟器并重新打开Xcode。

      后来在谷歌上搜索,发现一个类似的question

      读完这个问题后,我记得我打开了另一个项目,我在其中大量使用IBDesignable 进行测试。关闭这个项目并重新启动操场解决了我的问题。

      这可能与游乐场无关,但它确实解决了我的问题。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2012-06-23
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多