Closed martin-headspace closed 5 months ago
What is the version of SQLCipher in your Podfile.lock?
What is the version of SQLCipher in your Podfile.lock?
I believe it should be 4.4.2
- sqflite_sqlcipher (0.0.1):
- Flutter
- FMDB/SQLCipher (~> 2.7.5)
- SQLCipher (= 4.4.2)
- SQLCipher (4.4.2):
- SQLCipher/standard (= 4.4.2)
- SQLCipher/common (4.4.2)
- SQLCipher/standard (4.4.2):
- SQLCipher/common
File is not a database is thrown usually when you are trying to use an encrypted database without specifying a password. Can you double check that the database you are opening doesn't need a password? I would download that file into your machine and then open it there with sqlite3 CLI or with some GUI. If you are saying it doesn't have a password it should open externally. If it doesn't, somehow it now requires a password. If you go back right now to that previous version, does it work?
File is not a database is thrown usually when you are trying to use an encrypted database without specifying a password. Can you double check that the database you are opening doesn't need a password? I would download that file into your machine and then open it there with sqlite3 CLI or with some GUI. If you are saying it doesn't have a password it should open externally. If it doesn't, somehow it now requires a password. If you go back right now to that previous version, does it work?
I'll try opening on an external sqlite3 tool and yes! If I roll back to that previous version, it does work w/o ever providing that password.
I was able to open it on an external sqlite3 tool, so my guess is that since we created this DB using sqlcipher3, now that we're trying to open it using sqlcipher 4 it's become incompatible.
Could this be the case? If so, is there a known pathway to upgrade people's dBs?
I'm not totally understanding. Is there any particular reason you are not providing the password? Which database did you encrypt with SQLCipher 3?
To upgrade you have a couple commands that you would need to execute.
https://discuss.zetetic.net/t/upgrading-to-sqlcipher-4/3283
This package has always used 4.x that is what is confusing me about your setup.
Also, what's the output of the following query ?
PRAGMA cipher_version
@martin-headspace Were you able to find the cause?
Closing. The last version of sqflite_sqlcipher
doesn't need the fmdb_override workaround anymore.
I recently bumped one of my app's version of sqflite_sqlcipher on the
fmdb_override
branch to use the latest version.My app was previously pointing to commit SHA 215d933108e6c0a11d87fd342e8cb04bb1d2e918 from back in September 17th, 2022 where we used a library without a password. However, now that I'm pointing to the very latest version I'm getting the following error:
This is how my initialization code looks like:
Is there a pathway to fix this? I've read through the README and these issues:
But I couldn't find any conclusive solutions to my issue. Please help