Chrome extension doesn't work when third-party cookies are blocked
SebastienWae opened this issue Β· comments
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 βοΈ
- Install the
testing-playground
extension in Chrome - Go to
chrome://settings/cookies
- Select "Block third-party cookies"
- Re-load the extension
- 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
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
We've fixed it in the current develop version. The chrome extension in the store will be updated asap.
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
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.
The extension has been published! π Please let me know if the problem persists.
Problem fixed, thanks a lot π