Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file is not a database: , while compiling: select count(*) from sqlite_master; #906

Open
yogeshpaliyal opened this issue Jun 28, 2024 · 0 comments
Labels
help wanted Extra attention is needed

Comments

@yogeshpaliyal
Copy link
Owner

Describe the bug
Error Stack

Exception android.database.sqlite.SQLiteException: file is not a database: , while compiling: select count(*) from sqlite_master;
  at net.sqlcipher.database.SQLiteCompiledSql.native_compile (SQLiteCompiledSql.java)
  at net.sqlcipher.database.SQLiteCompiledSql.compile (SQLiteCompiledSql.java)
  at net.sqlcipher.database.SQLiteCompiledSql.<init> (SQLiteCompiledSql.java)
  at net.sqlcipher.database.SQLiteProgram.<init> (SQLiteProgram.java)
  at net.sqlcipher.database.SQLiteQuery.<init> (SQLiteQuery.java:2)
  at net.sqlcipher.database.SQLiteDirectCursorDriver.query (SQLiteDirectCursorDriver.java:2)
  at net.sqlcipher.database.SQLiteDatabase.rawQueryWithFactory (SQLiteDatabase.java)
  at net.sqlcipher.database.SQLiteDatabase.rawQuery (SQLiteDatabase.java:2)
  at net.sqlcipher.database.SQLiteDatabase.keyDatabase (SQLiteDatabase.java)
  at net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal (SQLiteDatabase.java:1)
  at net.sqlcipher.database.SQLiteDatabase.openDatabase (SQLiteDatabase.java:4)
  at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase (SQLiteDatabase.java:9)
  at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:2)
  at net.sqlcipher.database.SupportHelper.getWritableDatabase (SupportHelper.java:6)
  at androidx.room.RoomDatabase.inTransaction (RoomDatabase.kt:5)
  at androidx.room.RoomDatabase.assertNotSuspendingTransaction (RoomDatabase.kt:5)
  at com.yogeshpaliyal.common.db.DbDao_Impl.getAllAccountsAscending (DbDao_Impl.java:129)
  at com.yogeshpaliyal.keypass.ui.home.DashboardViewModel$queryUpdated$1.invokeSuspend (DashboardViewModel.kt:129)
  at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith (ContinuationImpl.kt:9)
  at kotlinx.coroutines.DispatchedTask.run (DispatchedTask.kt:97)
  at kotlinx.coroutines.scheduling.TaskImpl.run (Tasks.kt:3)
  at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely (CoroutineScheduler.java:92)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask (CoroutineScheduler.kt:92)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker (CoroutineScheduler.kt:92)
  at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run (CoroutineScheduler.kt:92)

We were not seeing this issue in v1.4.28 but getting in v1.4.29 and there is no changes releated to DB, sqlcipher, room, etc.

Here is the change logs from v1.4.28 → v1.4.29 1

Here is my SqlCipher file where I am initiating the DB. AppModule.kt

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@yogeshpaliyal yogeshpaliyal added the help wanted Extra attention is needed label Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant