3

I use helpshift in my app and catch this crash. It happened in some device, but not all. Please, help me fix this crash.

Fatal Exception: android.database.sqlite.SQLiteDiskIOException: disk I/O error (code 1802)
Error Code : 1802 (SQLITE_IOERR_FSTAT)
Caused By : Failed to get database file information with system call stat(). Please confirm whether database file has been removed.
(disk I/O error (code 1802))
   at android.database.sqlite.SQLiteConnection.nativeExecute(SQLiteConnection.java)
   at android.database.sqlite.SQLiteConnection.execute(SQLiteConnection.java:683)
   at android.database.sqlite.SQLiteSession.endTransactionUnchecked(SQLiteSession.java:437)
   at android.database.sqlite.SQLiteSession.endTransaction(SQLiteSession.java:401)
   at android.database.sqlite.SQLiteDatabase.endTransaction(SQLiteDatabase.java:527)
   at com.helpshift.storage.KeyValueDbStorage.set(KeyValueDbStorage.java:81)
   at com.helpshift.model.SdkInfoModel.setFirstLaunch(SdkInfoModel.java:141)
   at com.helpshift.campaigns.controllers.DeviceController.onBackground(DeviceController.java:300)
   at com.helpshift.app.MainLifecycleCallback$1.run(MainLifecycleCallback.java:44)
   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)
Grokify
  • 15,092
  • 6
  • 60
  • 81

1 Answers1

0

You need to call

db = dbHelper.getWritableDatabase(); 

this in your constructor of your database class

Ajay Venugopal
  • 1,544
  • 1
  • 17
  • 30