gzuidhof / starboard-notebook

In-browser literate notebooks
Mozilla Public License 2.0
1.24k stars 99 forks source link

Could not set localStorage #55

Closed boisgera closed 3 years ago

boisgera commented 3 years ago

In https://starboard.gg/nb/ntZSsIp, I have the warning:

Could not set localStorage (key = starboard_notebook_text_editor_preference).

Not a big deal, but any solution / explanation for it?

Cheers,

SB

gzuidhof commented 3 years ago

Hi SB,

I think this is the case when localStorage is undefined, which may happen in incognito mode in Chrome. It won't be a problem: it just tries to store your preference for which editor to use into it. We could use IndexedDB instead but haven't gotten around to it yet.

boisgera commented 3 years ago

Hi @gzuidhof,

Ah, interesting!

I think this is the case when localStorage is undefined, which may happen in incognito mode in Chrome.

Indeed, I can confirm that in Chrome, I don't have the warning in normal mode, but it does appear in incognition mode. However in Firefox (90.02, 64bits, Linux), the warnings are present in both modes, so there is probably also something else going on. I can reproduce this even for extremely simple dashboards, such as https://starboard.gg/nb/n5NrsIM.

It won't be a problem: it just tries to store your preference for which editor to use into it.

OK, good to know. Thanks for your feedback! (By the way, your project is awesome! :+1: ).