kevinhinterlong / archwiki-viewer

A simple Android specific viewer for the Arch Linux Wiki.
https://wiki.archlinux.org/
Apache License 2.0
72 stars 13 forks source link

App crashes due to network issue #77

Open chihuazhang opened 4 years ago

chihuazhang commented 4 years ago

Studies have shown that mobile apps are prone to crashes due to a network issue, mainly because successful network calls return unexpected or no data. And we found that when this app (version 1.0.11)'s network returned data is null or some fields are null (JSON format), the app has crashed. the specific crash information is as follows:

java.lang.RuntimeException: An error occurred while executing doInBackground() at android.os.AsyncTask$3.done(AsyncTask.java:309) at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:354) at java.util.concurrent.FutureTask.setException(FutureTask.java:223) at java.util.concurrent.FutureTask.run(FutureTask.java:242) at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:234) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588) at java.lang.Thread.run(Thread.java:818) Caused by: java.lang.UnsupportedOperationException: JsonNull at com.google.gson.JsonElement.c(dalvik_source_comjtmcnarchwikiviewer_12.apk) at com.jtmcn.archwiki.viewer.data.SearchResultsBuilder.a(dalvik_source_comjtmcnarchwikiviewer_12.apk) at com.jtmcn.archwiki.viewer.data.SearchResultsBuilder.b(dalvik_source_comjtmcnarchwikiviewer_12.apk) at com.jtmcn.archwiki.viewer.tasks.Fetch$1.a(dalvik_source_comjtmcnarchwikiviewer_12.apk) at com.jtmcn.archwiki.viewer.tasks.Fetch$1.b(dalvik_source_comjtmcnarchwikiviewer_12.apk) at com.jtmcn.archwiki.viewer.tasks.FetchUrl.a(dalvik_source_comjtmcnarchwikiviewer_12.apk) at com.jtmcn.archwiki.viewer.tasks.FetchUrl.doInBackground(dalvik_source_comjtmcnarchwikiviewer_12.apk) at android.os.AsyncTask$2.call(AsyncTask.java:295) at java.util.concurrent.FutureTask.run(FutureTask.java:237) ... 4 more

cataloque commented 3 years ago

I think that this bug is caused when the network meets specific conditions. I also hope that the developer can have a look at this issue. Thank you.

seniorm0ment commented 3 years ago

The developer has seemed to be inactive for quite some time unfortunately..