Bug 148685
Summary: | [iOS8/9] WKProcess crashes leaving WKWebView instance blank | ||
---|---|---|---|
Product: | WebKit | Reporter: | Stephan Leroux <sleroux> |
Component: | WebKit2 | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | aaron.train, andersca, ap, lollollipop878, sam, stefan |
Priority: | P2 | ||
Version: | Other | ||
Hardware: | iPhone / iPad | ||
OS: | iOS 8.4 |
Stephan Leroux
Hey WebKit team,
I've been combing through the issues on here to see if this issue I'm seeing manifests itself in one of the bugs already filed but couldn't find an exact mapping so I figured I would post what I'm seeing and maybe get some help as to what the cause could be related to and a potential workaround.
Our app creates a WKWebView for each 'tab' a user has open where each contains a url and content the user has navigated to. After the app has sat in the background for ~1 hour, when the user returns to the app, there is a chance that one of the WKWebViews becomes blank and the url is gone with no way to recover. Some research has concluded that the WKProcess probably gets terminated in some way and the UIProcess WKWebView instance can't recover from it which leaves our WKWebView in this blank state. I've created a sample project and attached a more formal STR:
Sample project: https://github.com/sleroux/WKWebViewTest
STR:
1. Launch sample app
2. Navigate to any url for each of the segmented WKWebViews
3. Leave the app in the background for >= 1 hour
4. Return to the app
Expected:
WKWebView content should reload and display previously shown content
Actual:
WKWebView blanks out content and it's URL becomes nil with no way to recover
Notes:
1. Strangely, we've only been able to reproduce this on our TestFlight builds but not our distribution/enterprise or dev builds. The only thing I could think of that would be different is the difference in permissions between a TestFlight/App Store app and a dev/Ad Hoc build
2. Not sure if it's a coincidence but this seems to happen more frequently on older devices (5/5s) than newer ones (6/6+)
Lastly, we've tried some workarounds to this issue but haven't found anything that sticks. Additional discussion regarding the workarounds and this bug can be found here: https://bugzilla.mozilla.org/show_bug.cgi?id=1194726
Thanks for the help in advance! We'd really love to at least find a workaround for this.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Stefan Arentz
More people struggling with this: http://stackoverflow.com/questions/31994919/how-to-determine-why-wkwebview-is-crashing