[MOD-2255] Android: Upload crash reports to crash server

GitHub Issuen/a
TypeNew Feature
Resolution Date2016-05-19T08:21:36.000+0000
Affected Version/sn/a
Fix Version/sACA 1.0.0
ReporterChee Kiat Ng
AssigneeAshraf Abu


Using ACRA lib, we should replace our crittercism module and upload crash reports as analytic events to our own PEM crash server. here's a quick idea of what the JSON should look like:
id          - random event id
sid         - session of the app (if you can get it, otherwise no worries)
event       - "native.crash"
ts          - timestamp of the event
data.stack  - this seems better than just "value"
mid         - the device id, if you can get it
aguid       - the app guid
platform    - the platform of the app
app_version - the version of the app
and some references: https://github.com/appcelerator/nodeable/blob/master/common-test/src/main/resources/crash_event.json https://github.com/appcelerator/crash-analytics-server/blob/master/lib/consumer.js#L39-L55




  1. Ashraf Abu 2016-02-22 [~iwhitfield] Sample from Android: [^android_sample2.json] [^android_sample1.json] It's similar to iOS.
  2. Isaac Whitfield 2016-02-22 [~msamah] cool thanks! Minor point - dates and stuff will skew unique crash stacks - can they be stripped out? (they start each line)
  3. Ashraf Abu 2016-02-23 [~iwhitfield] Which part are you referring to? The dates inside the "data.stack"? The logs? Hmmm... I'll have to check if it's easy to strip them out. It's bad for end point? Will update you.
  4. Ashraf Abu 2016-02-29 Events to be named: "crash.native" rather than "native.crash" (From [~iwhitfield]) [~ssombhatla] Fyi.
  5. Ashraf Abu 2016-03-01 Just a note:- Crittercism is able to catch NDK crashes. ACRA's NDK crash catching is very limited:- https://github.com/ACRA/acra/issues/129 {quote} Only if that NDK crash bubbles up as a Java RuntimeException/Error. It can catch a segmentation fault. {quote} https://github.com/acra/acra/wiki/AdvancedUsage#catching-native-code-errors {quote} Catching Native Code errors ACRA does not catch errors occurring in native code. We currently don't know any stable solution to catch native errors with ACRA. {quote}
  6. Ashraf Abu 2016-03-01 Putting another sample crash here for ref:-
         "id": "af6fa75d-3a12-421f-84dc-f34204abac60",
         "event": "crash.native",
         "ts": "2016-02-29T23:49:55.604-08:00",
         "data": {
           "stack": "java.lang.Throwable: Uncaught Error: throw with null exception (APM.crashApp();)\n\tat Unknown.Unknown(app.js:12)\n"
         "aguid": "205adfa3-9587-423b-9aaa-bb61a58ac976",
         "platform": "android",
         "app_version": "1.0"
    sid and mid are not included.
  7. Eric Merriman 2018-08-06 Cleaning up older fixed issues. If this issue should not have been closed as fixed, please reopen.

JSON Source