react-native-async-storage / async-storage

An asynchronous, persistent, key-value storage system for React Native.
https://react-native-async-storage.github.io/async-storage/
MIT License
4.74k stars 467 forks source link

No such table: catalystLocalStorage #1136

Open jordanpc93 opened 3 months ago

jordanpc93 commented 3 months ago

What happened?

Hi, I have updated my version of React Native to 0.74.4 and I have updated the version of @react-native-async-storage/async-storage to 1.24.0 and since that update I get the error when using the library

(1) no such table: catalystLocalStorage in "INSERT OR REPLACE INTO catalystLocalStorage VALUES (?, ?);" 21:28:30.851 E Exception in native call android.database.sqlite.SQLiteException: no such table: catalystLocalStorage (code 1 SQLITE_ERROR): , while compiling: INSERT OR REPLACE INTO catalystLocalStorage VALUES (?, ?); at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method) at android.database.sqlite.SQLiteConnection.-$$Nest$smnativePrepareStatement(Unknown Source:0) at android.database.sqlite.SQLiteConnection$PreparedStatementCache.createStatement(SQLiteConnection.java:1562) at android.database.sqlite.SQLiteConnection.acquirePreparedStatementLI(SQLiteConnection.java:1098) at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:1126) at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:686) at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:614) at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:62) at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:34) at android.database.sqlite.SQLiteDatabase.compileStatement(SQLiteDatabase.java:1463) at com.reactnativecommunity.asyncstorage.AsyncStorageModule$2.doInBackgroundGuarded(AsyncStorageModule.java:203) at com.reactnativecommunity.asyncstorage.AsyncStorageModule$2.doInBackgroundGuarded(AsyncStorageModule.java:194) at com.facebook.react.bridge.GuardedAsyncTask.doInBackground(GuardedAsyncTask.java:34) at com.facebook.react.bridge.GuardedAsyncTask.doInBackground(GuardedAsyncTask.java:19) at android.os.AsyncTask$3.call(AsyncTask.java:394) at java.util.concurrent.FutureTask.run(FutureTask.java:264) at com.reactnativecommunity.asyncstorage.SerialExecutor$1.run(SerialExecutor.java:25) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:644) at java.lang.Thread.run(Thread.java:1012) (1) no such table: catalystLocalStorage in "DELETE FROM catalystLocalStorage WHEREkeyIS NULL"

I have implemented ‘Next storage’ in test mode, in case that solves the problem and the error persists.

Version

^1.24.0

What platforms are you seeing this issue on?

System Information

System:
  OS: macOS 14.5
  CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
  Memory: 203.55 MB / 32.00 GB
  Shell:
    version: "5.9"
    path: /bin/zsh
Binaries:
  Node:
    version: 22.4.0
    path: /usr/local/bin/node
  Yarn: Not Found
  npm:
    version: 10.8.1
    path: /usr/local/bin/npm
  Watchman:
    version: 2024.07.15.00
    path: /usr/local/bin/watchman
Managers:
  CocoaPods:
    version: 1.15.2
    path: /Users/jordanpc/.rbenv/shims/pod
SDKs:
  iOS SDK: Not Found
  Android SDK: Not Found
IDEs:
  Android Studio: 2024.1 AI-241.15989.150.2411.11948838
  Xcode:
    version: /undefined
    path: /usr/bin/xcodebuild
Languages:
  Java:
    version: 17.0.11
    path: /usr/bin/javac
  Ruby:
    version: 2.7.4
    path: /Users/jordanpc/.rbenv/shims/ruby
npmPackages:
  "@react-native-community/cli": Not Found
  react:
    installed: 18.2.0
    wanted: 18.2.0
  react-native:
    installed: 0.74.3
    wanted: 0.74.3
  react-native-macos: Not Found
npmGlobalPackages:
  "*react-native*": Not Found
Android:
  hermesEnabled: true
  newArchEnabled: false
iOS:
  hermesEnabled: Not found
  newArchEnabled: false

Steps to Reproduce

npx react-native run-android

mensonones commented 1 month ago

Hey, @jordanpc93!

I want to be able to help, if you can create a repository with the minimum reproduction of this problem, it would be great, as I was unable to reproduce it.