Rapid icon indicating copy to clipboard operation
Rapid copied to clipboard

When localStorage is unavailable, things break in interesting ways

Open bhousel opened this issue 1 year ago • 2 comments

This isn't definitely a real issue (it might even be a problem with the fallback mock), but I'm opening it for me to think about.

I tried switching over to a mock storage system to test some of our issues regarding backups not being saved (see #1153, but others too).

We normally assume that localStorage is working fine, but there may be situations where it isn't, and there are places scattered around the code where we expect to write values to the storage and read them back out, and this may be causing some issues.

Background imagery brightness:

Screenshot 2024-02-09 at 9 56 10 AM

Recent presets:

Screenshot 2024-02-09 at 10 00 23 AM

We should check all the places where we use the StorageSystem and make sure that things still work if setItem and getItem fail.

bhousel avatar Feb 09 '24 15:02 bhousel

If this is related to loosing data because Rapid Freeze and you are forced to reset and then NONE of the previous work is retrieved despite you are asked that. Them it keeps Happening and we keep losing precious time and editing effort...

jjiglesiasg avatar Mar 11 '24 04:03 jjiglesiasg

@jjiglesiasg I don't use Rapid, but I use iD. Often would make large datasets manually, close to 2.000 changes (mostly rivers) and much before this iD would start complaining about can't be able to store.

What I done was using Firefox instead of Chome and increasing I'm Firefox the localStorage limits to much, much more.

Not sure if this apply to RapiD, but in theory, if browser have no reason to limit localStorage, likely would have less reason for these crash you mentioned.

fititnt avatar Jun 12 '24 15:06 fititnt