Bug 176855 - Unable to recover existing WKWebView after receiving callback from webViewWebContentProcessDidTerminate.
Summary: Unable to recover existing WKWebView after receiving callback from webViewWeb...
Status: RESOLVED DUPLICATE of bug 178095
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: Other
Hardware: iPhone / iPad iOS 11
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar, Regression
Depends on:
Blocks:
 
Reported: 2017-09-13 10:35 PDT by Logan Blevins
Modified: 2022-09-07 08:28 PDT (History)
8 users (show)

See Also:


Attachments
Demonstrates bug with web content process termination and web page rendering. (237.91 KB, application/zip)
2017-09-15 06:19 PDT, Logan Blevins
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Logan Blevins 2017-09-13 10:35:43 PDT
In previous versions of iOS (9 and 10), we have been able to reload the webview when it web content process is terminated by WebKit. Unfortunately, this behaves much differently when running on an iOS 11 device. Trying the same thing to recover on iOS 11, results in a partial web page rendering.

When reloading in this scenario, only the portion of the web view within it's parent view bounds is rendered. If you try scrolling down the page, you'll notice that anything below the top portion of the web page is not rendered at all. Then try navigating to a different URL or even loading a new request, yet the same result occurs. It seems that WebKit is trying to optimize too much. 

The only way I can fix this, is to destroy the WKWebView by setting it to nil and creating it once again, then loading a request with the previous URL that was cached. This webview destruction is a workaround. It is far form ideal. I assume this either a bug or a change in iOS 11 WebKit that needs attention, since it does not affect 9 or 10.

Please advise on the status of this bug.
Comment 1 Simon Fraser (smfr) 2017-09-13 11:24:25 PDT
Please attach a test application that shows this bug.
Comment 2 Radar WebKit Bug Importer 2017-09-13 11:27:29 PDT
<rdar://problem/34415016>
Comment 3 Logan Blevins 2017-09-15 06:19:49 PDT
Created attachment 320896 [details]
Demonstrates bug with web content process termination and web page rendering.

Please check out the README in the project.
Comment 4 Logan Blevins 2017-09-22 13:05:34 PDT
Any headway with this?

I can provide more detail if needed.
Comment 5 Chris Dumez 2017-10-06 10:39:32 PDT
I am unable to run the test app on iOS 11:
dyld: Library not loaded: /System/Library/PrivateFrameworks/Swift/libswiftSwiftOnoneSupport.dylib
  Referenced from: /Applications/WKWebViewBugSample.app/WKWebViewBugSample
  Reason: image not found
Comment 6 Chris Dumez 2017-10-06 11:02:48 PDT
(In reply to Chris Dumez from comment #5)
> I am unable to run the test app on iOS 11:
> dyld: Library not loaded:
> /System/Library/PrivateFrameworks/Swift/libswiftSwiftOnoneSupport.dylib
>   Referenced from: /Applications/WKWebViewBugSample.app/WKWebViewBugSample
>   Reason: image not found

Nevermind, worked around it.
Comment 7 Chris Dumez 2017-10-06 12:30:25 PDT
I can now run the test app on iOS 11. If I open many tabs and switch quickly through them, I do see that some of them are getting jetsam'd and that they are white for a second before reloading. However, once reloaded, I can scroll through the tab just fine.

So far, I have not been able to reproduce the issue that was reported.
Comment 8 Chris Dumez 2017-10-06 16:53:37 PDT
(In reply to Chris Dumez from comment #7)
> I can now run the test app on iOS 11. If I open many tabs and switch quickly
> through them, I do see that some of them are getting jetsam'd and that they
> are white for a second before reloading. However, once reloaded, I can
> scroll through the tab just fine.
> 
> So far, I have not been able to reproduce the issue that was reported.

It is not 100% reproducible but I was able to reproduce it.
Comment 9 Chris Dumez 2017-10-09 18:59:07 PDT

*** This bug has been marked as a duplicate of bug 178095 ***
Comment 10 Chris Dumez 2017-10-09 18:59:27 PDT
Should be fixed now, thanks for the test app.
Comment 11 Logan Blevins 2017-10-09 19:13:04 PDT
No problem. Thank you!
Comment 12 Logan Blevins 2017-10-23 14:11:46 PDT
When will this revision of webKit be dropped into public iOS?
Comment 13 Brent Fulgham 2017-10-23 14:21:48 PDT
(In reply to Logan Blevins from comment #12)
> When will this revision of webKit be dropped into public iOS?

We are not allowed to make comments about unreleased products.