android-app icon indicating copy to clipboard operation
android-app copied to clipboard

Glitches in airplane mode

Open nwa573 opened this issue 3 years ago • 9 comments

I've been experiencing a few issues when using the app in airplane mode; I have two Android devices, and this happens only on one of them.

First, some articles load only partially, or take several minutes to load completely. For example, I saved this article to Wallabag: https://www.nytimes.com/2021/06/30/sports/tennis/wimbledon-grass-court-safety-serena-williams.html When I switched to airplane mode and tried to read it, only the first two paragraphs showed up, followed by Loading... After several minutes, the rest of the article loaded.

Second, my reading position either isn't saved or is very slow to load in airplane mode. That is, if I do the following in airplane mode:

  1. Pick an article and read it partway
  2. Go back to list of articles
  3. Select the previous article I'm shown the beginning of the article, not wherever I read to before. If I continue reading for a few minutes, the position jumps, as if it's trying to return me to the saved position.

Environment details

  • wallabag app version: 2.4.3 (229)
  • wallabag app installation source (e.g. Gplay, F-Droid, manual): Google Play
  • Android OS version: 6.0.1
  • Android ROM (e.g. stock, LineageOS, SlimRom,…): stock
  • Android hardware: Nexus 7
  • wallabag server version: wallabag.it

I also have a Pixel running Android 10 which doesn't experience either of these issues. I totally understand if it's not worth the effort of fixing an issue that seems to be due to a super old Android version, but I figured I might as well ask, since I really enjoy prefer using Wallabag on the Nexus 7.

Thanks for all of your hard work in building this app!

nwa573 avatar Jul 01 '21 15:07 nwa573

Thanks for the report!

Both of the problems seem to be caused by a delayed "onPageFinished()" call from WebView. Most likely it's trying to load images even though there's no internet.

I'll try to look into it the next time I deal with the code related to that.

di72nn avatar Jul 09 '21 08:07 di72nn

I can't reproduce it with Android 5 & 6 emulators. Did it start with 2.4.3? If not, can you test different versions to see if it started with any one in particular?

di72nn avatar Aug 08 '21 17:08 di72nn

I just downgraded to 2.4.2 and confirmed that neither of these issues happen in 2.4.2, so it must have started with 2.4.3. Thanks for looking into it!

nwa573 avatar Aug 09 '21 18:08 nwa573

After using 2.4.2 for a day, I did encounter one airplane mode glitch: I saved https://www.nytimes.com/2021/08/10/dining/american-grocery-stores-ethnic-aisle.html but if I open it in airplane mode, only the first 2 paragraphs load. So, then I downgraded to 2.4.1, and I have the same issue with this article.

(But, in general, my sense is that I was experiencing this issue much more frequently with 2.4.3.)

However, I haven't encountered any issues with the reading position in airplane mode in 2.4.2.

nwa573 avatar Aug 11 '21 23:08 nwa573

Can you test a "nightly build"? I think maybe #1192 also fixed this.

wallabag-33439c6c.zip (signed with a different certificate, so not updateable with/from either F-Droid or GPlay build).

di72nn avatar Sep 07 '21 18:09 di72nn

I've tried the nightly for a few hours; all articles seem to load fully in airplane mode (along with preview pictures, which used to be missing most of the time).

My reading position is generally saved, but not always. I'm not sure if it has to do with the length of the article, but here's an article I'm experiencing this on: https://www.newyorker.com/magazine/1946/08/31/hiroshima I've read partway through, and if I select it when I'm on the network, it opens at the last position I read. But if I select it while in airplane mode, it shows me the beginning of the article.

nwa573 avatar Sep 12 '21 18:09 nwa573

Can you check whether this last problem is reproducible with 2.4.2?

di72nn avatar Sep 13 '21 16:09 di72nn

In 2.4.2, when I pick an article in airplane mode, it almost always shows me the beginning of the article, no matter how far I've previously read.

I haven't identified any clear patterns, but I've noticed that, sometimes when I load an article in airplane mode, if I scroll to the bottom, the very bottom says "Loading..." instead of having the "MARK AS READ" button. I think that articles that display "Loading..." are the ones that don't show my correct reading position, but I haven't tested this extensively.

nwa573 avatar Sep 18 '21 18:09 nwa573

Here's how the app works:

  • First it displays "Loading..." and starts loading article content into the WebView.
  • When the WebView reports that the page is loaded, the app replaces the "Loading..." label with the prev/next/mark-as-read buttons and restores reading position (if that data is present). Usually, the WebView loads content quite quickly, so you don't see "Loading..." or the beginning of the article for long.

It would be good to figure out whether the "nightly" build is as good as 2.4.2 (i.e. the regressions present in 2.4.3 are fixed). The problems present in both 2.4.2 and "nightly" are of a lower priority.

di72nn avatar Sep 20 '21 10:09 di72nn