Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Iframe in Chrome error: Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window'

Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.

No clue how to go further on this...when all I did was ` Works in Firefox, not in Chrome. Could be something related to http://help.twitch.tv/customer/portal/questions/6299203-javascript-errors-in-chrome-

like image 469
ttback Avatar asked Jun 27 '14 16:06

ttback


People also ask

How do I fix failed to read localStorage property from window?

I see Failed to read the 'localStorage' property from 'Window' error while using Email Tracking and Proactive Campaigns. What should I do? To fix this, you need to change the cookies' settings in your browser. To do this go to Settings > Privacy and security > Cookies and other site data.

Can iframes access localStorage?

If the iFrame shows an extension page, then it should be possible. Otherwise, nope, you will have to pass a message to the extension and the extension will access localStorage.

How do I disable localStorage in Chrome?

To enable/disable Web Storage in Chrome:Type chrome://settings/content/cookies in the address bar. On the subsequent screen select "Allow all cookies" or "Block all cookies" to enable/disable. Note: This will affect both Web Storage and cookies.


2 Answers

I had the same problem with localStorage, and fixed it like this :

Under Settings > Privacy > Content settings, change the cookies' settings to "Allow local data to be set" or the second option (in my case, it was previously on "Block sites from setting any data").

enter image description here

Edit

On newer Chrome versions, make sure the first option is ticked here: chrome://settings/content/cookies

like image 108
Bigood Avatar answered Oct 19 '22 17:10

Bigood


I had the same issue, but my problem was a script blocking plug-in ScriptBlock that I had set to allow the site but was still blocking some actions and not reporting it.

Disabled the script blocker and voila!

like image 34
webLacky3rdClass Avatar answered Oct 19 '22 17:10

webLacky3rdClass