-
Notifications
You must be signed in to change notification settings - Fork 408
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Caught Exceptions having error object from ANRWatchDog not getting logged on Crashlytics Dashboard #29
Comments
Hi, |
I too was having this issue earlier, it seems when you Log a non-runtime exception in crashlytics it creates nonfatal exceptions in fabric dashboard since ANRs don't necessarily crash an application. You need to toggle the switch in the fabric dashboard to show all exceptions including non-fatals as by default it only shows fatal exceptions. Another issue might be proguard which when enabled strips some important classes required by anrWatchDog. To prevent that use the following rule in your proguard-rules.pro file.
You might also want to do the following to change the error into string
Hope it helps! |
@navaneet Regarding the dashboard thing, I have already selected "All Events". Will surely look into the 2nd part of your solution though. Thanks! Btw Fabric team replied that they are receiving an empty report and hence it is not showing in the dashboard. Any thoughts? |
Not sure, however if it logs into logcat it should log into fabric too. Try logging to logcat and then check against fabric if the same error is getting logged. |
I don |
I have been looking into this, and I was able to get this to work by setting the ANRWatchDog to only report the main thread.
I still cannot get this to work without that setting. |
I contacted Crashlytics support and they stated:
So looks like currently you must use the setReportMainThreadOnly() option as it limits the size of the report. |
@mflesh1 I think issue is because of ANR format. Crashlytics is expecting an exception which normally contains a message and a stack trace. When "setReportMainThreadOnly" is disabled, ANRError creates a nested stack trace of all threads which Crashlytics does not accept. If I convert the ANRError into a string, as suggested by @navaneet , then it get posted fine. But then there is error grouping issue on crashlytics dashboard which I am currently trying to figure out. . |
ANRError indeed is too big for Crashlytics. I convert errors into text files and upload to Firebase storage it is free and you can setup it from Android Studio. |
The documentation warns about this. |
Hi,
I am using ANRWatchDog to catch ANRs. It provides an 'error' object which I am logging to crashlytics. I am getting report upload complete logs for crashlytics but nothing appears on dashboard. Crashlytics is working fine at the same time for other types of caught/uncaught exceptions.
private ANRListener listener = new ANRListener() {
@OverRide
public void onAppNotResponding(ANRError error) {
try{
Crashlytics.logException(error);
I have raised the issue with Crashlytics team as well. Wanted to know here if any known issue exists in ANRWatchDog.
The text was updated successfully, but these errors were encountered: