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
I use the IDE with Chromium on Ubuntu (whichever version that is, but it should be reasonably up to date) and on two computers regularly have issues with the storage in the emulated Bangle getting reverted to its state days or even weeks earlier whenever I close the emulator window, disconnect from it, restart the browser, or have it crash. Only rarely does it seem to actually save the changes made in a working session, apparently at random.
I suspect an issue with the emulator flash not getting saved back to browser localStorage when it should. Looking at the code, it only seems to happen with window.onUnload, and apparently I guess this doesn't work reliably in Chromium. Probably better to also save it back every X minutes, or say, a few seconds after the last change to emulated storage was made.
Edit: For what it's worth, Chromium does give a warning that onUnload is deprecated.
The text was updated successfully, but these errors were encountered:
I started to work on this and ran into an even bigger problem. Trying to save the flash storage gives the following exception from the browser:
Uncaught QuotaExceededError: Failed to execute 'setItem' on 'Storage': Setting the value of 'BANGLE_STORAGE' exceeded the quota.
at saveFlashIfChanged (common.js:27:20)
saveFlashIfChanged @ common.js:27
Did some research and am hearing that there is a hardcoded limit of 5 MB for localStorage in Chrome/Chromium. And I think Bangle.js 2 is something like 8MB?
I use the IDE with Chromium on Ubuntu (whichever version that is, but it should be reasonably up to date) and on two computers regularly have issues with the storage in the emulated Bangle getting reverted to its state days or even weeks earlier whenever I close the emulator window, disconnect from it, restart the browser, or have it crash. Only rarely does it seem to actually save the changes made in a working session, apparently at random.
I suspect an issue with the emulator flash not getting saved back to browser localStorage when it should. Looking at the code, it only seems to happen with window.onUnload, and apparently I guess this doesn't work reliably in Chromium. Probably better to also save it back every X minutes, or say, a few seconds after the last change to emulated storage was made.
Edit: For what it's worth, Chromium does give a warning that onUnload is deprecated.
The text was updated successfully, but these errors were encountered: