ionic-team / ionic-team/ionic-storage

Splitting `IndexedDB` table when migrating from `CRA` to `vite`

Offen
#323 2 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
456
Forks
97
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Hello, we encountered the problem when we tried to migrate our `ionic v6.0` (`CRA`) project to `ionic v7.0` (vite). Withing this migration we removed `CRA` specific files and added `vite` specific files, while not touching the code for working with `@ionic/storage`, the same drivers are used there (`IndexedDB` + `localStorage`), the name is the same.

After the migration, we started testing the update on an Android smartphone and found that changing the version meant that the app no ​​longer saw data from storage. However, if you reinstall the previous version, the data is restored.

This behavior is specific only to mobile devices, on the web under desktop or mobile the error is not reproduced.

I checked `IndexedDB` via the Android debugger in Chrome and saw that ``IndexedDB` and the data in the Storage section in DevTools are indeed erased, while the amount of memory in the Storage section of the device settings shows that the memory required for the application has not decreased.

It looks to me like after switching from CRA to vite we now have 2 IndexedDBs in the phone's memory, but for some reason CRA can only connect to its own, and vite can only connect to its own in the app itself.

Can you suggest any solutions to this problem?

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Das Issue nennt keine Repository-Dateien, Einstiegspunkte oder Tests. Beginne damit, die CRA-to-Vite-Migration auf einem Android-Gerät zu reproduzieren, und untersuche die IndexedDB-Stores vor und nach dem Upgrade; als erledigt gilt die Identifizierung, ob separate Stores erstellt werden, sowie die Dokumentation oder Implementierung eines verifizierten Migrationspfads.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
android, typescript, vite
Bereich
databases, mobile-dev
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.