-
Notifications
You must be signed in to change notification settings - Fork 893
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
Compat Mode: Checking for "sessionStorage" reference crashes the app when chrome has "block third-party cookies" enabled #5913
Comments
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight. |
Seems to be used in Auth and Database |
That PR I just linked should fix it in Auth, but I'll make sure to leave this open for database as well. @rosostolato I only see the issue when all cookies are disabled, not just third-party cookies. Which version of Chrome are you on? |
@sam-gc I don't remember the version of Chrome I was using but I have just tested it now with the latest one and it seems it's not crashing anymore. I still see the database access error, but it's not breaking the app. |
@rosostolato no problem, like I said it still happens for me when all cookies are disabled so there's at least an easy way to reproduce it 👍 |
I'm going to remove the |
Hi there, actually, I still got the same error after installing the This error still will happen when running the Firebase app in an iframe (when But finally, I realize that we don't need to save the token across sessions (or cross-browser tabs), so I changed to |
Removing database as we surround our |
I can't reproduce this in Auth. With third party cookies totally disabled compat still works. I'm going to go ahead and close this out now. Please reopen if you're still seeing this issue with the latest version of Auth. |
The same as #5618 but it's still broken for compat mode.
If customers enable the "block third-party cookies" feature under chrome settings, Chrome will throw an exception when you try to access the
sessionStorage
reference inwindow
. To solve that, we should add atry/catch
for all lines that referencesessionStorage
and not only check if it's null.firebase-js-sdk/packages/auth-compat/src/persistence.ts
Line 104 in cdada6c
The text was updated successfully, but these errors were encountered: