andpor / react-native-sqlite-storage

Full featured SQLite3 Native Plugin for React Native (Android and iOS)
MIT License
2.75k stars 521 forks source link

Error while opening the database on React 0.71.2 #552

Open alejandro-devop opened 1 year ago

alejandro-devop commented 1 year ago

Error while opening the database on React 0.71.2

Expected Behavior

Open the database as expected

Current Behavior

image

Possible Solution

I'm not sure of what can be done to solve this

Steps to Reproduce (for bugs)

Just follow the instructions in the readme file.

Context

Cannot use the library with the latest version of react-naive.

Your Environment

Debug logs

 LOG  Running "SQLiteApp" with {"rootTag":1,"initialProps":{}}
 LOG  Queries:  ["CREATE TABLE IF NOT EXISTS todos ( name TEXT NOT NULL, description TEXT, isCompleted INTEGER )"]
 LOG  Error:  [TypeError: Cannot convert null value to object]
Process terminated. Press <enter> to close the window

Note: I got another project using react-native 0.69.5, and the library works as expected, what leads me to think it's only happening with the latest version of react-native, the following is an output executing a query (With wrong syntax sorry) on react-native 0.69.5.

image

leonardoballand commented 1 year ago

Hello @alejandro-devop, I've finally found a solution working for me (RN 0.71.3). Hope it helps:

Should be working now

ThushalIntervest commented 1 year ago

@alejandro-devop did you find any solution?