Skip to content
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

NPE Exception in pauseDownload reported by Google Play Console #712

Closed
julianharty opened this issue Apr 13, 2018 · 3 comments
Closed

NPE Exception in pauseDownload reported by Google Play Console #712

julianharty opened this issue Apr 13, 2018 · 3 comments
Milestone

Comments

@julianharty
Copy link
Contributor

Google Play Console provides lots of information about the Kiwix-Android app available in the Google Play store (rather than ones users install from elsewhere).

The app has an overall crash rate of 1.53% currently on user's devices. However the crashes aren't evenly distributed so some users and some devices experience far higher crash rates than others.

Many of the most frequent crashes are related to the Download process. And of these the pauseDownload is the most common. I will focus on this feature here. We can raise issues for stopDownload and other major causes so we can work on these orthogonally and track our progress.

I've raised this issue so more of us know about what's happening for end-users in the hope that we'll be able to identify and fix the cause(s).

Google Play Crashes ranked by most crashes

screen shot 2018-04-13 at 14 26 19

The essence of the stack trace is:

Caused by: java.lang.NullPointerException: 
  at org.kiwix.kiwixmobile.downloader.DownloadService.pauseDownload (DownloadService.java:196)
  at org.kiwix.kiwixmobile.downloader.DownloadService.toggleDownload (DownloadService.java:190)
  at org.kiwix.kiwixmobile.downloader.DownloadService.onStartCommand (DownloadService.java:105)

Screenshots of the crash on various Android versions

For whatever reasons I don't fathom, Google Play has 3 groupings of the same crash. Here are the 3 screenshots of these.
The most frequent is reported on older Android versions 6.0 and earlier
screen shot 2018-04-13 at 14 10 56

The next grouping is for 7.0 and 7.1 devices
screen shot 2018-04-13 at 14 14 43

Finally followed by those on Android 8.0, 7.0 and 7.1 (presumably these don't overlap with the previous grouping)

screen shot 2018-04-13 at 14 15 28

Environment

Production: reported by Google Play Console.

  • version of the software you use : Release 2.3 and 2.2 (although the
  • device / operating system : Various end-user devices.
@julianharty
Copy link
Contributor Author

Testing notes

The automated tests don't test either pauses or stopping and restarting downloads. These tests would be welcome, especially once we get the current downloadTest to run reliably. However we probably don't want to have long running tests in our CI process so we may want/need to create a separate test group that is skipped by Travis-CI / Testdroid.

The problems are probably better to test interactively initially. Perhaps adding some logging in the app code in DownloadService.java would help identify what's triggering the NPE? I'll do some investigatory testing, you're welcome to contribute too.

@mhutti1
Copy link
Contributor

mhutti1 commented Apr 16, 2018

I think this is in general related to the notification not interacting with underlying service correctly in certain cases where some fragments are not loaded.

ISNIT0 added a commit that referenced this issue Jul 4, 2018
@kelson42 kelson42 added this to the 2.5 milestone Apr 19, 2019
@macgills
Copy link
Contributor

Fixed in #1170

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants