New issue
Advanced search Search tips

Issue 650781 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

onProgressChanged doesnot hit 100% on heavy sites

Reported by gajayrag...@gmail.com, Sep 27 2016

Issue description

Example URL:
bbc.com , cnn.com

Steps to reproduce the problem:
1. launch a webview based application with chrome / webview 53 installed
2. load bbc.com or cnn.com
3. wait for the page load to complete

What is the expected behavior?
onProgressChanged() gets called from the start of the page till it reaches 100

What went wrong?
the page load is complete and WebViewClient.onPageFinished() is called. But the progress reported at WebChromeClient.onProgressChanged() stops at around 94-98 but never hits 100.

Did this work before? Yes Chrome/WebView version 53

Chrome version: 53  Channel: stable
OS Version: 
Flash Version: 

I've a webview based application and the progress bar for loading is tied to the onProgressChanged() callback in the WebChromeClient. Until like a week back, things were all fine. But now, it never hits 100% page load. On investigation, i found that it still works fine on a device or lower were the webview/Chrome version is 51. but it fails on a similar device where the webview/Chrome version is 53. i even tested with Chrome beta 54 installed and it still seems to be broken with the WebViewClient.onProgressChanged() callback as it never hits 100%.

but this happens only on heavy sites. like bbc, cnn, npr.com etc.. yahoo, google, bing etc still loads fine and progress reported reaches 100%.

this happens on all native webview based browsers i guess. It happens in Javelin, Maxathon browser and also in my webview based app. 

I've attached the progress bars stuck before 100 in the 3 webview based browser I've installed in my nexus 5 running Marshmallow and 54 chrome beta installed. Same screenshots apply for Chrome 53 which was released early this month.
 
Screen Shot 2016-09-27 at 3.27.16 PM.png
16.5 KB View Download
Screen Shot 2016-09-27 at 3.26.45 PM.png
14.0 KB View Download
Screen Shot 2016-09-27 at 3.26.28 PM.png
12.7 KB View Download
I apologize for the wrong component. 
this should be under component:Mobile>WebView
Cc: japhet@chromium.org
Components: -Internals>Network Blink>Loader Mobile>WebView
-Internals>Network + Blink>Loader

also cc japhet who has been experimenting with the progress bar.
Did this work before? Yes Chrome/WebView version 51.. not 53.
Is anyone facing the same issue ? Is there a workaround please ?

Comment 5 by boliu@chromium.org, Oct 11 2016

Labels: -Pri-2 M-55 ReleaseBlock-Stable Pri-1
Status: Available (was: Unconfirmed)
I can reproduce this in trunk. The last update to WebChromeClient.onProgressChanged (this is a java method in android) is 98, after onPageFinished.

Let's get this fixed in m55
Awesome ! thanks.

Comment 7 by boliu@chromium.org, Oct 11 2016

bisecting this is weird, because behavior is not always consistent.

54.0.2783.0 is the first build that definitely has this bug where progress never gets to 100.

But the previous build, 54.0.2783.0, the behavior seems to be that onProgressChanged is updating non-stop between 0 and 100, after onPageLoaded, and looking at devtools, page is still loading tons of ad resources. So seems like onProgressChanged started reporting subresources. In case this rings any bells for anyone..

Comment 8 by boliu@chromium.org, Oct 11 2016

Bahhhh, typing version numbers by hand is a bad idea.

53.0.2783.0 is the first broken version, and 53.0.2782.0 is the one with the weird subresource behavior

Comment 9 by boliu@chromium.org, Oct 12 2016

Owner: japhet@chromium.org
Status: Assigned (was: Available)
aha, indeed bisected down a CL from japhet's: https://codereview.chromium.org/1860743002
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa70a46d3bfff89100ab5732812dbb7a8dac7953

commit aa70a46d3bfff89100ab5732812dbb7a8dac7953
Author: japhet <japhet@chromium.org>
Date: Thu Oct 13 21:59:47 2016

Don't update progress when Frame::isLoading() is false

This can lead to spurious progress change notifications, which can lead to underestimatation of progress, even at the time when the only page is complete.

This was regressed in https://codereview.chromium.org/1860743002

BUG= 650781 

Review-Url: https://codereview.chromium.org/2412803004
Cr-Commit-Position: refs/heads/master@{#425178}

[modify] https://crrev.com/aa70a46d3bfff89100ab5732812dbb7a8dac7953/third_party/WebKit/Source/core/loader/ProgressTracker.cpp

Labels: Merge-Request-55
This was a nice, simple fix. Should be pretty safe to merge.

Comment 12 by dimu@chromium.org, Oct 14 2016

Labels: -Merge-Request-55 Merge-Approved-55 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M55 (branch: 2883)
Project Member

Comment 13 by bugdroid1@chromium.org, Oct 14 2016

Labels: -merge-approved-55 merge-merged-2883
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/931e8cb4d9bcc1a1864e8d513487b3eb36d2ecf8

commit 931e8cb4d9bcc1a1864e8d513487b3eb36d2ecf8
Author: Nate Chapin <japhet@chromium.org>
Date: Fri Oct 14 22:39:36 2016

Don't update progress when Frame::isLoading() is false

This can lead to spurious progress change notifications, which can lead to underestimatation of progress, even at the time when the only page is complete.

This was regressed in https://codereview.chromium.org/1860743002

BUG= 650781 

Review-Url: https://codereview.chromium.org/2412803004
Cr-Commit-Position: refs/heads/master@{#425178}
(cherry picked from commit aa70a46d3bfff89100ab5732812dbb7a8dac7953)

Review URL: https://codereview.chromium.org/2414423003 .

Cr-Commit-Position: refs/branch-heads/2883@{#124}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/931e8cb4d9bcc1a1864e8d513487b3eb36d2ecf8/third_party/WebKit/Source/core/loader/ProgressTracker.cpp

Status: Fixed (was: Assigned)
Thank you !

Comment 16 by aluo@chromium.org, Oct 18 2016

Verified on Nexus 6 using NRD91N, build 55.0.2883.18 Monochrome and www.nbc.com.  www.cnn.com  doesn't reliably finish loading, I did some logging and there are some pending onPageFinished so I think that site is perhaps loading some frames that never finish, not 100% sure what's happening.

Comment 17 by aluo@chromium.org, Oct 18 2016

Checked that www.cnn.com never finishes loading and confirmed with Nate that it is not related to this bug.  So pending verification on M56 then status can be updated to Verified.
Project Member

Comment 18 by bugdroid1@chromium.org, Oct 27 2016

Labels: merge-merged-2840
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/931e8cb4d9bcc1a1864e8d513487b3eb36d2ecf8

commit 931e8cb4d9bcc1a1864e8d513487b3eb36d2ecf8
Author: Nate Chapin <japhet@chromium.org>
Date: Fri Oct 14 22:39:36 2016

Don't update progress when Frame::isLoading() is false

This can lead to spurious progress change notifications, which can lead to underestimatation of progress, even at the time when the only page is complete.

This was regressed in https://codereview.chromium.org/1860743002

BUG= 650781 

Review-Url: https://codereview.chromium.org/2412803004
Cr-Commit-Position: refs/heads/master@{#425178}
(cherry picked from commit aa70a46d3bfff89100ab5732812dbb7a8dac7953)

Review URL: https://codereview.chromium.org/2414423003 .

Cr-Commit-Position: refs/branch-heads/2883@{#124}
Cr-Branched-From: 614d31daee2f61b0180df403a8ad43f20b9f6dd7-refs/heads/master@{#423768}

[modify] https://crrev.com/931e8cb4d9bcc1a1864e8d513487b3eb36d2ecf8/third_party/WebKit/Source/core/loader/ProgressTracker.cpp

Comment 19 by dimu@google.com, Nov 4 2016

Labels: -merge-merged-2840
[Automated comment] removing mislabelled merge-merged-2840

Sign in to add a comment