Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
SebastienWae opened this issue Oct 30, 2020 · 6 comments · Fixed by #287
Closed

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

SebastienWae opened this issue Oct 30, 2020 · 6 comments · Fixed by #287
Assignees
Labels
bug Something isn't working

Comments

@SebastienWae
Copy link

SebastienWae commented Oct 30, 2020

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
@SebastienWae SebastienWae added the bug Something isn't working label Oct 30, 2020
@marcosvega91
Copy link
Member

Hi @SebastienWae thanks for reaching us :).

You're right, localStorage is used to save user settings like testid attribute and auto-run option to make them persistent even if you refresh the page.

I think that we could simply check the navigator.cookieEnabled property and save only in the case the cookies are enabled

@smeijer
Copy link
Member

smeijer commented Oct 30, 2020

We've fixed it in the current develop version. The chrome extension in the store will be updated asap.

@julienvera
Copy link

Hi ! It seems the chrome extension in the store is still not updated (latest release is from July). Can you eventually push a newer release ? It is frustrating to have a painful bug fixed but not deployed

@smeijer smeijer self-assigned this Dec 30, 2020
@smeijer smeijer reopened this Dec 30, 2020
@smeijer
Copy link
Member

smeijer commented Dec 30, 2020

Sorry, this slipped my mind. I've submitted the new version to the Chrome store, and we're waiting for review by the Chrome team. Usually, this will happen in just a few days. I don't know how the holidays will affect this, but please ping me here if the update isn't available in a few days.

@smeijer
Copy link
Member

smeijer commented Dec 30, 2020

The extension has been published! 🎉 Please let me know if the problem persists.

@smeijer smeijer closed this as completed Dec 30, 2020
@julienvera
Copy link

julienvera commented Dec 31, 2020

Problem fixed, thanks a lot 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants