Page MenuHomePhabricator

Migrate to WKWebkit and new JS interface to improve stability of article display
Closed, ResolvedPublic

Description

https://rink.hockeyapp.net/manage/apps/152731/app_versions/40/crash_reasons/114034909

We are crashing when trying to update the js context during a size transition. This is likely either when the web view is coming onscreen, or during rotation.

The crash is in the JSCore (javascript) framework.

My guess is that It happens more on iPad because people rotate devices more on an iPad than iPhone

Since JSCore is a blackbox, my first suggestion is to replace UiWebview with WKWebview - switching to the modern API has a chance of fixing the issue - even if it doesn't, we don't want to go into a deep dive debugging on a legacy API

Event Timeline

This issues doesn't have a straight forward solution. Its an issue with Javascript Core in the UIWebView.

At this point the options are:

  1. Start doing a lot of low level debugging of the UIWebView with instruments.
  2. Since UIWebView is deprecated technology, just migrate to WKWebView and then re-assess.

I'm leaning towards 2 right now, as I ant justify dumping an unknown mount of time in debugging a component that we plan on dropping very soon. And since WKWebView is more modern, if we get really lucky it may just fix the issue, and if not, since its much more customizable, we will probably be able to fix it easier.

Either way, pushing this ticket back right now because both options will take a little bit of time and I want to get to some higher priority stuff over the next few days.

For reference, this bug is responsible for 20% of our crashes. This is the largest single source of crashes that we have yet to fix.

Note: We have a fix for a bigger crasher (about 35%) waiting for our next deployment.

Fjalapeno moved this task from Backlog to Blocked or Waiting on the iOS-app-v5.1.0-Saturn board.
Fjalapeno added a subscriber: Zppix.
Fjalapeno added a subscriber: JMinor.

@JMinor this is the "unknown crash" in iTunes. We can discus whether we want to release this with the other framework bug fix in a 5.0.5 release

JMinor renamed this task from Web view controller crash during rotation (probably) from Hockey to Migrate to WKWebkit and new JS interface to improve stability of article display.May 13 2016, 6:56 PM
JMinor raised the priority of this task from Medium to High.
JMinor awarded a token.

Testing criteria here is most of the regression test suite, since this touches on all html rendering.

Will create specific follow-up bugs if needed.