Check if access to local storage is allowed
Browsers may be configured to deny access to localStorage. Every time an access to this object is made a DOMException is thrown:
iframe:65260 Uncaught (in promise) DOMException: Failed to read the 'localStorage' property from 'Window': Access is denied for this document.
at connection.promise.then.parent (https://dev.vereign.com/api/js/iframe:65260:26)
The first access is at
connection.promise.then(parent => {
var identities = localStorage.getItem("identities")
console.log("Library loaded at: " + new Date().toISOString())
We should first test if localStorage is available, and if it is not to advise the user to allow localStorage and stop further execution of the application.
In Chrome this can be done by clearing
Settings > Advanced > Pricacy and Security > ContentSettings > Cookies > Block third party cookies
.
A visual tutorial with video or screenshots of the steps and the right settings would be nice.
See 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
Edited by Damyan Mitev