(INVALID) Safari 10.0 => EXCEPTION: Error: Uncaught (in promise): SecurityError (DOM Exception 18): The operation is insecure

I updated Safari to the version 10.0 and didn’t check afterwards if my app in debug (ionic serve) was still working, since I mostly work with Chrome.

I just checked right now and I’m facing following errors, which I don’t have with chrome.

Anyone experiencing the same problem with Safari 10.0?

EXCEPTION: Error: Uncaught (in promise): SecurityError (DOM Exception 18): The operation is insecure.

logError — browser_adapter.js:84
logGroup — browser_adapter.js:94
call — exception_handler.js:65
(fonction anonyme) — application_ref.js:337
(fonction anonyme) — async.js:139
__tryOrUnsub — Subscriber.js:225
next — Subscriber.js:174
_next — Subscriber.js:124
next — Subscriber.js:88
_finalNext — Subject.js:128
_next — Subject.js:120
next — Subject.js:77
emit — async.js:127
onHandleError — ng_zone_impl.js:74
handleError — zone.js:327
runGuarded — zone.js:233
_loop_1 — zone.js:487
drainMicroTaskQueue — zone.js:494
promiseReactionJob

I’m just dumb. Socket initialization problem.

Chrome seems to accept the error and goes forward where safari don’t, just block.

I had the same issue. I updated the Content-Security-Policy in my index.html to support ws and wss websockets for the livereload to work.

before:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' *;">

after:

<meta http-equiv="Content-Security-Policy" content="default-src 'self' * ws: wss:;">

thx @zwacky for the tips. unfortunately that didn’t worked in my case, but no big deal, I could leave with that (thx gulp script to inactive stuff when I want to work in safari)