You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use ACRA version 4.9.2. But when the app crashes, no reports are sent to the backend and instead I can see the following in the logcat:
...
D/ACRA: Connect to http://192.168.0.12/acra-backend/report.php
E/ACRA: Failed to send crash reports for /data/data/com.my.app/app_ACRA-approved/2017-06-13T07:46:49.808+0000-IS_SILENT.stacktrace
java.lang.NullPointerException
at org.acra.sender.HttpSender.remap(HttpSender.java:254)
...
So in order to really send the report I made a local copy and changed this line in HttpSender.java:
String value = TextUtils.join("\n", report.get(field).flatten());
into this code:
Element element = report.get(field);
String[] flattened;
if (element != null) {
flattened = element.flatten();
} else {
flattened = new String[0];
}
String value = TextUtils.join("\n", flattened);
It looks like an error in ACRA, but then it would be for everyone and not only for me. Perhaps I messed some configuration? How to deal with it without hacking?
I use ACRA version 4.9.2. But when the app crashes, no reports are sent to the backend and instead I can see the following in the logcat:
During debugging I discovered that in line 254 in HttpSender.java (https://github.com/ACRA/acra/blob/acra-4.9.2/src/main/java/org/acra/sender/HttpSender.java) when field is equal to "USER_COMMENT" then report.get(field) is NULL, and this causes the null pointer exception with flatten() function. It's the only NULL field of all 28 fields. By the way, the IS_SILENT field is false (but maybe that's ok)
So in order to really send the report I made a local copy and changed this line in HttpSender.java:
String value = TextUtils.join("\n", report.get(field).flatten());
into this code:
It looks like an error in ACRA, but then it would be for everyone and not only for me. Perhaps I messed some configuration? How to deal with it without hacking?
P.S.
My Application config is as follows:
The text was updated successfully, but these errors were encountered: