Skip to content

RuntimeException on Android #204

Closed
Closed
@varungupta85

Description

@varungupta85

Current behavior

I recently moved from AsyncStorage defined in react-native to this package and I got the below crash report on Play Store. I don't know the steps to reproduce as it happened in the production app on some user's phone.

image

Below is the complete crash report in text

java.lang.RuntimeException: 
  at android.os.AsyncTask$3.done (AsyncTask.java:310)
  at java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:354)
  at java.util.concurrent.FutureTask.setException (FutureTask.java:223)
  at java.util.concurrent.FutureTask.run (FutureTask.java:242)
  at com.reactnativecommunity.asyncstorage.AsyncStorageModule$SerialExecutor$1.run (AsyncStorageModule.java:62)
  at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1113)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:588)
  at java.lang.Thread.run (Thread.java:818)
Caused by: android.database.sqlite.SQLiteException: 
  at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration (SQLiteConnection.java:391)
  at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:216)
  at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:191)
  at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:463)
  at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:185)
  at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:177)
  at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:806)
  at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:791)
  at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:694)
  at android.app.ContextImpl.openOrCreateDatabase (ContextImpl.java:571)
  at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:269)
  at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:223)
  at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:163)
  at com.reactnativecommunity.asyncstorage.ReactDatabaseSupplier.ensureDatabase (ReactDatabaseSupplier.java:88)
  at com.reactnativecommunity.asyncstorage.AsyncStorageModule.ensureDatabase (AsyncStorageModule.java:435)
  at com.reactnativecommunity.asyncstorage.AsyncStorageModule.access$000 (AsyncStorageModule.java:35)
  at com.reactnativecommunity.asyncstorage.AsyncStorageModule$1.doInBackgroundGuarded (AsyncStorageModule.java:135)
  at com.reactnativecommunity.asyncstorage.AsyncStorageModule$1.doInBackgroundGuarded (AsyncStorageModule.java:132)
  at com.facebook.react.bridge.GuardedAsyncTask.doInBackground (GuardedAsyncTask.java:32)
  at com.facebook.react.bridge.GuardedAsyncTask.doInBackground (GuardedAsyncTask.java:20)
  at android.os.AsyncTask$2.call (AsyncTask.java:296)
  at java.util.concurrent.FutureTask.run (FutureTask.java:237)
Caused by: android.database.sqlite.SQLiteReadOnlyDatabaseException: 
  at android.database.sqlite.SQLiteConnection.nativeExecute (Native Method)
  at android.database.sqlite.SQLiteConnection.execute (SQLiteConnection.java:553)
  at android.database.sqlite.SQLiteConnection.setLocaleFromConfiguration (SQLiteConnection.java:382)

Expected behavior

No crash

Repro steps

I don't have s I don't know the steps to reproduce as it happened in the production app on some user's phone.

Environment

  • Async Storage version: 1.6.1
  • React-Native version: 0.60.4
  • Platform tested: Android
  • Logs/Error that are relevant: Pasted above

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions