openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Android app stops loading new pages

Open bilch opened this issue 1 year ago • 2 comments

Problem

Whenever I am reading a OL book in the (official, Internet Archive) Open Library Android app, it will not reliably load subsequent pages. I will be stuck at an empty page and the next pages will not load no matter how long I wait. As a workaround I've found that if I switch to the multi-page view (the "4 pages" icon at the bottom) the missing pages will load. I believe this mostly happens when the internet connection is less than ideal. In bad conditions I will get stuck after maybe five pages, in better conditions only a few time per book. But it does happen with every book (and only in the app). It feels as if in the single-page view the app tries exactly once to load the next page and then, after a too-short timeout, doesn't try again.

Evidence / Screenshot

Relevant URL(s)

Reproducing the bug

  1. Try to read book in Android app, single-page view
  • Expected behavior: When I scroll to next page, that page should load (or preferrably, already have been pre-loaded).
  • Actual behavior: Next page stays empty, as do the following pages, and will show loading indicator forever.

Context

  • Official Open Library beta app ("by Internet Archive") for Android
  • Currently running Android 13 but problem was identical with previous phone, ca. Android 10 or 11
  • Logged in (Y/N): Y

Notes from this Issue's Lead

Proposal & constraints

Related files

Stakeholders

Note: Before making a new branch or updating an existing one, please ensure your branch is up to date.

bilch avatar May 29 '24 10:05 bilch

Hi @bilch , could you post the links to the books you're experiencing this problem with? Are you experiencing this issue for all books?

Also, have you always experienced this issue, or was this something new? I wonder if it might be related to the DDOS attacks we had recently. Is this problem still occurring consistently?

cdrini avatar May 29 '24 19:05 cdrini

All books, has been like this for 1-2 years.

bilch avatar Jun 05 '24 09:06 bilch

Alas, thanks for the report @bilch :/ We will investigate when we get the time.

cdrini avatar Aug 19 '24 13:08 cdrini

@bilch is this still a problem? Should we make this a P1 or close it?

mekarpeles avatar Dec 26 '24 17:12 mekarpeles

Yes, this is still a problem with every book I read. Some more testing: It only seems to happen when zoomed in. (The scanned pages are hard to read on a phone, so I usually zoom in a bit to use the full screen width.) You might be able to reproduce it this way, since it happened on several different Android phones.

bilch avatar Dec 30 '24 13:12 bilch

Investigating on https://play.google.com/store/apps/details?id=org.openlibrary.testing.twa&hl=en_US...

mekarpeles avatar Jan 02 '25 00:01 mekarpeles

Is there any way you can take a screen shot of what you're experiencing? I am still unable to reproduce.

mekarpeles avatar Jan 02 '25 00:01 mekarpeles

01: No zoom (the standard view) 01

02: Slightly zoomed in for better readability (page 9) 02

03: After the bottom of page 11, no more pages 03

04: I scroll down, nothing 04

05: I zoom out 05

06: I switch from "one page" to "many pages" view; the pages load 06

07: I switch back to "one page" view (I am back to page 9 now, it seems the app doesn't know I should be on page 12). I read on. 07

08: On page 78 it happens again (I'm surprised it took so long in this test; usually I have to repeat the process more frequently) 08

bilch avatar Jan 02 '25 16:01 bilch

Updated theory: I no longer think it's due to a bad internet connection. This test was done in ideal conditions. I now believe it's the reading while zoomed in that does it. (It's the same or worse in landscape view since that also requires manual zooming in, so "just rotate your phone" is not a workaround.)

bilch avatar Jan 02 '25 16:01 bilch

Incredibly helpful, thank you @bilch. We'll see if maybe there's something about how bookreader is loading in worker / service threads that's causing this issue.

mekarpeles avatar Jan 14 '25 22:01 mekarpeles

Ohhhh interesting I think I know what the issue is!

I think what's happening is that the pinch zoom is happening outside of book reader, can you try two things for me?

  1. Click on the triple-dot icon in the top right, and take a screenshot of the menu there. That'll let me see what browser is being used to render the book. I think this might perhaps be an issue with Samsung Internet browser.

  2. When you pinch zoom, does the toolbar at the bottom of the screen get bigger? It should not. When you pinch zoom, where are you pinching/zooming?

cdrini avatar Mar 07 '25 02:03 cdrini

  1. Chrome (though my default browser is Firefox)
  2. It does get bigger. I zoom in no particular spot, they all behave the same.

Image Image Image

bilch avatar Mar 07 '25 08:03 bilch

Very odd... For reference, this is what's expected to happen:

https://archive.org/details/notredamedeparis0000unse/page/6/mode/1up?ref=ol&view=theater

https://github.com/user-attachments/assets/baff60a4-a40a-43c1-8ba1-ebcafbf36b39

cdrini avatar Mar 07 '25 17:03 cdrini

@bilch Can you check if you also have the issue here: https://lucid-poitras-9a1249.netlify.app/bookreaderdemo/demo-internetarchive?ocaid=theworksofplato01platiala&view=theater#page/50

When you pinch zoom in Firefox? in Chrome? Does the toolbar also get larger?

If that doesn't reproduce the issue, can you try going to here: https://openlibrary.org/people/ScarTissue . That should open in the PWA. And then click the "BookReader Test" link, and see if the issue is present there.

cdrini avatar Mar 08 '25 20:03 cdrini