Kiwix-android: Kiwix (Android) loads significant amount of mobile data at startup

Created on 27 Dec 2020  路  21Comments  路  Source: kiwix/kiwix-android

Hello,

I'm using Kiwix for Android, version 3.4.3, build 6230403.
My phone is a Samsung Galaxy S10e running Android 10, latest patch level.

Bug report:
When opening Kiwix, it loads approx. 9.4 MB of data before showing the dialog for the Zim selection. I.e. this happens without a Zim file opened.
This is annyoing because I have used Kiwix in the past due to my limited amount of mobile data. I have 1024 MB of mobile data available every 30 days. So Kiwix "consumes" ~1% of my data each time I open the app.
If Kiwix loads so much data on startup, the concept of an "offline" reader is broken. This renders Kiwix useless for this "data saving" scenario, and it it is better to use the online Wikipedia instead for a quick Wikipedia query.
Of course one could turn of mobile data before opening Kiwix. But this isn't really comfortable.

I hope you an reproduce the bug.
Thank you.

Best regards

Schmidt32

bug duplicate question

Most helpful comment

Ah, no worries @Schmidt32 thanks for the report and providing the dissection of the issue faced by you :+1: I think we can close it since it longer exists.

All 21 comments

@Schmidt32 Thank you for your feedback.

This amount of data corresponds to the online catalogue. But:

  • Since 3.4.3 you should have been asked if you want to download content via Wifi only (or not)
  • You can change this feature in the settings.

As a consequence, I'm surprised that you consume mobile data without having been noticed. Would you be able please to confirm that the settings "Download content only via WiFi" is on "off"?

@kelson42 In my case it happens if I set to download content via WIFI is false. In this, it downloads all the content of all the zim files even if I'm not in the download fragment(screen).

The more convenient approach would be even though the user selected download content via mobile data. Kiwix will download the content if the user goes to the download screen.

@kelson42 In my case it happens if I set to download content via WIFI is false. In this, it downloads all the content of all the zim files even if I'm not in the download fragment(screen).

Yes, works as designed. If you don't set "Download content only via WiFi", then it downloads both catalogue+ZIM files via mobile data as well. No bug here.

From my perspective it is a bug.

I download my only ZIM file (Wikipedia German "full", ~34GB) on my PC and then I copy it on my smartphone, because this approach is much faster than the download on the smartphone directly.
Despite not needed in this scenario, the setting "Download only via WLAN" is set on my smartphone (just for "safety" reasons to avoid accidently using mobile data).

When I open Kiwix, it consumes data already when showing the selection screen with the single downloaded ZIM file. I.e. the data is consumed before I open this ZIM file. This happens also in a WLAN environment. In this case it consumes the mentioned amount of WLAN data instead of mobile data.

It is already annoying that I have to select the (single) ZIM file on each startup. In the past this was done automatically. But with this "semi offline" approach of Kiwix I really consider not using it anymore.

Please fix. Thank you.

@Schmidt32 If you have "wifi only" turned on, nothing should be downloaded when you don't have wifi. From your report, so far, it is unclear if it does or not.

Concerning the fact that you have to go through the library each time you open Kiwix, this is clearly a regression. Tracked at #2567.

It loads the mentioned amount of data (~9 MB) also when Wifi only is turned on, and I am not at home (i.e. I don't have my home WiFi available and am in a 4G mobile network). This was the trigger for my original post.
See screenshot taken after opening Kiwix without any further action (taken at home with WiFi enabled, but the same amount of data is used in a 4G mobile network).
Screenshot

@abdulwd @mhutti1 @s-ayush2903 @gouri-panda @rashiq It looks like the WIFI check is wrong, it checks if the wifi is activated and it should check that Android downloads effictively through the wifi. Would you be able to confirm please?

Dear @kelson, let me put the functionality of only-wifi preference in a clear way:
When the application is launched for the very first time and user navigates to downloads screen, a dialog appears which says as depicted in the screenshot attached, when user chooses "Yes", that dialog never appears(unless you go back to settings and turn on that preference), and I believe this would be the case with @Schmidt32, they might have selected "Yes" when the dialog popped up for the very first time unbeknownst of their knowledge and now are facing the problem. When only wifi pref is enabled, it never uses mobile data for downloading or loading content. If _only-wifi_ pref is enabled but wifi is off then it shows the only-wifi dialog and, if user responds in "Yes" to that dialog, then mobile data is used; but it does not uses mobile data and shows "No Network Connection" message when user response is "No". The case with the issue is the one that I mentioned earlier, @Schmidt32 can verify us the exact same state of the third preference in settings screen(i.e., their _Download content only via WiFi_ is disabled on their mobile inside kiwix) from kiwix in their device matches with the one in the screenshot attached at the RHS. I hope this clarifies the functionality of the only-wifi pref, which is irrespective of the state of wifi(whether enabled or the contrast case), let me know if I can be of help, Thanks.

|KiwixWifiOnlyDialog|KiwixWifiOnlyPref in Settings section from NavDrawer|
|-|-|
|KiwixOnlyWifiDialog|KiwixWifiOnlyPref|

And yeah, I would say it does consumes data on launches as we download the entire book catalog at once, not in chunks. We'll be able to fix it via loading data in chunks but that is something which we'll be able to achieve when we'll be using the OPDS catalog, they have a pretty nice supporting api!

Here your are:
Screenshot

And just to mention it:
I have WiFi and Mobile Data always enabled on my smartphone. I never disable one of these manually. When I leave my home, and my home WiFi gets out of reach and so the connection gets lost, then mobile networks takes over automatically and seamlessly. Nonetheless also WiFi is enabled in this "mobile data only" situation because I want to connect to my home WiFi automatically when I come back home.

Oh yeah, that is completely coherent with the screenshot you attached of your data usage, I didn't go through that screenshot previously, just read the report and it felt that you're concerned for your mobile data being used instead of wifi. So yeah only wifi functionality does work fine. What's the issue you're facing then, is it only about the amount of data being used in launches no matter whether it is mobile-data or wifi?

@s-ayush2903 The problem is that it consumes mobile data even if wifi only is activated. This is what has been clearly reported and now we need to confirm/reproduce the problem.

If we find the logs then that would be very helpful to diagnose. I belive it may be causing by mobile manufacture. Samsung always customizes stock Android's API level more than any other company do.

@Schmidt32 Have you encountered this issue before 3.4.3?

The problem is that it consumes mobile data even if wifi only is activated.

I've clearly verified and stated in my very first comment here that this behavior does not exist. Also this is visible from the data usage screenshot & only-wifi pref screenshot attached by author here; kiwix consumes a total of 8.66MB data from wifi out of which 8.48MB is received and 0.18MB is sent

That's weird: Now I cannot reproduce the problem anymore :-( I have manually turned off WiFi in my router, and it does not consume mobile data anymore.

I have initially detected the problem during a hospital stay (Nov 12-16) last year, and I've used Kiwix multiple times per day there, closing it each time after usage. I didn't have WiFi in the hospital (rather expensive), but it was enabled in the settings nonetheless. There I have found the issue with the mobile data usage because Kiwix has consumed much of my mobile data in the hospital unexpectedly.
I cannot say which version I had at this time. But I have definitively updated all my apps before going to the hospital, i.e. on Nov 12 in the morning C.E.T.. So maybe it was a version before the current one 3.4.3?

I'm also sorry that I have wasted your time with that. Maybe I should have reported it earlier so that the conditions are the same. But this chance is gone now.

I have also updated my smartphone yesterday from Android 10 to Android 11. Maybe this could also have caused the correct funtioning now.

Again: I have to apologize myself for wasting your time. And I thank you for your effort for trying to solve this. But the issue was definitively there. Otherwise I wouldn't have spent so much time with this report and with answering in this thread.

Ah, no worries @Schmidt32 thanks for the report and providing the dissection of the issue faced by you :+1: I think we can close it since it longer exists.

@Schmidt32 The bug has been fixed in 3.4.3. Considering that it has been released in December, you have been impacted by it in November.

Was this page helpful?
0 / 5 - 0 ratings