【问题标题】:Xcode crash when refreshing provisioning profiles刷新配置文件时 Xcode 崩溃
【发布时间】:2013-03-15 13:56:56
【问题描述】:

我似乎无法在 Xcode 中刷新我的配置文件而不会崩溃。每次我按下管理器中的刷新按钮时,它都会崩溃,我从错误日志中检索到这一行:

UNCAUGHT EXCEPTION (NSInvalidArgumentException): *** setObjectForKey: object cannot be nil (key: teamId)

所以我检查了我的 teamId,但没有发现任何异常。任何人有任何想法是什么导致我的问题?每次我刷新我的个人资料时,这对我有用。今天早上甚至做了 10 次。

编辑:

如果需要,这里是崩溃报告:

Process:         Xcode [1136]
Path:            /Applications/Xcode.app/Contents/MacOS/Xcode
Identifier:      com.apple.dt.Xcode
Version:         4.6.1 (2067)
Build Info:      IDEApplication-2067000000000000~2
App Item ID:     497799835
App External ID: 14581035
Code Type:       X86-64 (Native)
Parent Process:  launchd [272]
User ID:         501

Date/Time:       2013-03-15 15:21:43.906 +0100
OS Version:      Mac OS X 10.8.3 (12D78)
Report Version:  10

Interval Since Last Report:          14773 sec
Crashes Since Last Report:           9
Per-App Interval Since Last Report:  14523 sec
Per-App Crashes Since Last Report:   7
Anonymous UUID:                      E5C08B95-3313-ABC3-6BB7-F22E76735A98

Crashed Thread:  2  Dispatch queue: NSManagedObjectContext Queue

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Application Specific Information:
ProductBuildVersion: 4H512
UNCAUGHT EXCEPTION (NSInvalidArgumentException): *** setObjectForKey: object cannot be nil (key: teamId)
UserInfo: (null)
Hints: None
Backtrace:
  0  0x00007fff92639aee __exceptionPreprocess (in CoreFoundation)
  1  0x00007fff98d703f0 objc_exception_throw (in libobjc.A.dylib)
  2  0x00007fff926c85b7 -[__NSDictionaryM setObject:forKey:] (in CoreFoundation)
  3  0x0000000107d42d88 +[DTDKTeamBasedService _createRequestDictionaryForTeam:andPlatform:] (in DTDeviceKit)
  4  0x0000000107d45315 +[DTDKDownloadProvisioningProfileService serviceForTeam:andPlatform:andProfileID:withError:] (in DTDeviceKit)
  5  0x0000000107d6e1c0 +[DTDKDownloadProvisioningProfileService serviceForProvisioningProfileRecord:withError:] (in DTDeviceKit)
  6  0x0000000107d73728 __72+[DTDKPortalDatabase _refreshFromProvisioningProfileListServices:error:]_block_invoke (in DTDeviceKit)
  7  0x00007fff9429d4dc developerSubmittedBlockToNSManagedObjectContextPerform (in CoreData)
  8  0x00007fff9429d40a -[NSManagedObjectContext performBlockAndWait:] (in CoreData)
  9  0x0000000107d73246 +[DTDKPortalDatabase _refreshFromProvisioningProfileListServices:error:] (in DTDeviceKit)
 10  0x0000000107d75816 __56+[DTDKPortalDatabase refresh:parentWindow:withCallback:]_block_invoke_5 (in DTDeviceKit)
 11  0x00007fff942cd7cf developerSubmittedBlockToNSManagedObjectContextPerform_privateasync (in CoreData)
 12  0x00007fff90dd20b6 _dispatch_client_callout (in libdispatch.dylib)
 13  0x00007fff90dd347f _dispatch_queue_drain (in libdispatch.dylib)
 14  0x00007fff90dd32f1 _dispatch_queue_invoke (in libdispatch.dylib)
 15  0x00007fff90dd31c3 _dispatch_worker_thread2 (in libdispatch.dylib)
 16  0x00007fff964d4d0b _pthread_wqthread (in libsystem_c.dylib)
 17  0x00007fff964bf1d1 start_wqthread (in libsystem_c.dylib)

objc[1136]: garbage collection is ON
abort() called
.....
[The report itself is very large and contains much more than this]

【问题讨论】:

  • 我也有同样的问题
  • 我今天也刚开始收到此错误。
  • 我不明白为什么要关闭这个问题?它与编程和软件开发有关,因为xcode是编写软件的工具。
  • 您可以通过从 developer.apple.com 手动下载证书和配置文件来解决此问题
  • 和我一样。我做了一些更改添加/删除证书和密钥。之后我遇到了这个问题。早上 xcode 4.6.1 更新了。

标签: xcode provisioning-profile ios-provisioning


【解决方案1】:

删除此文件:

~/Library/Developer/Xcode/connect1.apple.com 4.6.1.db

在运行 Xcode 4.6.1 之前。

【讨论】:

  • 完美,我删除了两个文件“connect1.apple.com 4.6.1.db”在问题开始的同一天早上更新。
  • 这是 Apple 的官方解决方法:devforums.apple.com/message/796388#796388
  • (重新)只移动一个文件对我不起作用,所以我也(重新)移动了 iOS Device Logs* connect* 和 DerivedData - 它又可以工作了。
  • 哇哦!!再次微笑,谢谢!这也解决了“未知”团队。
【解决方案2】:

这是苹果官方的解决方法:

在终端运行这个命令:

mkdir ~/Library/Developer/Xcode/OldPortalDBs; mv ~/Library/Developer/Xcode/connect1.apple.com* ~/Library/Developer/Xcode/OldPortalDBs

对我来说就像一个魅力。

【讨论】:

  • 即使在这样做之后,我仍然遇到问题在几天后再次出现。为此,我创建了一个命令别名。如果您也需要,只需将此 alias uncrashxcode='mkdir ~/Library/Developer/Xcode/OldPortalDBs 2>/dev/null; mv ~/Library/Developer/Xcode/connect1.apple.com* ~/Library/Developer/Xcode/OldPortalDBs 2>/dev/null' 添加到您的任何 ~/.profile 或 ~/.bashrc 文件中即可。
  • 非常感谢!查看 Apple 的官方解决方法(它将以“connect1.apple.com”开头的文件移动到另一个文件夹),我发现删除任何以“connect1.apple.com”开头的文件更容易。这样,如果不起作用,您也可以将它们放回去。但这对我来说就像一种魅力。 :)
【解决方案3】:

本周有人在NSCoder Night 遇到了这个问题。通过删除清除:

~/Library/Caches/com.apple.dt.Xcode。

sqlite3 ~/Library/Caches/com.apple.dt.Xcode/PortalData/connect1.apple.com

显示该文件为SQLite database,并引用证书、团队和配置文件。我怀疑(但没有尝试过)删除 PortalData 文件夹足以清除错误。

【讨论】:

    【解决方案4】:

    删除此文件对我有用。

    ~/Library/Developer/Xcode/connect1.apple.com 4.6.1.db

    谢谢!

    【讨论】:

      猜你喜欢
      • 2015-01-12
      • 1970-01-01
      • 2013-04-04
      • 1970-01-01
      • 1970-01-01
      • 2015-12-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多