53

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-

ttback
  • 2,051
  • 5
  • 27
  • 40

4 Answers4

81

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

Community
  • 1
  • 1
Maen
  • 10,603
  • 3
  • 45
  • 71
  • +1 Thanks, this helped us with an issue we were having elsewhere, this should be the accepted solution. – Loktar Nov 13 '14 at 22:23
  • 1
    @Loktar Even if my screenshot clearly lacks of freehand circles, I'm glad it helped! – Maen Nov 14 '14 at 09:24
  • 3
    This fixed it, thank you, but **this iFrame has been working for years unchanged**. It's on my site; the iFrame reads a remote site. What could cause it to break? Did the remote server make some change? Is this option usually off in Chrome, and I somehow turned it on? I'm worried the site will break for my users and I'd like to understand what caused it. – felwithe Jan 29 '19 at 01:39
  • Do you guys know why this issue came up abruptly? It was working fine earlier. – Alia Anis Dec 07 '20 at 09:59
  • 11
    This answer is for users. We here at Stackoverflow are developers. The question is how to solve this restriction at website developer side. – Alexander Farber Jan 11 '21 at 14:13
  • @AlexanderFarber AFAIK, as a developer, you just can't. If you have a way to bypass user's permissions to set local data (which sounds like a bad idea IMO), you're welcome to share it. – Maen Jan 11 '21 at 16:24
4

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!

boatcoder
  • 17,525
  • 18
  • 114
  • 178
webLacky3rdClass
  • 659
  • 10
  • 27
2

For the latest chrome browser, this might work and better guide for you. And it works for me.

Settings > Privacy and security > Cookies and other site data > Allow all cookies

That should work perfectly.

Jesus Erwin Suarez
  • 1,571
  • 16
  • 17
0

If you still want to block most 3rd party cookies, you can add an exemption. I usually can do it through the cookie button that pops up in the AddressBar, but it wouldn't let me for localhost. I had to add it via chrome://settings/content/cookies Picture of chrome://settings/content/cookies

Stephen
  • 1,603
  • 16
  • 19