on iOS 10, WKWebview returns DOM security error

on iOS 10, executing codes that try reading or accessing localStorage via javascript will return DOM Security 18: the operation is insecure. error.

I noticed this bug on iOS 10 b1 and it still happens on iOS 10 b2.


It runs A-OK on iOS 9.


I wonder if there's any API changed on iOS 10 or it's just another bug. I filed a bug on bugreporter but hope to hear if this happens to others.

* note: the html/js files are locally loaded.

Replies

Same here. Reverting to UIWebView makes localStorage work again, but I'd rather use WKWebView.


I submitted this to Cordova's Jira tracker a few days ago, FWIW: https://issues.apache.org/jira/browse/CB-11524

Hi, this is definately a major issue. I also filed a bug (https://openradar.appspot.com/27051672). See also this webkit bug: https://bugs.webkit.org/show_bug.cgi?id=156651

Quick update on this particular bug:


I filed a bug report on bugreporter.apple.com and Apple responded back to investigate the issue further.

Let's see if they are going to fix this on beta 3.

still happens on iOS 10 b3

Fixed a few hours ago: https://trac.webkit.org/changeset/203695

Not sure when it will land in the iOS 10 beta cycle.

Oh, that's a good news, then hopefully it will land in the next beta or at least the official GM build.

We shall see!

It still happens on iOS 10 beta 4.

The fix has landed on Safari Technology Preview 10 for macOS


Changed behavior to allow LocalStorage access for file URLs by default


It seems like we can expect the same on the next iOS 10 beta.

It has been fixed on iOS 10 beta 5.

I just test with Xcode 8.1 beta and IOS 10.1 beta and I have the same issue, this should be fix on IOS 10 beta 5 right?

I am experiencing the same issue after upgrading to iOS 10.1 Beta. Can someone please shed light on when Beta-5 is supposed to be publicly available? Is Beta-5 already merged into iOS10 public release?