-
Notifications
You must be signed in to change notification settings - Fork 65
Uncaught error when localstorage not available #759
Comments
@pakokrew Currently 3Box requires localstorage and IndexedDB in order to store local state. Unfortunately there is no easy way around this.
What does this mean exactly? |
@oed I know you need localStorage. It would be better that you catch this Uncaught exception and throw something to us, so we can display an error message to our users.
Inside iframes, brave disable the use of localStorage. The result is that, instead of having You can find an example here : https://mooni-widget-example.now.sh/ |
Thanks @pakokrew That's a good idea to throw an error if that's the case! Will put this in our backlog. Do you know why brave disables localstorage in iframes? Is other storage methods such as IndexedDB available? |
That's part of privacy protecting strategy. They consider them like cross-domain/third party cookies. I don't think other types of storage will be supported. Apple's Webkit will pose a lot of problems soon also, and chrome may follow. If you disable shields on brave, it works. |
When trying to open a box in a browser that block localstorage, there is an uncaught error and the
Box.openBox
method does not throw an error.In some browsers, localStorage is not available (such as brave browser on cross-domain embedded sites, chrome when blocking third party cookies...)
Accessing the property window.localStorage throws an error (even just checking
window.localStorage !== undefined
)Error thrown:
The text was updated successfully, but these errors were encountered: