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
Sqlcipher Crash after upgrade from 3.x to 4.x #446
Comments
Hi @bazimogmbh, Can you detail how the password/key material is created/sourced? |
Hello @developernotes, it is a MD5 Hash value (32 chars) of some random stuff we generate and results into something like e.g. 5f069735546a1e07738ac92d06d256fb |
Hi @bazimogmbh As a follow-up, a few more questions:
This information will be helpful to understand what the cause may be. |
Hi @developernotes,
|
I've experienced the same crash after upgrading from v3.5.4. to v4.1.3 |
@mreid-projects - are you also using random bytes as key material and using |
Hello @bazimogmbh
Because of this, the issue may exist with the device itself. Do you have any of the reported devices to verify the behavior on?
We look forward to hearing the result value returned from the |
@sjlombardo - I have tried upgrading to SQLCipher 4.2.0 and using
...but I get the following error:
|
The |
Sqlcipher is calling the native method for SQLiteDatabase.dbopen(java.lang.String, int) but that method does not exist in the Android SQLiteDatabase class. |
We publish an AAR package (the latest here), we do not publish GreenDAO. You didn't mention whether you are using ProGuard, but as I mentioned above, that can often strip symbols from packaging producing runtime errors you are experiencing. As to whether the issue exists with GreenDAO which appears to be bundling SQLCipher for Android, that was speculative. You might try running the SQLCipher for Android test suite and compare your project integration. What CPU architecture are you experiencing this issue on? |
I am testing without Proguard and am currently pulling in version 3.5.4 of sqlcipher, for use by GreenDAO. The device that I'm testing with is a Nokia 3.1 which is running Android 9 (64-bit) on an ARM Cortex-A53. The test suite says "SQLCipher for Android runs on Android 4–Android 8, for armeabi, armeabi-v7a, x86, x86_64, and arm64_v8a architectures." |
Hello @mreid-projects We will update that message, we support a minimum of API 14 on 32-bit platforms, and API 21 on 64-bit platforms, currently including Android 9. |
ok thanks. Does version 3.5.4 support 64-bit Android targets? |
SQLCipher for Android added support for 64-bit platforms with the release of SQLCipher 3.4.1. |
Hello @developernotes , |
Hello @mreid-projects ,
|
I tried upgrading from v3.5.4 to v3.5.9 and it has fixed my problem. |
Hello, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "bug", "enhancement", or "security" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to reopen with up-to-date information. |
After migrating the sqlcipher from v 3.5.9 to v 4.2.0 , we are seeing a lot of crashes, mostly on
Galaxy S7, S8, A5(2017) & J7 Pro devices, with android version 8 & 9 installed.
The upgrade seems to work well for all the other users.
This is the hook used for the migration
The database exists, the password is correct, but the migration fails it seems and the app crashes. When i provide the users an apk with old v3.5.9 sqlcipher build after they have installed the new build with v4.2.0, everything works again.
Here is the Stack trace.
We also noticed, that a lot of users were complaining about how slow the app has become, and after running some tests, we found out that using this makes sqlcipher faster again :
encryptedDb.execSQL("PRAGMA cipher_memory_security = OFF");
The text was updated successfully, but these errors were encountered: