Some website might be snapshotted too early for last N |
||||||||
Issue descriptionVersion: 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.
,
Jul 11 2016
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.
,
Jul 11 2016
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?
,
Jul 11 2016
[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.
,
Jul 13 2016
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.
,
Jul 13 2016
... the original bug detail shows the offline indication so don't think I am getting proper repro after all.
,
Sep 23 2016
,
Sep 23 2016
,
Sep 29 2016
Another RMD/SnapshotController use case to keep in mind.
,
Jan 26 2017
,
Feb 28 2017
This bug is mostly about investigation, and might not make a good fixit candidate. Removing hotlist=fixit
,
Feb 27 2018
Issue 671673 has been merged into this issue.
,
Feb 27 2018
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 |
||||||||
Comment 1 by dim...@chromium.org
, Jul 11 2016