New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 626472 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Some website might be snapshotted too early for last N

Project Member Reported by jianli@chromium.org, Jul 7 2016

Issue description

Version: Canary
OS: Android

What steps will reproduce the problem?
(1) Enable "Offline recent tabs"
(2) Visit http://www.mitbbs.com when network is connected
(3) Check chrome://offline-internals which shows the snapshot is captured
(4) Disconnect network and go back

Offline copy is loaded. But it is very different from the one you just visited: a spinning icon is shown and a popup dialog saying "request failed" (in chinese).

If you take the offline screenshot via enabling bookmark cache feature, the offline page is captured much better.

Two screenshots are attached to show the difference.

It seems that for some website, we might need to wait a bit more, rely on other signal or capture another version.





 
last_n_screenshot.png
70.7 KB View Download
bookmark_cache_screenshot.png
491 KB View Download

Comment 1 by dim...@chromium.org, Jul 11 2016

Cc: talo@chromium.org petewil@chromium.org dougarnett@chromium.org
+Doug. I htink this is a first RMD bug with pictures attached, we can use it as tracking issue for the progress on RMD and quality of snapshots.
Owner: dougarnett@chromium.org
Status: Assigned (was: Untriaged)
Great to identify such a URL. Presumably this would be wanting some timeout after the onLoad event (which has none currently). I can try playing with this.
I reproduced this with a build that does some logging in the SnapshotController. I received the first 3 log messages very quickly and then the content ready very quickly after them. The last message is for the MaybeStartSnapshot 7 seconds after the *Available* event. 

07-11 14:54:50.328 I/chromium( 2032): [INFO:snapshot_controller.cc(52)] XXXX   SnapshotController::DocumentAvailableInMainFrame - schedule delay: 7000
07-11 14:54:50.785 I/chromium( 2032): [INFO:snapshot_controller.cc(63)] XXXX   SnapshotController::DocumentOnLoadCompletedInMainFrame
07-11 14:54:50.788 I/chromium( 2032): [INFO:snapshot_controller.cc(71)] XXXX   SnapshotController::MaybeStartSnapshot
07-11 14:54:57.331 I/chromium( 2032): [INFO:snapshot_controller.cc(71)] XXXX   SnapshotController::MaybeStartSnapshot

Two thoughts here: 

1. I expect adding a 1 second delay after the *OnLoadCompleted* would have captured better page; but more importantly:
2. Why didn't the 2nd MaybeStartSnapshot capture better page? Does last N support two snapshots? If so, could there be some issue with overriding the first one?
Owner: ----
Status: Available (was: Assigned)
[Update on 2 - expected that no snapshot taken after the one for OnLoad.]

Locally,I tried adding a 2 second delay after the OnLoad event and also enabled the 2nd snapshot for 7 secs after Available as a side effect. I do not see a good page offline even though both snapshot SavePage calls happen after I see expanded content on the screen. It looks like the SavePage calls are happening succesfully from these logs:

07-11 16:26:08.234 I/chromium(17265): [INFO:recent_tab_helper.cc(90)] XXXX   RecentTabHelper::DidFinishNavigation
07-11 16:26:08.273 I/chromium(17265): [INFO:snapshot_controller.cc(53)] XXXX   SnapshotController::DocumentAvailableInMainFrame - schedule delay: 7000
07-11 16:26:08.733 I/chromium(17265): [INFO:snapshot_controller.cc(64)] XXXX   SnapshotController::DocumentOnLoadCompletedInMainFrame - schedule delay: 2000
07-11 16:26:10.735 I/chromium(17265): [INFO:snapshot_controller.cc(78)] XXXX   SnapshotController::MaybeStartSnapshot
07-11 16:26:10.735 I/chromium(17265): [INFO:recent_tab_helper.cc(139)] XXXX   RecentTabHelper::StartSnapshot
07-11 16:26:10.763 I/chromium(17265): [INFO:recent_tab_helper.cc(169)] XXXX   RecentTabHelper::ContinueSnapshotAfterPurge - SavePage ...
07-11 16:26:10.895 I/chromium(17265): [INFO:recent_tab_helper.cc(179)] XXXX   RecentTabHelper::SavePageCallback  result:0  id:1518079707374636729
07-11 16:26:15.275 I/chromium(17265): [INFO:snapshot_controller.cc(78)] XXXX   SnapshotController::MaybeStartSnapshot
07-11 16:26:15.275 I/chromium(17265): [INFO:recent_tab_helper.cc(139)] XXXX   RecentTabHelper::StartSnapshot
07-11 16:26:15.313 I/chromium(17265): [INFO:recent_tab_helper.cc(169)] XXXX   RecentTabHelper::ContinueSnapshotAfterPurge - SavePage ...
07-11 16:26:15.432 I/chromium(17265): [INFO:recent_tab_helper.cc(179)] XXXX   RecentTabHelper::SavePageCallback  result:0  id:7659746194718148213

There may be some other issue here than snapshot moment detection. Maybe someone closer to Last-N should take a look at this one.

From encountering and exploring another bug (https://bugs.chromium.org/p/chromium/issues/detail?id=628029), I start to wonder if I was seeing a traditionally cached page in my experiments rather than an offline page. I repro-ed again on my N7 and I see the same spinner page rather than full page but I am not seeing the offline link indication in the omnibox so I think I just am not seeing what was saved as an offline page.
... the original bug detail shows the offline indication so don't think I am getting proper repro after all.
Labels: -Pri-3 Pri-2
Owner: dougarnett@chromium.org
Status: Assigned (was: Available)
Owner: petewil@chromium.org
Another RMD/SnapshotController use case to keep in mind.
Labels: Hotlist-Fixit
Labels: -Hotlist-Fixit
This bug is mostly about investigation, and might not make a good fixit candidate.  Removing hotlist=fixit
 Issue 671673  has been merged into this issue.
This is working as designed, but the design is not the best.
A better design which might fix this is to use the RMD resource percentage signal:  crbug.com/699313 

Sign in to add a comment