capacitor-community / sqlite

Community plugin for native & electron SQLite databases
MIT License
433 stars 106 forks source link

Attempt to insert values before table is created #490

Closed Dave-N-at-Abstract closed 5 months ago

Dave-N-at-Abstract commented 6 months ago

Bit of a strange issue. I have had an issue with importFromJson where it tries to insert values into a table but returns an error as the table doesnt exist. It works fine on Android, but fails on IOS. When checked later the table exists, which makes me think that maybe its a timing issue? The JSON is confirmed as valid before the import occurs.

This is on @capacitor-community/sqlite@4.8.0

jepiqueau commented 6 months ago

@Dave-N-at-Abstract can you ipdate to Capacitor 5 and the latest release of @capacitor-community/sqlite and tell me if you have still the issue. If the issue is still there, please share a repro app on github

jepiqueau commented 5 months ago

@Dave-N-at-Abstract Did you update to Capacitor 5. Can you please answer otherwise i will close the issue as i cannot reproduce the issue

Dave-N-at-Abstract commented 5 months ago

I had previously, but as part of other updates I rebuilt the base application bringing in all the modules from scratch. My workaround is still in place currently, but I'll look at taking it out and trying it again on ios and see if the issue I saw still occurs.

jepiqueau commented 5 months ago

@Dave-N-at-Abstract Sorry, i did not ask you on which platform it is happening. Did you try without your workaround?

Dave-N-at-Abstract commented 5 months ago

Hi, i've given it another go since rebuilding and it seems to be fine without the workaround in the simulator. I dont have a physical device to try on right now, but it seems to be sorted.

jepiqueau commented 5 months ago

@Dave-N-at-Abstract Ok, so i close the issue. Fell free to re-open it if required