You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just found out that there is an easy fix. Just adding a try catch around the access of session- / localstorage. Because e.g. "undefined" != typeof sessionStorage already gives the security exception.
Describe the bug
When a user blocks a site from saving data, the whole angular app crashes when using the library.
Stackblitz example
Any app that uses the library, and has blocked the site from storing data in chrome.
To Reproduce

2. Reload the siteExpected behavior
Probably the library won't work without being able to save data, but at least it shouldn't crash.
Desktop (please complete the following information):
Additional context
Unhandled Promise rejection: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document. ; Zone: ; Task: Promise.then ; Value: DOMException: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
at createDefaultStorage (http://localhost:4200/vendor.js:170856:5)
at _callFactory (http://localhost:4200/vendor.js:89741:20)
at _createProviderInstance (http://localhost:4200/vendor.js:89684:26)
at resolveNgModuleDep (http://localhost:4200/vendor.js:89628:21)
at _createClass (http://localhost:4200/vendor.js:89725:32)
at createProviderInstance (http://localhost:4200/vendor.js:89681:26)
at resolveNgModuleDep (http://localhost:4200/vendor.js:89628:21)
at NgModuleRef.get (http://localhost:4200/vendor.js:90736:16)
at resolveDep (http://localhost:4200/vendor.js:91266:45)
at createClass (http://localhost:4200/vendor.js:91119:32) Error: Failed to read the 'sessionStorage' property from 'Window': Access is denied for this document.
at createDefaultStorage (http://localhost:4200/vendor.js:170856:5)
at _callFactory (http://localhost:4200/vendor.js:89741:20)
at _createProviderInstance (http://localhost:4200/vendor.js:89684:26)
at resolveNgModuleDep (http://localhost:4200/vendor.js:89628:21)
at _createClass (http://localhost:4200/vendor.js:89725:32)
at createProviderInstance (http://localhost:4200/vendor.js:89681:26)
at resolveNgModuleDep (http://localhost:4200/vendor.js:89628:21)
at NgModuleRef.get (http://localhost:4200/vendor.js:90736:16)
at resolveDep (http://localhost:4200/vendor.js:91266:45)
at createClass (http://localhost:4200/vendor.js:91119:32)
The text was updated successfully, but these errors were encountered: