question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

We are using @auth0/auth0-spa-js 1.12.0 and recently see errors like this one:

Error: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
      at Object.get (node_modules/@auth0/auth0-spa-js/dist/../src/storage.ts:88:18)
      at new e2 (node_modules/@auth0/auth0-spa-js/dist/../src/transaction-manager.ts:18:36)
      at new e2 (node_modules/@auth0/auth0-spa-js/dist/../src/Auth0Client.ts:155:30)
      at init6 (packages/lib.web.auth/index.ts:81:20)
      ...

Because of this error, it is not possible to create a Auth0Client instance and therefore the affected users can not authenticate.

Unfortunately we were not able to reproduce the error yet. All we know is, that the userAgent is always “Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/85.0.4183.121 Safari/537.36 Edg/85.0.564.70” indicating an Edge 85 browser running on Windows 10.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

8reactions
AK-047commented, Feb 2, 2022

It’s still not working with an iframe and blocked third-party cookies. Is there any way to force client initialization to use memory storage or something else to avoid this issue?

1reaction
norbertschulercommented, Feb 9, 2021

Just for information: If you have third party cookies disabled in Chrome and include a website using auth0-spa-js in an iframe, this error also occurs. Not for the same website if you directly view it in the browser without putting it into an iframe.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Iframe in Chrome error: Uncaught SecurityError: Failed to read ...
Uncaught SecurityError: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
Read more >
DOM error Failed to read the 'sessionStorage' property from ...
Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. at HTMLDocument.
Read more >
Failed to read the 'localStorage' property from 'Window'
Uncaught SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document. ... This exception is thrown when the...
Read more >
Uncaught DOMException: Failed to read the ... - Google Groups
Uncaught DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. 813 views.
Read more >
I see Failed to read the 'localStorage' property from 'Window ...
To fix this, you need to change the cookies' settings in your browser. To do this go to Settings > Privacy and security...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found