Don't explode if initialization fails
See original GitHub issueWhen localStorage
contains invalid data for whatever reasons (can result due to bugs, or breaking change update), and it throws during initialization, the app should survive it. Simplest solution in that scenario is to clear localStorage
and use default values.
Currently, if this happens, there’s no recourse other than opening devTools and running localStorage.clear()
+ refresh.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:11 (10 by maintainers)
Top Results From Across the Web
Initializing variables in if else but not working, how do I ...
I need to find out why 'discount' and 'discountnum' keep saying they need to be initialized when I'm initializing in the if else...
Read more >Why cautiously initializing deep neural networks matters?
This is the exploding gradient problem, where weights explode to infinity(NaN). Both of these cases makes neural network difficult to converge. Below are...
Read more >Error in device initialization discarded · Issue #3079 - GitHub
Reported by M R Rosen: Currently, if a device fails to initialize and returns a error code, that information is discarded. Ideally, in...
Read more >How to handle errors with grace: failing silently is not an option
If At First You Don't Succeed, Try, Catch, Finally · Consistency rulezzz. You must make sure that your application is always in a...
Read more >1.6 — Uninitialized variables and undefined behavior
All variables are default initialized, but default initialization does no initialization for most variables, so it leaves them uninitialized. If ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For now, I say we implement a hotfix that clears the localStorage (in case of error). After that, we can think of how to implement migrations.
This issue has nothing to do with the CSS unit changes. The problem here is that some version of excalidraw stored something within localStorage that a different version in the future cannot read in such a way that the UI no longer show up at all.
This is not ok. The reason people use excalidraw is because “it just works”. Backwards compatibility is extremely important for those kind of projects to be successful. We want people to trust that they can return to the website and continue working on their drawing from the day before.