Android Developer World
Android Developer World

Reputation: 1070

Crashes are shown in developer console

I have recently submitted app to playstore. I think app is tested automatically by Google devices. I found many crashes (around 70) in Play store developer console. When i have tested in my real devices, i haven't get any crashes. How to avoid the crashes/remove the crashes from the list by the next time.

My app has login, without login user, user can't go to the dashboard. But the crash reports are related to within the app(I mean after the login).

How to handle this scenario ? Do we need to write any test cases to avoid such crashes from google devices since we are not getting crashes. `

@Override
            protected String doInBackground(Void... voids) {
                if (CropMainActivity.cropped == null) {
                    return "";
                }
                return compress(CropMainActivity.cropped);
            }




java.lang.RuntimeException: 
  at io.fabric.sdk.android.services.concurrency.AsyncTask$3.done(AsyncTask.java:323)
  at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
  at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
  at java.util.concurrent.FutureTask.run(FutureTask.java:242)
  at io.fabric.sdk.android.services.concurrency.AsyncTask$SerialExecutor$1.run(AsyncTask.java:254)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
  at java.lang.Thread.run(Thread.java:818)
Caused by: java.lang.NullPointerException: 
  at com.myapp.fragment.MyProfileFragment.compress(MyProfileFragment.java:250)
  at com.myapp.fragment.MyProfileFragment.access$100(MyProfileFragment.java:51)
  at com.myapp.fragment.MyProfileFragment$2.doInBackground(MyProfileFragment.java:185)
  at com.myapp.fragment.MyProfileFragment$2.doInBackground(MyProfileFragment.java:181)
  at io.fabric.sdk.android.services.concurrency.AsyncTask$2.call(AsyncTask.java:311)
  at java.util.concurrent.FutureTask.run(FutureTask.java:237)

` enter image description here

Upvotes: 0

Views: 615

Answers (1)

CommonsWare
CommonsWare

Reputation: 1007584

How to avoid the crashes/remove the crashes from the list by the next time.

Analyze the stack traces, try to identify the bugs, then fix the bugs. Ship an update to your app with the bug fixes.

Then, as the legendary shampoo bottle instructions read, "lather, rinse, repeat", as you will encounter this same sort of problem in the future, most likely.

I think app is tested automatically by Google devices.

It does not really matter whether the crashes come from ordinary users, from some sort of automated testing engine, or from a ferret hopped up on crystal meth. If your app is crashing in the field, there is a bug in your app. If nothing else, you are missing some defensive programming steps that would detect the problem before crashing, then redirect the user somewhere else.

My app has login, without login user, user can't go to the dashboard.

Perhaps the bug in your app is that there are ways to get to the dashboard without logging in. For example, perhaps the dashboard activity has an <intent-filter> or is otherwise exported, meaning that anyone, at any time, can start that activity. Or, perhaps the dashboard activity assumes certain static fields will be populated, which might not be the case, if the app's process was terminated while it was in the background.

Upvotes: 4

Related Questions