Open mustafa-antonio opened 10 months ago
Hi @mustafa-antonio,
Thank you for your report and sample project, we will look into this and share our feedback once reviewed.
@developernotes is there any update on this? We've met the similar crash from android-database-sqlcipher like https://discuss.zetetic.net/t/fatal-exception-net-sqlcipher-database-sqliteexception-file-is-not-a-database-while-compiling-select-count-from-sqlite-master/4675 We plan to update the library and a bit worry to see this again here.
Hello @mustafa-antonio,
I have pushed up a fix, and unit test to address the issue of changing a password while using the Room API. The issue was the non-primary connection was not being closed following the rekey operation on the primary connection. Your subsequent query following the rekey would run using the non-primary connection which was previously keyed with the originating, now incorrect password. The fix is here and will be included in our next public release. In the interim, you can close and reopen your connection during a password change event. Thank you again for providing a recreation scenario.
Hi @anhndt3,
Are you able to provide an isolated recreation of the behavior you are seeing? If so, we would be happy to investigate the issue further. If you are using android-database-sqlcipher
, you might consider adding a separate recreation test within the test suite.
Thanks for replying and pushing fix up, I am updating the library, haven't got the issue so far, just wonder the same issue still occurs or not. I will let you know if there's problem and reproduce sample.
@developernotes thanks for letting me know. Will check that out in next week after holidays.
Looks like
changePassword()
does something incorrectly and throws this error when we call Room DAO query after. Happens in my production app and could be reproduced in sample project I attached to this issue (tested on Pixel 6a emulator with Android 14).sqlciphertest.zip
Unless I'm missing some steps when performing password change? Issue appears in
4.5.4
&4.5.5
version (possibly earlier versions too but haven't checked them).Issue doesn't appear in legacy counterpart
android-database-sqlcipher
(4.5.4
).