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.

Storage cleared everytime the app closes/on refresh

See original GitHub issue

I’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:open
  • Created 5 years ago
  • Reactions:2
  • Comments:16 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
aaronbachcommented, Apr 11, 2022
1reaction
aaronbachcommented, Apr 11, 2022

@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.

Read more comments on GitHub >

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

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