Open mentoxska opened 5 years ago
Have you implemented all the WKWebView
delegate methods and logged all possible errors from there? We had some intermittent failures in the past that were solved by implementing this method func webViewWebContentProcessDidTerminate()
- https://developer.apple.com/documentation/webkit/wknavigationdelegate/1455639-webviewwebcontentprocessdidtermi, which tells the app if the underlying process was terminated for some reason. If so, we automatically reload. I'm not sure why the manual button doesn't work though, calling session.reload()
should do the trick.
It seems that if I want to go from this screen with infinite loading indicator to anywhere else (dashboard with tasks or profile buttons at top panel), I 'll get white blank screen. When I wait until I get the errorView (image 3), I am able to reload (as retry button doesn't do anything else then session.reload() I guess?), so there must be some ongoing process which I couldn't interrupt by calling session.reload(). Are there any other methods I could call here to stop loading the visitable and get to the finished state where I am not frozen? Thank you
Calling session.reload()
should cancel any existing visits. I haven't seen this exact issue, so I can't really say what's happening without some more debugging info. I'd add a bunch of local logging as well as checking out server logs and see if you can narrow down where this is failing (i.e. - if it's not hitting your server at all, or just not processing the server response, etc).
We are hitting this exact problem. A HTTP -1 response. It is seemingly random, almost impossible to reproduce but you are guaranteed to hit it in our app 1 out of every 15 - 30 sessions.
I've been lucky where I've been able to watch the server logs while it happened once. I was very surprised to find that there was no request made to the server! So it seems like this supports the case to hook in to webViewWebContentProcessDidTerminate
.
Hello, we are building an app based on Turbolinks and Turbolinks-ios frameworks. The problem here we are facing is that when I sometime (happens like 1/10 visits) click on one of the tasks (image 1), I will get stuck on infinite loading indicator screen. Tasks screen![Tasks](https://user-images.githubusercontent.com/27786746/47722012-b4e26e00-dc51-11e8-9be5-932395e41f27.jpg)
Stuck at infinite loading indicator![wheel](https://user-images.githubusercontent.com/27786746/47722113-efe4a180-dc51-11e8-8262-b221fe6279c3.jpg)
If I'm waiting like 10 minutes I 'll get this, retry button reloads the visitable and I can continue.![err](https://user-images.githubusercontent.com/27786746/47722167-0985e900-dc52-11e8-935c-37b422c5e62e.jpg)
We are not receiving any crash report on device or front end so it's particularly difficult to debug. This doesn't happen on the simulator though, only on physical device.
As a current fix to this issue I tried to add timer that checks every 5 seconds if loading indicator is active and if so, I am restarting the app. The goal here is to at least reload the visitable (what retry button on error view does) but I wasn't able to do so as functions visitable.retry() or session.reload() doesn't seem to do anything. How do I do this ?