-
Notifications
You must be signed in to change notification settings - Fork 46
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
SqfliteDatabaseException DatabaseException(open_failed /var/mobile/Containers/Data/Application/.../Documents/database_name.db) #99
Comments
That can happen when you are providing the wrong password to an encrypted database. Are you opening a database bundled in the app assets or are you encrypting a fresh database? |
@davidmartos96 Fresh database, but I'm sure 100% that the password is correct. Now I'm also investigating in this and if I have reached to the root cause I will mention it here. But if you have any other ideas why this may happen just let me know. |
I would double check if you have sqlcipher correctly installed. You can open a memory database with sqflite without password and then run "PRAGMA cipher_version" on the database. You should see SQLCipher and the version number. If you don't, it means that something is not correctly configured |
@davidmartos96 Actually I have run "PRAGMA cipher_version" and it prints successfully "SQLCipher Version: 4.5.7 community". |
In that case I can only think the following:
I'd try deleting the file in the device and try fresh with your latest code. Maybe it was previously encrypted with a different password. You can also check the SQLCipher related tests (in the lib folder) in the example app in the repository |
@davidmartos96 Okay will check, but this plugin is always using 4x version and I didn't use anything else to open the database. Thanks for you quick replies and support |
I'm facing this on the latest version
SqfliteDatabaseException DatabaseException(open_failed/var/mobile/Containers/Data/Application/.../Documents/database_name.db)
The text was updated successfully, but these errors were encountered: