API for uploading crashes?
I have approximately 300 crash reports for a previous version of my app that I'd really like to symbolicate using HockeyApp. The dSYM is already uploaded and working with symbolicating a few of them. Unfortunately, it would appear that I'd have to upload them all one-by-one via the "upload a crash" page to get them into HockeyApp. Is there an API for uploading individual crash reports or any other way to get them up on the HockeyApp quickly? Thanks.
Comments are currently closed for this discussion. You can start a new one.
Support Staff 2 Posted by Thomas Dohmke on 09 Apr, 2012 04:12 PM
Hi Eric,
you can use the same API that is used by QuincyKit, but it requires an XML string as a multipart upload. Here is a simple ruby script that does the all the work:
https://gist.github.com/2344466
To use it, download the file, save it in the same directory as your crash logs, then replace the values in lines 5 to 8. APP_ID should be your App ID on HockeyApp, EXECUTABLE_NAME the name of your binary, BUNDLE_IDENTIFIER and BUNDLE_VERSION as usual.
To run the file, open a Terminal window, then do the following:
The gem needs to be installed only once. The script looks for all .crash files and uploads them to HockeyApp.
Please let me know if you see any issues with this.
Kind regards,
Thomas
3 Posted by Eric Horacek on 09 Apr, 2012 04:35 PM
Uploading now, looks like they're getting symbolicated—thanks so much for the simple script and immediate response! Will definitely be upgrading when the trial runs out.
Quick comment—they're Mac crash logs, so I just commented out the lines associated with
data = /OS Version:\s+iPhone OS\s(.*)\(.*\)/.match(log)anddata = /Hardware Model:\s+(.*)/.match(log), since they were causing Ruby to throw aundefined method "length" for nil:NilClass (NoMethodError). Guessing it's because it wasn't able to find those lines in the crash logs. Just thought you might want to know so you can fix the error handling for Mac crash logs!Best,
Eric
Support Staff 4 Posted by Thomas Dohmke on 09 Apr, 2012 08:17 PM
Hi Eric,
I have updated the script to prevent the exception. The new version is here:
https://gist.github.com/2344466/36bd3eefdaad40c02150812eff92cb37312...
Cheers,
Thomas
Thomas Dohmke closed this discussion on 12 Apr, 2012 05:43 PM.