Storage cleared everytime the app closes/on refresh
See original GitHub issueI’m using @ionic/storage
v2.2.0 with Ionic v4 and Angular v7, and in development mode, the storage (IndexedDB in that case) is cleared on refreshing the page.
On mobile (with Cordova on Android v7.1.4), the storage is cleared upon closing the app.
I use NO extra settings in my app for the storage and used it just like the instructions here (I installed the npm package and the Cordova plugin).
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:16 (1 by maintainers)
Top Results From Across the Web
Why is localStorage getting cleared whenever I refresh the ...
When you reload the app/component both effects will run, and React state updates are processed asynchronously, so it's picking up the empty ...
Read more >Why Do My Apps Keep Closing? How to Troubleshoot
Restart the mobile device, and if the problem persists, you can reinstall the app, clear the cache, and free space on the phone...
Read more >Local storage data getting deleted in ios 13 version in ipad ...
But the stored key itself is deleted once we kill or destroyed the app from background task in iOS 13 device (iPad)and check...
Read more >How to clear app cache on Android & why you should
Clearing the cache is best seen as a temporary fix since every app will once again start populating the storage immediately. Despite the ......
Read more >How to Save State to LocalStorage & Persist on Refresh ...
Step 0: Creating a new Next.js app from a demo starter ... that any time they visit again, we won't show it until...
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 Free
Top 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
@elreco when you only need storage in a mobile app, it should be worth trying: See https://ionicframework.com/blog/choosing-a-data-storage-solution-ionic-storage-capacitor-storage-sqlite-or-ionic-secure-storage > SqlLite
@elreco yes and no. We have implemented a step before every Appflow Update, which persists the whole ionic storage to a json file and tries to reloads it everytime you are on the login route.
the workaround caused additional troubles, so we decided to switch off AppFlow Updates on Android. The main reason for this was, that some AppFlow updates ran very long on older Android devices.