turbolinks/turbolinks-ios

Blank White Screen on Resume

Opened this issue · 1 comments

Hi,

I've observed this behavior occasionally:

  1. Launch my turbolinks-ios app
  2. Exit the app and do other stuff on the device for a while
  3. Come back to the app

Sometimes at this point there is a blank white screen. This can either be resolved using pull-to-refresh, or force quitting and relaunching the app.

I'm guessing just the WKWebView part of the app is being purged from memory or crashed, because when the entire app is purged, it successfully reloads.

There's a delegate method on WKUIDelegate called webViewWebContentProcessDidTerminate, which claims that it's:

Called when the web view’s web content process is terminated.

I've seen other reports that it only gets called when the app is in the foreground, so doing this has no effect:

func webViewWebContentProcessDidTerminate(_ webView: WKWebView) {
    webView.reload()
}

This is hard to reproduce, so I guess what I'm asking is if anyone has come across this issue and had any success recovering from it?

Thanks for turbolinks-ios, it's a great project!

This is hard to reproduce, so I guess what I'm asking is if anyone has come across this issue and had any success recovering from it?

I’m experiencing the same thing, but haven’t had any success recovering from it.