Migrating from Ionic 3 app to Ionic 5 Local Storage issue

Hello fellow members. I have an issue and I searched a lot for a solution but couldn’t find a suitable one, I hope I can find one here.

I developed an Ionic 3 app two years ago and deployed on App Store & Play Store, now I have built a new version of the app using Ionic 5. My issue is that when I try to load the saved local storage data from the Ionic 3 app I get a null value! This means that when I deploy the new Ionic 5 version on stores and my users would update to the new version they will loose their previously saved data and would have to start again (Bad user experience).

Ionic 3

"@ionic/storage": "^2.2.0",

import { IonicStorageModule } from '@ionic/storage';

IonicStorageModule.forRoot({driverOrder: ['sqlite', 'indexeddb','websql']}),

this.storage.get('userData');

Ionic 5

"@ionic/storage": "^2.2.0",

import { IonicStorageModule } from '@ionic/storage';

IonicStorageModule.forRoot({driverOrder: ['sqlite', 'indexeddb', 'websql']}),

this.storage.get('userData');

How would I go about migrating the local stored data from version 3 to 5?
Any help regarding this matter would be appreciated, and if you need more info just let me know.

Are you using our cordova WKWebview plugin for v3?

they will loose their previously saved data and would have to start again (Bad user experience).

I mean, indexedDB and local storage both get cleared out regularly, so they’re not 100% reliable.

I would suggest digging further and comparing things. Hard to tell from what you’ve provided what the issue is.

@mhartington, thanks for responding.

I’m using cordova UIWebView in v3 and WKWebview in v5 obviously.

After further investigations, I discovered that I never installed cordova sqlite plugin, when I installed it I once again could read the local storage data.

can you please tell me what you did to make it works?

Thanks