I am creating a small React app to use as an Agent Widget within LiveChat.
I started to receive an error stating:
SecurityError: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
In an attempt to track down the issue, the app at this time is simply attempting to render the word “Hi” in the dom, and set a localStorage item via:
I had developed most of the widget and had no issue previously, and am unsure of why this error is now happening.
I have read that using localStorage in iFrames can be troublesome, however LiveChat support informed me that this shouldn’t be an issue. This coincided with me having written and tested the app in the LiveChat agent environment without issue previously.
If I can provide any further information please let me know.