0

The app is crashed, but ACRA doesn't come up. Heres the log:

11-20 16:50:19.119: ERROR/ACRA(23345): ACRA caught a RuntimeException exception for com.buggyproject. Building report.
11-20 16:50:19.539: ERROR/ACRA(23345): ACRA caught a RuntimeException exception for com.buggyproject. Building report.
11-20 16:50:19.909: ERROR/ACRA(23345): com.buggyproject fatal error : An error occured while executing doInBackground()
        java.lang.RuntimeException: An error occured while executing doInBackground()
        at android.os.AsyncTask$3.done(AsyncTask.java:299)
        at java.util.concurrent.FutureTask$Sync.innerSetException(FutureTask.java:273)
        at java.util.concurrent.FutureTask.setException(FutureTask.java:124)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:307)
        at java.util.concurrent.FutureTask.run(FutureTask.java:137)
        at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:230)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1076)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:569)
        at java.lang.Thread.run(Thread.java:856)
        Caused by: java.lang.NullPointerException
        at libcore.net.UriCodec.encode(UriCodec.java:132)
        at java.net.URLEncoder.encode(URLEncoder.java:57)
        at com.buggyproject.Api$UpdateUI.doInBackground(Api.java:309)
        at com.buggyproject.Api$UpdateUI.doInBackground(Api.java:296)
        at android.os.AsyncTask$2.call(AsyncTask.java:287)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:305)
        ... 5 more

Why it didn't work? Can't it handle NullPointerException?

Update Here's the code snippet with doInBackground function of AsyncTask class where NullPointExcetion is raising

@Override
protected String doInBackground(String... params) {
    try{
        String path = String.format("update/%s/%s/",
                URLEncoder.encode(params[0], "UTF-8"),
                URLEncoder.encode(params[1], "UTF-8"));

        page = api.getPage(server.getAddress(), path);
        return page;
    } catch (UnsupportedEncodingException e){
        Log.d(TAG_NAME, "Error URL encoding " + e.toString());
    }
    return null;
}

I think the proble is that params[0] or params[1] or both are null but why ACRA didn't show up?

Update2

Another error I have noticed

channel '41f00be8 com.buggyproject/org.acra.CrashReportDialog (server)' ~ Channel is unrecoverably broken and will be disposed!
KennyPowers
  • 4,925
  • 8
  • 36
  • 51

2 Answers2

0

It is easier to force the sending. If you want to use acra with optional sending you might as well use Google Play Developer Console.

So for the solution

  • Is internet permission added?
  • Is the Application set to the class that extends Application?
  • Is the path correct?

Check those things. If acra does not show it is because the application class that initializes ACRA isn't activated. This is in your manifest

Zoe
  • 27,060
  • 21
  • 118
  • 148
0

Check if it was started some task/service in onCreate or onStart methods.

In official github ACRA docs I've found this:

NB if you are starting services or other tasks in Application.onCreate, you should test to see if the current process is the :acra process. If it is then you probably don't want to start your service.