SimonHalvdansson / Harmonic-HN

Modern Android client for Hacker News
https://play.google.com/store/apps/details?id=com.simon.harmonichackernews
Apache License 2.0
611 stars 40 forks source link

Integrated WebView blank after unfolding #134

Open daguej opened 9 months ago

daguej commented 9 months ago

On my Pixel Fold, when I open an item and view the page in the integrated WebView, then unfold the device, the view goes blank and appears to be stuck in a loading state.

eg:

Screenshot_20231129-131130

Screenshot_20231129-131303

The page will never load. Clicking the refresh button does not work. The only way to see the content is to go back to the main list (which in a separate bug, does not maintain its scroll position) and re-open the item.

This bug does not reproduce 100% of the time. From a little experimentation, it seems like the timing of unfolding matters: if you unfold immediately after opening an item, the content is usually visible, but if you wait a few seconds (perhaps because you started reading) then unfold, then the view is almost always blank.

SimonHalvdansson commented 9 months ago

This might be related to a very non-well defined issue - the WebView often stops loading at 70% progress for no apparent reason. Due to the issue you linked, unfolding means the WebView has to reload so it might just be failing to load as it sometimes does randomly.

daguej commented 9 months ago

FWIW, I've never noticed the WebView get stuck at 70% in any situation other than after an unfold.

SimonHalvdansson commented 9 months ago

Okay interesting, I will keep this issue separate in that case