Skip to content

Chrome extension doesn't work when third-party cookies are blocked #284

@SebastienWae

Description

@SebastienWae

Bug Report 🐛

When third-party cookies are blocked in Chrome the main "Testing Playground" tab for the testing-playground extension doesn't work.
The tab is empty and the console return the error:
Uncaught DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document

To Reproduce ✔️

  1. Install the testing-playground extension in Chrome
  2. Go to chrome://settings/cookies
  3. Select "Block third-party cookies"
  4. Re-load the extension
  5. The Elements tab is working but the main "Testing Playground" tab is empty.

Expected behavior 🤔

The extension should try to work without localStorage if possible and display an error message informing the user to enable third-party cookies if required.

Suggested solution 🔦

Looking at issues from other extensions (like bvaughn/react-devtools-experimental#292) the only solution is to wrap all calls to localStorage or sessionStorage in a try/catch.

Your Environment 💻

  • browser: Chrome
  • os: Mac, Linux

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions