function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Carlos Roberto de Carvalho JuniorCarlos Roberto de Carvalho Junior 

Failed to read the 'localStorage' property from 'Window': Access is denied for this document.

  I have implemented Chat in my Web site using Einstein BOT solutions and Embedded Service Code Snippets.
but every time that a customer has third party app cookies blocked we get an error "Failed to read the 'localStorage' property from 'Window': Access is denied for this document."

Does anyone know a workaround to this issue?  Except uncked the blocked cookies option.
VinayVinay (Salesforce Developers) 
Hi Carlos,

Under Chrome's Settings > Privacy > Content settings, you have the cookie setting set to "Block sites from setting any data".

https://www.chromium.org/for-testers/bug-reporting-guidelines/uncaught-securityerror-failed-to-read-the-localstorage-property-from-window-access-is-denied-for-this-document

Hope above information was helpful.

Please mark as Best Answer so that it can help others in the future.

Thanks,
Vinay Kumar
Carlos Roberto de Carvalho JuniorCarlos Roberto de Carvalho Junior
Hi Vinay, first of all thanks for your answer.

I know about this setting but I would like to know if someone developed a workaround for this issue.
Like a verification about the localStorage is undefined than show a diferent button to the user or something like that.

tks,
VinayVinay (Salesforce Developers) 
Hi Carlos,

Unfortunately, I haven't found any workaround apart from above mentioned.

Thanks,