Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

DOMException: Failed to read the 'localStorage' property from 'Window': In Chrome Incognito mode and running in Iframe

Can anyone please help me on this issue as I'm getting this same error message on my site when I run it inside iframe of a separate domain in incognito mode only? You can access site from here.

  • No issue on non-incognito mode.
  • No issue without iframe as working an individual site
  • No issue with those sites that don't use localStorage even running inside iframe or without iframe

Error in console -

"DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document"

Thanks

like image 494
Rahul Avatar asked Jul 31 '20 16:07

Rahul


1 Answers

Update 4/8/2020

block third-party cookies

enter image description here

allow third-party cookies

enter image description here

From the screenshot above, you can see third-party cookies from

https://www.googletagmanager.com
https://cstatic.weborama.fr
https://www.google.com

Removed the direct dependency between page displaying and cookies from these websites.





Follow these steps to unchecked block third-party cookies in Chrome settings.

This exception is thrown when the "Block third-party cookies and site data" checkbox is set in Content Settings.

To find the setting, open Chrome settings, type "third" in the search box, check Allow all cookies in General settings.

enter image description here

like image 107
Michael Wang Avatar answered Oct 06 '22 01:10

Michael Wang