# E/SQLiteLog: (1) no such table: room\_table\_modification\_log in "INSERT OR IGNORE INTO room\_table\_modification\_log VALUES(2, 0)"

**URL:** <https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588>\
**Category:** SQLCipher\
**Created:** [October 7, 2022, 12:12pm UTC](https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588 "2022-10-07T12:12:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alain\_El\_Hakim](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/alain_el_hakim/32/1829_2.png) [@Alain\_El\_Hakim](https://discuss.zetetic.net/u/Alain_El_Hakim)\
**Post date:** [October 7, 2022, 12:12pm UTC](https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588/1 "2022-10-07T12:12:52Z")

</div>

Hi,

We are trying implement your new library for android “implementation net.zetetic:sqlcipher-android:4.5.2@aar” – community edition but we see this error:

E/SQLiteLog: (1) no such table: room\_table\_modification\_log in “INSERT OR IGNORE INTO room\_table\_modification\_log VALUES(2, 0)”  
E/AndroidRuntime: FATAL EXCEPTION: main  
Process: PID: 7682  
net.zetetic.database.sqlcipher.SQLiteException: no such table: room\_table\_modification\_log (code 1): , while compiling: INSERT OR IGNORE INTO room\_table\_modification\_log VALUES(2, 0)  
at net.zetetic.database.sqlcipher.SQLiteConnection.nativePrepareStatement(Native Method)  
at net.zetetic.database.sqlcipher.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:922)  
at net.zetetic.database.sqlcipher.SQLiteConnection.prepare(SQLiteConnection.java:533)  
at net.zetetic.database.sqlcipher.SQLiteSession.prepare(SQLiteSession.java:592)  
at net.zetetic.database.sqlcipher.SQLiteProgram.(SQLiteProgram.java:64)  
at net.zetetic.database.sqlcipher.SQLiteStatement.(SQLiteStatement.java:37)  
at net.zetetic.database.sqlcipher.SQLiteDatabase.executeSql(SQLiteDatabase.java:1992)  
at net.zetetic.database.sqlcipher.SQLiteDatabase.execSQL(SQLiteDatabase.java:1901)  
at androidx.room.InvalidationTracker.startTrackingTable(InvalidationTracker.java:250)  
at androidx.room.InvalidationTracker.syncTriggers(InvalidationTracker.java:559)  
at androidx.room.RoomDatabase.internalBeginTransaction(RoomDatabase.java:567)  
at androidx.room.RoomDatabase.beginTransaction(RoomDatabase.java:555)

```
    at androidx.room.CoroutinesRoom$Companion$execute$2.invokeSuspend(CoroutinesRoom.kt:65)
    at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
    at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
    at androidx.room.TransactionExecutor$1.run(TransactionExecutor.java:47)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:920)

```

Description:  
Database initialization works but select from db return error.

Initialization:  
System.loadLibrary(“sqlcipher”)

val factory = SupportOpenHelperFactory(password.toByteArray())

return Room  
.databaseBuilder(  
appContext,  
Database::class.java,  
DATABASE\_NAME  
)  
.openHelperFactory(  
factory  
)  
.addMigrations(

```
)
.build()

```

Libraries:  
com.google.dagger/hilt  
androidx.room  
androidx.paging  
net.zetetic:sqlcipher-android

Any hints on what could we do to overcome this error?

Thanks

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [October 7, 2022, 1:26pm UTC](https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588/2 "2022-10-07T13:26:51Z")

</div>

Hi @Alain_El_Hakim

Can you pull the database off the device and inspect it, possibly via DB Browser for SQLite \[1\]? Is the table `room_table_modification_log` present?

* * *

1. [https://sqlitebrowser.org](https://sqlitebrowser.org)

---

<div class="post-metadata">

**Author:** ![Alain\_El\_Hakim](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/alain_el_hakim/32/1829_2.png) [@Alain\_El\_Hakim](https://discuss.zetetic.net/u/Alain_El_Hakim)\
**Post date:** [October 11, 2022, 10:53am UTC](https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588/3 "2022-10-11T10:53:15Z")

</div>

Hi @developernotes ,

Thank you for your prompt reply, we’ve checked a fresh installation, room\_table\_modification\_log is not present.

Thanks and take care,  
A.

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [October 11, 2022, 1:03pm UTC](https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588/4 "2022-10-11T13:03:28Z")

</div>

Hi @Alain_El_Hakim

You will need to evaluate your schema creation routine in that case.

---

<div class="post-metadata">

**Author:** ![Alain\_El\_Hakim](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/alain_el_hakim/32/1829_2.png) [@Alain\_El\_Hakim](https://discuss.zetetic.net/u/Alain_El_Hakim)\
**Post date:** [October 20, 2022, 1:54pm UTC](https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588/5 "2022-10-20T13:54:02Z")

</div>

Hi @developernotes ,

room\_table\_modification\_log is in-memory table fully managed (in terms of creation and read/write operations) by Jetpack Room library. The issue we are facing is caused by the fact that process that inserts data to the table runs in parallel with process responsible for table creation and the execution of the first one is finished before the table is actually created.

We understand that described problem might looks like issue in Room library itself or more specifically in the way how we are using it, however we do not experience this issue when we do not use SQLCipher library at all, nor with legacy SQLCipher for Android library. Don’t you know about any changes introduced in new SQLCipher for Android API that might be the cause of the issue.

Thank you in advance

---

<div class="post-metadata">

**Author:** ![developernotes](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/developernotes/32/1309_2.png) [@developernotes](https://discuss.zetetic.net/u/developernotes)\
**Post date:** [October 21, 2022, 9:18pm UTC](https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588/6 "2022-10-21T21:18:50Z")

</div>

Hi @Alain_El_Hakim,

> [@Alain\_El\_Hakim](#):
>
> oom\_table\_modification\_log is in-memory table fully managed (in terms of creation and read/write operations) by Jetpack Room library. The issue we are facing is caused by the fact that process that inserts data to the table runs in parallel with process responsible for table creation and the execution of the first one is finished before the table is actually created.

If this is occurring, you may wish to reach out to the Android Jetpack team \[1\] to file a bug report as the table would need to be created prior to insertion.

* * *

1. [Android Jetpack · GitHub](https://github.com/androidx)

---

<div class="post-metadata">

**Author:** ![Alain\_El\_Hakim](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.zetetic.net/alain_el_hakim/32/1829_2.png) [@Alain\_El\_Hakim](https://discuss.zetetic.net/u/Alain_El_Hakim)\
**Post date:** [December 13, 2022, 3:21pm UTC](https://discuss.zetetic.net/t/e-sqlitelog-1-no-such-table-room-table-modification-log-in-insert-or-ignore-into-room-table-modification-log-values-2-0/5588/7 "2022-12-13T15:21:23Z")

</div>

Hi @developernotes,

I’d like to modify the statement from my last comment and provide a reference to the solution of the problem. The in-memory table mentioned in my last comment was not actually created at all due to the error reported here[[Room integration issue · Issue #7 · sqlcipher/sqlcipher-android · GitHub](https://github.com/sqlcipher/sqlcipher-android/issues/7)].
