sqlite icon indicating copy to clipboard operation
sqlite copied to clipboard

feat: Add support for Android devices with 16 KB page size

Open slav-petev opened this issue 1 year ago • 10 comments

Hello,

I'm working on a Capacitor project which uses capacitor-community-sqlite-6.0.2. Using an Android 15 emulator(API Level 35), which supports 16 KB page size(a new Android 15 feature described here), my app keeps crashing with a segmentation fault error.

After investigating the issue, I discovered that the culprit was

implementation 'net.zetetic:android-database-sqlcipher:4.5.3'

inside the android/build.gradle file.

Checking the android-database-sqlcipher repository, I discovered that it has been deprecated and its long-term relacement is here. I also discovered that version 4.6.1(as described in this issue already supports Android 15 devices with 16 KB page size.

Could you please change the following line inside the android/build.gradle file from

implementation 'net.zetetic:android-database-sqlcipher:4.5.3'

to

implementation "net.zetetic:sqlcipher-android:4.6.1@aar"

Thank you in advance!

slav-petev avatar Oct 06 '24 20:10 slav-petev

Would you be willing to create a PR?

robingenz avatar Oct 07 '24 08:10 robingenz

Hey, @robingenz, sure, I'll work on it and link it.

Thanks

slav-petev avatar Oct 07 '24 08:10 slav-petev

Hi!

I submitted a PR to do this upgrade: https://github.com/capacitor-community/sqlite/pull/607

dragermrb avatar Dec 11 '24 18:12 dragermrb

Thanks for working on this - solved the crash issue I was seeing!

DGeoWils avatar Feb 24 '25 14:02 DGeoWils

I had this problem as well and used the fix by @dragermrb. Thank you!

delisa-glover avatar Mar 07 '25 23:03 delisa-glover

Hi, I have the same problem in my capacitor app.

Is there any release planed or can I temporary fix it for myself until the fix is published?

RomanDrechsel avatar May 09 '25 18:05 RomanDrechsel

I think you can install a PR on your project:

npm i capacitor-community/sqlite#pull/607

Note that the PR doesn't include the latest changes on capacitor-community/sqlite

dragermrb avatar May 10 '25 06:05 dragermrb

Hi, i tryed but it doesn't work

[ERROR] TS2307: Cannot find module '@capacitor-community/sqlite' or its corresponding type declarations. [plugin angular-compiler]

RomanDrechsel avatar May 10 '25 09:05 RomanDrechsel

You can download the plugin, build locally and install from the local copy

Donwload and extract: https://github.com/dragermrb/sqlite/archive/refs/heads/fix-16kb-pagesize.zip

cd ./fix-16kb-pagesize
npm i
npm run build

cd /path-to-your-app
npm i ../path-to/fix-16kb-pagesize

dragermrb avatar May 13 '25 16:05 dragermrb

Here is a dev release for testing:

npm i @capacitor-community/[email protected]

If no bugs are reported in the next few days, I'll merge the PR from @dragermrb (#607).

robingenz avatar May 21 '25 17:05 robingenz

@robingenz Just checking in - any updates on when this fix will be released?

davinderclerisy avatar Jul 01 '25 06:07 davinderclerisy

Closed by #607

robingenz avatar Jul 09 '25 12:07 robingenz