OP-Engineering / op-sqlite

Fastest SQLite library for react-native by @ospfranco
MIT License
549 stars 36 forks source link

Flipper database explorer cannot open the db #13

Closed XuJet closed 10 months ago

XuJet commented 11 months ago

Dear Author, first of all thank you for creating this library.

Let me tell you about the problem I encountered:

A database created with op-sqlite will not work in flipper, but a database created with react-native quick-sqlite will work in flipper.

What do I need to do to get flipper to display a database created with op-sqlite?

When I click the Refresh button, the database will become corrupt.

image image

Environment

Flipper version: Version 0.237.0 React Native version: 0.72.7

ospfranco commented 11 months ago

Weird. I don't know, never used the flipper database explorer. I cannot tell you what might be wrong.

Maybe it is the SQLite version? Did you try to update flipper?

ospfranco commented 11 months ago

Keeping this open in case anybody knows the solution

XuJet commented 11 months ago

Keeping this open in case anybody knows the solution

Ok, thank you very much.

thejustinwalsh commented 10 months ago

Heads up, Flipper is no longer the recommended tool to use with React Native via RFC0641

ospfranco commented 10 months ago

Flipper is not going to disappear overnight though. The RFC does contain a link to the Android Studio Database Explorer. It would be good to check if that works.

https://developer.android.com/studio/inspect/database

thejustinwalsh commented 10 months ago

The old version is still around for sure, as 0.239.0 is the last version to support react native and 0.240.0 just came out dropping support for RN 2 days ago.

So kind of overnight!? Haha

I saw the note about the Android studio tool and am going to give it a spin soon.

I was contemplating adding flipper support to the repo, then saw this and decided against it.

I also ran into some issues with the react-native-flipper native module but that is a side quest into react-native-windows land and realized the native module was pinned to react-native 0.68, probably still works for most people staying in tree though.

ospfranco commented 10 months ago

I just tried Android Studio database explorer and it seems it only works if you use the Java interface for SQLite (which kinda makes sense). If not, it can detect the database files but since no connection is open, it cannot query them.

Oscar Franco Screen 000465

ospfranco commented 10 months ago

Going to close this, as stated, flipper is going out of the window and Android Studio won't help, for now it seems there is no good way to debug a sqlite database directly from the device. I might add a new feature to do this debugging remotely later.

ospfranco commented 10 months ago

I just tested flipper again (after re-enabling it in the sample app) and it is working. It seems the largeDB is the only one that does not work... no idea why, maybe it is too large for flipper to load correctly?

In any case, there doesn't seem to be any issue here.

Oscar Franco Screen 000489