首页 文章

尝试Symbolicate iOS崩溃报告时出现奇怪的错误

提问于
浏览
1

我收到了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,符号和大小工具复制到同一目录中,但仍然遇到相同的错误

  • 我可以直接从命令行成功运行所有这些工具

  • 我怀疑问题是使用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”......

1 回答

  • 4

    无法找到

    SDK“xxxos”

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

    Hardware Model:      xxx1
    

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

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

    未找到符号信息

    我想这是一个与 xxxos 错误无关的问题 .

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

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

    ./symbolicatecrash mycrash.crash > symbolicated.crash
    

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

    即使这样,我的代码中的所有调用都被正确地符号化,但系统框架(例如UIKit)中的调用没有象征性 .

相关问题