Rocket.Chat
Rocket.Chat copied to clipboard
Block third-party cookies
As per the news, Google is planning to block third-party cookies in chrome browser by default. If that happens, I guess Rocket Chat won't be able to load while integrated within an iframe in a system hosted on different domain. I have tried modifying that setting in browser to reproduce the possible issue and certainly Rocket Chat in iframe didn't load. Although, the error occurred on "app/ui-utils/client/config.js" line no. 5 and the error in browser console says "failed to read the 'localstorage' property from 'window' access is denied for this document". Hence, regardless the browser setting name says "cookies", it will block all the storage areas of the browser. Anyone have any thoughts or workarounds when this setting is turned on by default in browsers?
Reference: https://www.bleepingcomputer.com/news/google/google-chrome-starts-testing-third-party-cookie-blocking/
Any news on this?
This was fixed , and is configurable in the admin side of chat server. Go to administration -> General or https://chatserver-domain/admin/General
, check off the Restrict access inside any Iframe option .
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Even having "Restrict access inside any Iframe" set to off issue still can be reproduced, any suggestions or plans to fix iframe integraion?
Issue still persisting with option disabled. Any updates?
I still have this also on 3.11.0 with "Restrict access inside any Iframe" disabled
I believe the the issue stems from
https://github.com/RocketChat/Rocket.Chat.Livechat/blob/03bee24daf382ccf555f1a1937624727689203da/src/store/Store.js#L4
Here when window is destructed it try to access window.localStorage which throws the error.
We could check for this such as
try { const { localStorage, sessionStorage } = window; } catch (e) { const { sessionStorage } = window; }
And later in persist skip persisting if localStorage is not available.
Thoughts?
I would really appreciate if this would be included in Rocket.Chat!
Seems like this has been fixed already. Please make a new report if the issue persists.