I'm looking to try and symbolicate my iPhone app's crash reports.
I retrieved the crash reports from iTunes Connect. I have the application binary that I submitted to the App Store and I have the dSYM file that was generated as part of the build.
I have all of these files together inside a single directory that is indexed by spotlight.
What now?
I have tried invoking:
symbolicatecrash crashreport.crash myApp.app.dSYM
and it just outputs the same text that is in the crash report to start with, not symbolicated.
Am I doing something wrong?
I got a bit grumpy about the fact nothing here seems to "just work" so I did some investigating and the result is:
Set up: QuincyKit back end that receives reports. No symbolication set up as I couldn't even begin to figure out what they were suggesting I do to make it work.
The fix: download crash reports from the server online. They're called 'crash' and by default go into the ~/Downloads/ folder. With that in mind, this script will "do the right thing" and the crash reports will go into Xcode (Organizer, device logs) and symbolication will be done.
The script:
Things can be automated to where you can drag and drop in Xcode Organizer by doing two things if you do use QuincyKit/PLCR.
Firstly, you have to edit the remote script admin/actionapi.php ~line 202. It doesn't seem to get the timestamp right, so the file ends up with the name 'crash' which Xcode doesn't recognize (it wants something dot crash):
Secondly, in the iOS side in QuincyKit BWCrashReportTextFormatter.m ~line 176, change
@"[TODO]"
to@"TODO"
to get around the bad characters.After reading all these answers here in order to symbolicate a crash log (and finally succeeding) I think there are some points missing here that are really important in order to determine why the invocation of symbolicatecrash does not produce a symbolicated output.
There are 3 assets that have to fit together when symbolicating a crash log:
example.crash
), either exported from XCode's organizer or received from iTunes Connect..app
package (i.e.example.app
) that itself contains the app binary belonging to the crash log. If you have an.ipa
package (i.e.example.ipa
) then you can extract the.app
package by unzipping the.ipa
package (i.e.unzip example.ipa
). Afterwards the.app
package resides in the extractedPayload/
folder..dSYM
package containing the debug symbols (i.e.example.app.dSYM
)Before starting symbolication you should check if all those artifacts match, which means that the crash log belongs to the binary you have and that the debug symbols are the ones produced during the build of that binary.
Each binary is referred by a UUID that can be seen in the crash log file:
In this extract the crash log belongs to an app binary image named example.app/example with UUID
aa5e633efda8346cab92b01320043dc3
.You can check the UUID of the binary package you have with dwarfdump:
Afterwards you should check if the debug symbols you have also belong to that binary:
In this example all assets fit together and you should be able to symbolicate your stacktrace.
Proceeding to the
symbolicatecrash
script:In Xcode 8.3 you should be able to invoke the script via
If it is not there you may run a
find . -name symbolicatecrash
in your Xcode.app directory to find it.As you can see there are no more parameters given. So the script has to find your application binary and debug symbols by running a spotlight search. It searches the debug symbols with a specific index called
com_apple_xcode_dsym_uuids
. You can do this search yourself:resp.
The first spotlight invocation gives you all indexed dSYM packages and the second one gives you the
.dSYM
packages with a specific UUID. If spotlight does not find your.dSYM
package thensymbolicatecrash
will neither. If you do all this stuff e.g. in a subfolder of your~/Desktop
spotlight should be able to find everything.If
symbolicatecrash
finds your.dSYM
package there should be a line like the following insymbolicate.log
:For finding your
.app
package a spotlight search like the following is invoked bysymbolicatecrash
:If
symbolicatecrash
finds your.app
package there should be the following extract insymbolicate.log
:If all those resources are found by
symbolicatecrash
it should print out the symbolicated version of your crash log.If not you can pass in your dSYM and .app files directly.
Note: The symbolicated backtrace will be output to terminal, not
symbolicate.log
.Just a simple and updated answer for xcode 6.1.1 .
STEPS
1.Xcode>Window>Devices.
2.Select a device from a list of devices under DEVICES section.
3.Select View Device Logs.
4.Under the All Logs section you can directly drag drop the report.crash
5.Xcode will automatically Symbolicate the crash report for you.
6.You can find the Symbolicated crash report by matching its Date/Time with the Date/Time mentioned in your crash report.
In XCode 4.2.1, open Organizer, then go to Library/Device Logs and drag your .crash file into the list of crash logs. It will be symbolicated for you after a few seconds. Note that you must use the same instance of XCode that the original build was archived on (i.e. the archive for your build must exist in Organizer).
The combination that worked for me was:
Using atos I wasn't able to resolve the correct symbol information with the addresses and offsets that were in the crash report. When I did this, I see something more meaningful, and it seems to be a legitimate stack trace.
I found out most of proposed alternatives did not work in latest XCode (tested with Xcode 10). For example, I had no luck drag-dropping .crash logs in Xcode -> Organizer -> Device logs -view.
I recommend using Symbolicator tool https://github.com/agentsim/Symbolicator