gpt4 book ai didi

xcode - 尝试符号化 iOS 崩溃报告时出现奇怪的错误

转载 作者:行者123 更新时间:2023-12-01 10:23:24 50 4
gpt4 key购买 nike

我收到了来自 Apple 的崩溃报告,并按照以下说明对其进行了符号化:How to symbolicate crash report from Apple received in .txt format not .crash format

不幸的是,我在执行步骤 7 时看到错误(“./symbolicatecrash ...”),并且没有找到解决这些错误的 SO 问题:

xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "otool", not a developer tool or in PATH
## Warning: can't find tool named 'otool' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "atos", not a developer tool or in PATH
## Warning: can't find tool named 'atos' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "symbols", not a developer tool or in PATH
## Warning: can't find tool named 'symbols' in the xxxos SDK, falling back to searching the iOS SDK
xcodebuild: error: SDK "xxxos" cannot be located.
xcrun: error: unable to find utility "size", not a developer tool or in PATH
## Warning: can't find tool named 'size' in the xxxos SDK, falling back to searching the iOS SDK
No symbolic information found

注释:

  • 我正在运行 Xcode 9.2
  • 我还尝试将/usr/bin 中的 otool、atos、symbols 和 size 工具复制到同一目录中,但仍然遇到相同的错误
  • 我可以直接从命令行成功运行所有这些工具
  • 我怀疑问题出在 symbolicatecrash 函数“parse_SDKGuess”上,但我真的无法更进一步......

知道发生了什么事以及如何解决它吗?谢谢!

在symbolicatecrash脚本中添加了parse_SDKGuess函数以供引用:

sub parse_SDKGuess {
my ($log_ref) = @_;

# It turns out that most SDKs are named "lowercased(HardwareModelWithoutNumbers) + os",
# so attempt to form a valid SDK name from that. Any code that uses this must NOT rely
# on this guess being accurate and should fallback to whatever logic makes sense for the situation
my $model = parse_HardwareModel($log_ref);
$model or return undef;

$model =~ /(\D+)\d/;
$1 or return undef;

my $sdk = lc($1) . "os";
if($sdk eq "ipodos" || $sdk eq "ipados") {
$sdk = "iphoneos";
}
if ( $sdk =~ /mac/) {
$sdk = "macosx";
}

return $sdk;
}

“lc($1)”的计算结果似乎是“xxx”...

最佳答案

无法找到 SDK“xxxos”

您也许可以忽略这些错误。这些错误的原因是 Apple 的崩溃报告中包含以下内容:

Hardware Model:      xxx1

(而不是例如 iPhone10,5)。苹果可能掩盖了硬件模型。他们可能正在使用特殊的硬件进行测试。

正如警告所示,未找到 xxxos SDK,它会回退到 iOS。

未找到符号信息

我猜这是与 xxxos 错误无关的问题。

对我有用的是从 Apple 下载 dSYM。转到 Xcode > Organizer,在 Archives 选项卡(默认)中选择您的应用程序以及与崩溃报告对应的版本,然后单击“下载 dSYMs...”按钮。

下载 dSYM 后,重新运行 symbolicatecrash 命令:

./symbolicatecrash mycrash.crash > symbolicated.crash

我猜问题是,当您启用位码时,Apple 正在重建应用程序,然后 xcarchive 中生成的 dSYM 与崩溃报告不匹配。

即使如此,我代码中的所有调用都已正确符号化,但系统框架(例如 UIKit)中的调用未符号化。

关于xcode - 尝试符号化 iOS 崩溃报告时出现奇怪的错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49676044/

50 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com