Open app review crashlog .txt file in Xcode 13

Got emailed three .txt crash files. Cannot for the life of me figure out how to get Xcode to do something with them.

Tried:

renaming .txt to .crash

Dropping onto "devices and simulators" window

Dropping on to "devices and simulators > select device > View device logs"

"Download debug symbols" for the archive in Xcode (says "dowloaded debug symbols" so did it)

... and many other things

Xcode 13 simply refuses to respond to the drag-and-drop of the file no matter the file extension and no matter where in Xcode's various windows/tools I drop it.

Has anyone done this with a crash .txt file from app review and Xcode 13?

Replies

So .crash is the correct file name extension. Make sure that the rename actually worked by selecting the file in the Finder and choosing File > Get Info. That’ll show you the full name.

Once you do that rename you should be able to drop the file into the Devices and Simulators window:

  1. Attach a device.

  2. Select it on the left.

  3. Click View Device Logs.

  4. Drag the .crash file from the Finder to the left side of that window.

I just tried this in Xcode 13.0 and it worked fine.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Hey,

I've got the same issue, the solution Quinn is suggesting above does not work. I've attached one of the crashlogs we recieved, you will notice its format is different than if you just export a log... are you maybe familiar with the format? I can't find anything about it online.

Thanks,

Same here! I have same as you hhrthrh and I can't seem to figure out what to do. I've opened it up in Xcode and it shows a log but I'm not sure what else to do about it. I'm new so I just wanted to know if this is just how all crash files look from Apple Review and we just add open it up in our Xcode to see where it crashed and that's it or we try to transition the .crash file into what the documentation looks like here

are you maybe familiar with the format?

Yes. That’s a new-style JSON crash report. I’m more familiar with those on the Mac than I am on iOS, but none of the techniques I use for Mac crash reports seem to work with this iOS one )-:

I’m going to dig into this and get back to you.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

IMPORTANT This is a rapidly changing space and it’s not something I track for DTS specifically. The following is just my experience. It should be enough to get you unblocked but I expect there to be further, official, improvements here, both in the tools and in the documentation.

hhrthrh, Are you sure that’s the full, unmodified crash report file you got from App Review? The reason I ask is that it seems to be malformed relative to a standard JSON-style crash report. Consider this crash report I just got off my iOS 15.0 device:

{"app_name":"QCrash","timestamp":"2021-10-08 10:48:50.00 +0100","app_version":"1.0","slice_uuid":"8be8031b-d5d6-3c22-9476-f8e7ad361a52","build_version":"1.0","platform":2,"bundleID":"com.example.apple-samplecode.QCrash","share_with_app_devs":1,"is_first_party":0,"bug_type":"309","os_version":"iPhone OS 15.0 (19A346)","incident_id":"E664AD61-B7C9-4EF0-A656-556EE4EFD80C","name":"QCrash"}
{
  "uptime" : 18000,
  … lots of stuff …
}

Note I’ve attached the complete file here:

As you can see, there are two JSON dictionaries next to each other in the crash report. However, your crash report looks like this:

{
  "uptime" : 460000,
  …
}

Note that the first JSON dictionary is missing, and that’s what’s confusing our tools (more about tools below).

If you didn’t modify the crash report, and this is exactly what App Review sent you, I’d write back and ask them for a well-formed crash report. In the meantime, you can work around this by getting a copy of that first JSON dictionary from one of your other crash reports and pre-pending it to this file.


With regards our tools, the fact that you can’t drag a JSON crash report into the Devices and Simulators window is a known bug (I do not, alas, have the bug number handy). There’s a couple of ways to work around this, depending on your requirements. If your only goal is to get an old style crash report, do this:

  1. Change the file extension to .ips.

  2. Move it into ~/Library/Logs/DiagnosticReports on your Mac.

  3. Run Console.

  4. Click Crash Reports on the left.

  5. The crash report should show up in the list at the top; select it.

Console will display a human readable crash report at the bottom. The exact format varies depending on your macOS version. I’m using macOS 11.6 and here’s what it displays:

If you want to get a symbolicated report, use the new CrashSymbolicator.py tool from Xcode 13:

% python3 /Applications/Xcode.app/Contents/SharedFrameworks/CoreSymbolicationDT.framework/Resources/CrashSymbolicator.py QCrash-2021-10-08-104850.ips

Here’s a full transcript of that operation:

If you then want the human readable format, feed the result into Console as described previously.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

  • If you then want the human readable format, feed the result into Console as described previously.

    Is there a way to get this human readable format through Terminal? CrashSymbolicator.py is supposed to replace the deprecated symbolicatecrash script, but it seems like it's still missing this important step. I'm unclear on how to automate crash symbolication with this new script/format. Most docs only mention the old .ips format and don't cover how to handle anything for iOS15+.

Add a Comment

I expect there to be further, official, improvements here, both in the tools and in the documentation.

And so it begins…

This is now listed as a known issue in the Xcode 13.1 RC Release Notes, along with various workaround suggestions and a whole raft of bug numbers (r. 78124467, r. 83760462, r. 84048036, r. 84048399, FB9669482).

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

If you then want the human readable format, feed the result into Console as described previously.

Is there a way to get this human readable format through Terminal? CrashSymbolicator.py is supposed to replace the deprecated symbolicatecrash script, but it seems like it's still missing this important step. I'm unclear on how to automate symbolication with this new script/format. Most docs only mention the old .ips format and don't cover how to handle anything for iOS15+.

  • link

  • Hey, my apologies, I've tried using the lldb.macosx.crashlog module without any success. It looks like it requires the original location of the application when it was created to be provided. Can you point me toward an example of its intended usage? Is that still the only preferred way for these json-formatted logs? Using symbolicatecrash seemed much for straightforward. Furthermore I'm curious what the purpose is for using CrashSymbolicator.py for symbolication then.

Add a Comment

Hey, my apologies, @eskimo I've tried using the lldb.macosx.crashlog module without much success. It looks like it requires the original location of the application when it was created to be provided. I think there's just user-error on my part. Can you point me toward an example of its intended usage? Is that still the only preferred way for these iOS15+ json-formatted logs? Using symbolicatecrash seemed much for straightforward. Furthermore, I'm curious what the purpose is for using CrashSymbolicator.py for symbolication. In the Xcode13 Release Notes it mentioned how it is intended to replace symbolicatecrash.