Page MenuHomePhabricator

Page loading stops working if WebView is closed before page is completely loaded
Closed, ResolvedPublic1 Estimated Story Points

Description

Steps to reproduce:

  • Go to the Explore Feed
  • Tap the Featured Article, so that it starts loading in the WebView.
  • Quickly tap Back, before the article finishes loading.
  • Tap the Featured Article again.

(you may need to do this a couple of times)

Expected:

  • The article loads.

Actual:

  • The WebView remains blank, and the activity remains in a "loading" state indefinitely.
  • What's worse: all future instances of the WebView no longer work, and the app needs to be terminated and restarted. (i.e. it's no longer possible to load a page from any other source.)

From my cursory investigation so far, when this condition is reached, the WebView simply stops responding to Bridge events. :(

Event Timeline

Dbrant triaged this task as Unbreak Now! priority.Aug 28 2017, 10:00 PM
Dbrant set the point value for this task to 1.

Maybe related to image lazy loading?

That was my first thought, but that doesn't seem to be the case: the behavior remains the same on much older patches. I'm kind of afraid that this is caused by a System WebView update...

Change 374433 had a related patch set uploaded (by Dbrant; owner: Dbrant):
[apps/android/wikipedia@master] Don't destroy WebView explicitly.

https://gerrit.wikimedia.org/r/374433

Change 374433 merged by jenkins-bot:
[apps/android/wikipedia@master] Don't destroy WebView explicitly.

https://gerrit.wikimedia.org/r/374433

ABorbaWMF subscribed.

Tested on a Nexus 4 with Android 5.1 and a Pixel with Android 7.1.1 on 2.6.203-alpha-2017-08-29

Works well for me. I tried a few day's worth of featured articles.

Dbrant claimed this task.