-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the app to work without storage in extreme cases where it fails completely #29403
Comments
@chrispader should I assign you to this issue? I think it should be fairly straightforward of a change. |
Yes, you can assign me! 👍 |
🤙 |
Eep! 4 days overdue now. Issues have feelings too... |
Just finished the E2E encryption library, so i have more time to work on this now! Looking at this this week 👍 |
@chrispader Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@chrispader any thoughts? |
@chrispader Still overdue 6 days?! Let's take care of this! |
@chrispader Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
Sorry for the delay again 🥴 I can look into this over the weekend, though if this has high priority, you might want assign it to somebody else @marcaaron Still pretty busy with other tasks unfortunately |
@chrispader Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@chrispader Eep! 4 days overdue now. Issues have feelings too... |
Going to look into this tmrw! For real! |
@chrispader Whoops! This issue is 2 days overdue. Let's get this updated quick! |
@marcaaron is there any other information about this specific incident or any other reproduction steps? No worries if not, i should still be able to adapt the app for this issue without actually getting any errors from |
I have a couple of thoughts and proposals for this problem after my initial investigation: The error that @davidcardoza experienced is presumably thrown by These errors will essentially be thrown at bundle start time (when QuestionsTo which degree should the app still work reliably? There are certainly a lot of screens/components/flows that rely on the data that's set with Is the idea behind this issue to essentially just omit storage persistence in general and only rely on cache for these extreme cases? If so, we there are some approaches we could go for: Possible solutionsOptimistically creating storage instancesWe can try to create/connect to the storage instance - All of this could be done inside Initial Onyx initialisationIn order to safely provide a backup solution for when the storage initialisation is not working, we could add a "initialisation phase" in In this context, i was thinking of adding something a function like Error handling directly in the appI think this might be the least favourable and most difficult approach, since we use Onyx in lots of places and functions like Curious about your thoughts @marcaaron... I think Option 1 should be pretty straight forward! |
@chrispader Still overdue 6 days?! Let's take care of this! |
With this design, instead of adding a second This way, the I would need to check though, if this is currently doable with all operations in |
i added the |
While having the cache replaced by a "provider" could be interesting, it doesn't seem to significantly improve the current situation. Too much complexity could also make the code less accessible. So, I'd encourage us to just focus on addressing the issue without assuming that we may need more than that. That said, if the rest of the team is on board, I don't want to create a roadblock here. Just wanted to share my reservations as I'm still having trouble fully supporting the extra changes. Here's what I'd do:
|
@chrispader Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@chrispader Still overdue 6 days?! Let's take care of this! |
@chrispader Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it! |
Updated the PR to only contain logic to fallback to the |
Left a few comments. Seeing as this issue has been unresolved for a while - I would love to maybe revisit a high level analysis of the "problem" (as experienced by users) that we are trying to solve and then a proposal on how it will be fixed (or what other changes to expect) so we can maybe all agree on what we are doing here before spending time on additional reviews? |
e.g. unpacking this statement for a second:
Are we sure that's where the error gets thrown? |
No we aren't 100%, you're right. I didn't find lots of substantial proof/reason for this error. Anyway, i updated the PR to also handle errors during runtime (after initialization) |
@chrispader Huh... This is 4 days overdue. Who can take care of this? |
@chrispader 6 days overdue. This is scarier than being forced to listen to Vogon poetry! |
@chrispader 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it! |
@chrispader 12 days overdue now... This issue's end is nigh! |
This issue has not been updated in over 14 days. @chrispader eroding to Weekly issue. |
This issue has not been updated in over 15 days. @chrispader eroding to Monthly issue. P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do! |
@tgolen @marcaaron i think we can close this out since the split-up PRs by @kirillzyusko have been merged? |
I think you're right! I'll close it out. |
Problem
There are documented cases where IndexedDB appears to completely fail to spin up space for the app to use. The app won't work at all when this happens. Most recently this happened to @davidcardoza here (sorry, internal).
The error we saw in the JS console was :
We then get stuck in a spot where since the IndexedDB store doesn't work basically nothing works.
Solution
While we aim to have the app work offline and provide a good return experience with some data and request persistence. If the app can't save anything to storage at all it should still work. If we run into a serious error like this - we should gracefully degrade the experience.
Bonus quest
Actually, figure out why exactly all the IndexedDB errors happen...
The text was updated successfully, but these errors were encountered: