I just recently launched an application on the Google Play Store, and I was exploring the developer console and saw the tab for Crashes and ANR.
What does ANR stand for?
Also, my app seems to have crashed on some of my friend's phone before, but there was no way for them to "report" such crashes. How should I enable such functions for users to report crashes for me to see in the developer console under the Crashes/ANR tab?
ANR stands for Application Not Responding. If your app is doing a lot of work on the UI thread then you'll see one of those force close/wait dialogs. That's ANR.
As for crash reporting, if your app is distributed through Google Play then crash reporting is built in. When your app crashes, the user will get a dialog with the options "Force Close" or "Report." The user has to press the Report option to send you the crash report, otherwise you may never know.
If you're not distributing through Google Play, you might want to consider a library like ACRA which will email you crash reports, upload them to a Google Docs spreadsheet, or you can write your own custom handler for dealing with crash reports.
Details about ACRA can be found here: http://code.google.com/p/acra/
Below is a sampling of what these dialogs look like. Close/report dialogs on the left and ANR on the right. Android 3.0+ is on top with the older dialogs on the bottom.
When an application crashes, a tombstone is generated. Essentially, your app needs to be aware that portions of it crashed (if you rely on some API or library that provides callbacks / status) but if it's really just your app dying - you will have a somewhat hard time figuring out whether it crashed or not.
"Error reporting" isn't a premade class you can use in android, and you may have to roll one of your own. Then again, there's ACRA - http://acra.ch/
some links:
http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html
http://developer.android.com/distribute/googleplay/strategies/app-quality.html
Related
In the Google Play Developers Console, developers can see the crash reports of their App collected from end users. Is there any Apps public their crash reports?
I want to have an investigation of Android crashes, to see if there are some genera reasons. (in a large scale, thus I need crash reports from many Apps)
I am wondering is there any Open Source Android project which public their crash reports?
Yes you can but it depends on the developer weather he has used these kind of android libs to detect crashes.
For example
you are using some application it gets crashed.
you see a popup to submit that crash you send email.
in that email you can see that crash otherwise there are no such apps available as far as I know.
In my app ,i have integrated Crashlytics ,ACRA and Google Analytics for reporting crashes
-> is there any side effect of one on others ?
-> Which one is better to use.
-> How crash reporting tools work ,if one caught the crash how other will get to report the same crash ?
Using multiple crash reporting solutions in one project simultaneously might run your application into concurrency issue, where application eventually hangs forever upon any crash.
Crash reporting solutions intercept uncaught crashes, in one way or another. The flow is basically the same:
Intercept uncaught crash;
Log it to be able to send info to server;
Re-throw crash, so that the app eventually crashes.
I could imagine a situation where 2 crash reporting solutions create an infinite loop throwing the same exception to each other forever, according to the steps above.
At least, that's what it looked like when I used Google Analytics (with crash reporting turned on) together with Crashlytics. The application just hanged forever without any visible crashing, until I eventually turned Google Analytics crash reporting off.
is there any side effect of one on others ?
Google Analytics is not really good to use. I created a Google Analytics account a few days before the implementation. It had not been used and not even been copied(the code) and when I came back to insert Google Analytics I had to get the code. Noone had used a Google Analytics version of the app and it wasn't even released and it had a lot of usages logged. I don't like google analytics because the code's are easy to crack and are used by third party websites without consent to add fake clicks on your website when the code isn't even used there.
Additonally, Google Analytics does only handle when it is forced to log. As it is not a dedicated crash analytics tool it does not log crashes like ACRA, Crashalytics and Firebase crashes.
Which one is better to use.
That is really up to you, but personally I find ACRA to be better because you can use backends on your own site. If the site goes down, so does ACRA so it really helps to feel in control of the bringing the site back up.
Additionally, there are many backends if you want to use your own site. And if you don't find one that works you can create one. Crashalytics and Firebase rely on their own dashboard on their respective pages, which means another password and username to remember.
How crash reporting tools work ,if one caught the crash how other will get to report the same crash ?
See Drew's answer
Crash analytics tools Might be using Global Exception handling as in this https://stackoverflow.com/a/8877177/1602333 for entire App to handle uncaught Exceptions.
SO if you use multiple crash analytics tools , each of them may replace Global Exception handler .
To collect crash reports as a developer one uses logcat. Is there a standard way for a published android application to capture crash logs so that your users can send them to you?
Is there any callback that is called when an app crashes for example? Can the strategy that logcat uses to log be adopted to a production game?
Similar question for iOS Apps:
How can I allow users to give me feedback and submit bug reports for my iOS app?
Related Question
How can I accept bug reports and other user feedback from within my app?
EDIT 1:
In addition to the frameworks mentioned in the answers below a lower level approach to capturing all uncaught exceptions can be used an is mentioned here Ideal way to set global uncaught exception Handler in Android
I personally use ACRA. I found it easy to integrate, and it meets my requirements.
Reports are sent to a spreadsheet in Google Docs, and it can be configured to send you an email every time the app crashes
Using logcat is a solution but is only feasible when crashes are coming from your own device. However, you can have the crashes occurring on your users’ devices automatically sent to you as well, including all crash and device details.
This could be done through Instabug which is a bug & crash reporting service.
It automatically sends a report containing all crash and device details once a crash occurs, plus It only takes a line of code to integrate in your app.
For full disclosure, I work at Instabug. Let me know if I can help.
You can include Flurry Analytics in your app, which does create an error log when something craches and sends in back to the server, which you have access to. It will give you all the information like the LogCat.
I hope this helps.
There is also FirebaseCrash by Google which reports logs on your Firebase console.
Read more about it here
The Google Play Developer Console also reports crashes and application not responsive, under crashes and ANRs for each app.
I was just using Sports Tracker when it crashed, and when I pressed "Report" button to report the crash, I'm given a simple input field asking for a comment regarding the crash.
However, pressing "preview" will give me insight of what data is being send with the crash log. The amount of data is actually immense, including date/time, device name/version, system log, stack trace etc. All kinds of usable data.
From logcat I can see that this is com.google.android.feedback activity.
The question is, is this something Sports Tracker developers implemented themselves, or is it the default crash report every android user has installed on their phones? In other words, do all my apps (=the ones I've written and posted to Play Store) already have this function, or is it something I could/should implement myself**?
I have received some crash reports via android's build in crash reporting service, but it doesn't really give me any useful data (besides stack trace). Or is it just that the crash reporting on developer's dashboard is still far from complete?
I don't know about this special feedback activity. I'm currently using the ACRA system that it's really easy to use and give me useful bug reports. Let's have a look on it for your bug report.
I am sure they must be using one of these.
ACRA is great as well as try ZUbhium, it comes with silent crash reporting & in app support desk. So whenever application crashes, it captures more meaningful data and does analysis onit .
You can either add Zubhium as backend to ACRA & view advanced crash reports or use ZubhiumSDK. Both do excellent job.
Actually TestPoke is a beta testing platform that allow you to see all crashes your android app fall in, even thought they notify you when such thing happens through it Android App.
http://www.testpoke.com
I recently was receiving a NullPointerException crash report in the android market with one of my apps. I was not able to recreate the bug when testing so I thought it may be specific to a device. To solve this issue I included BugSense with my latest release. BugSense has worked reporting other issues and has been very helpful, but I am still getting reports of the original error with the latest version in the Android Market but in BugSense. Does BugSense not work on some devices?
Some details about the crash:
BugSense is called in my Splash Screen Activity.
Splash Screen opens the Main Activity.
Main Activity has an Instance of MyObject.
MyObject is set when a user clicks an item in a ListView.
Clicking an item in the ListView opens an AlertDialog.
MyObject.getName() is called in onCreateDialog.
Crash Occurs - NPE.
Error doesn't appear on BugSense Dashboard. User Comments in Android Market state "app is crashing as soon as it opens." My original thought was the user found a way to open a dialog without clicking on a list item but after seeing the user comment it appears the app is trying to access onCreateDialog before it ever needs to be called.
So my questions: How is it possible for the app to crash without BugSense reporting on it? and Why would onCreateDialog get called before the Activity ever needs it?
I use ACRA to report crashes, and upload them to both Google Docs (the "normal" ACRA way) and BugSense.
Even after exchanging multiple emails with BugSense, and their attempts to fix the situation, I get about 5 times the number of entries in Google Docs than I get in BugSense.
BugSense is silently dropping 4 in 5 reports, most likely because its parsers don't like the data that the reports contain. Its UI is much more useful than wading through a huge Google Docs spreadsheet, but I can't trust BugSense because it under-reports so much.
hmm do you get the crash if you use ACRA or Crittercism?