-
Notifications
You must be signed in to change notification settings - Fork 20
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 (code 26) crash after calling changePassword() #22
Comments
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 |
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 |
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
).The text was updated successfully, but these errors were encountered: