尝试符号化 iOS 崩溃报告时出现奇怪的错误 [英] Strange errors when attempting to Symbolicate iOS crash report

查看:44
本文介绍了尝试符号化 iOS 崩溃报告时出现奇怪的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到了来自 Apple 的崩溃报告,并按照以下说明对其进行了符号化:如何符号化以 .txt 格式而非 .crash 格式从 Apple 收到的崩溃报告

I received a crash report from Apple, and followed these instructions to symbolicate it: How to symbolicate crash report from Apple received in .txt format not .crash format

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

Unfortunately, I see errors when I execute step 7 ("./symbolicatecrash ..."), and don't find an SO question that addresses them:

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
  • 我也尝试将 otool、atos、symbols 和 size 工具从/usr/bin 复制到同一目录中,但仍然出现相同的错误
  • 我可以直接从命令行成功运行所有这些工具
  • 我怀疑问题出在symbolicatecrash函数parse_SDKGuess"上,但我真的不能再进一步了......

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

Any idea what's going on and how to fix it? Thanks!

在symbolicatecrash脚本中添加了parse_SDKGuess函数以供参考:

Added the parse_SDKGuess function in the symbolicatecrash script for reference:

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"...

It seems that "lc($1)" evaluates to "xxx"...

推荐答案

无法定位SDKxxxos"

您可能可以忽略这些错误.这些错误的原因是来自 Apple 的崩溃报告在崩溃报告中包含以下内容:

SDK "xxxos" cannot be located

You can probably ignore those errors. The reason of those errors is that the crash report from Apple contains the following in the crash report:

Hardware Model:      xxx1

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

(instead of for example iPhone10,5). Apple probably masks the hardware model. They might be using a special hardware for testing.

由于警告显示 xxxos SDK 未找到,它回退到 iOS.

As the warnings show xxxos SDK is not found and it falls back to iOS.

我想这与 xxxos 错误无关.

I guess this is an unrelated issue to the xxxos errors.

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

What worked for me was downloading dSYMs from Apple. Go to Xcode > Organizer, in the Archives tab (the default) select your App and the version that corresponds to your crash report and click on the "Download dSYMs..." button.

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

After the dSYMs are downloaded, re-run the symbolicatecrash command:

./symbolicatecrash mycrash.crash > symbolicated.crash

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

I guess the problem is that when you enable bitcode, Apple is rebuilding the application and then the generated dSYMs in xcarchive do not match the crash report.

即便如此,我的代码中的所有调用都被正确符号化,但系统框架(例如 UIKit)中的调用没有被符号化.

And even then all calls from my code were symbolicated properly, but calls in system frameworks (e.g. UIKit) were not symbolicated.

这篇关于尝试符号化 iOS 崩溃报告时出现奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆