wallabag / android-app

Android application to read your articles saved in your wallabag. You can also easily add new articles.
https://www.wallabag.org
GNU General Public License v3.0
470 stars 260 forks source link

Glitches in airplane mode #1180

Open nwa573 opened 3 years ago

nwa573 commented 3 years ago

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

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!

di72nn commented 3 years ago

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 commented 3 years ago

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?

nwa573 commented 3 years ago

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 commented 3 years ago

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.

di72nn commented 3 years ago

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).

nwa573 commented 3 years ago

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.

di72nn commented 3 years ago

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

nwa573 commented 2 years ago

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.

di72nn commented 2 years ago

Here's how the app works:

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.