New issue
Advanced search Search tips

Issue 659816 link

Starred by 3 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 3
Type: Task



Sign in to add a comment

Early page scripts are sometimes not injected after fast back/forward navigations via WKBackForwardListItems.

Project Member Reported by kkhorimoto@chromium.org, Oct 26 2016

Issue description

We've seen this occur when navigating a WKWebView via its WKBackForwardList to pages created or affected by pushState() and replaceState(); an Apple radar will be filed for this issue.
 
Description: Show this description
Cc: kkhorimoto@chromium.org
Owner: ----
Status: Available (was: ExternalDependency)
This happens flakily in non-test environments.  It seems to happen for fast back/forward BFLI navigations when a page hasn't finished loading yet.  I tried to reproduce in a test app for a radar, but it doesn't seem to be happening.  Maybe this is due to the size and complexity of our early injection script?  Or it might be that the script is failing somehow before our window.history overrides are injected.

Sample app is attached.
EarlyPageScriptInjectionBug.zip
115 KB Download
If we can not reproduce this with test app, then perhaps the bug is not in WKWebView, but it Chrome. Kurt, please revisit this bug, once synchronous pushState/replaceState is implemented.
Labels: -Type-Bug Type-Task
Cc: mrefaat@chromium.org
Kurt or Mohammad, could you please file radar for this bug.
Labels: Proj-WKBackForwardList
Labels: -Proj-WKBackForwardList
Cc: michaeldo@chromium.org
We found the root cause. For fast back forward navigations the page is retrieved from the cache and scripts are already present on the page. This can be closed after Legacy navigation code removal.
Components: Mobile>iOSWeb
Components: -Mobile>WebView>Glue
Components: -Mobile>iOSWeb Mobile>iOSWeb>ScriptInjections

Sign in to add a comment