question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Don't explode if initialization fails

See original GitHub issue

When 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:11 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
dwellecommented, Jan 21, 2020

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.

1reaction
vjeuxcommented, Jan 21, 2020

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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found