storesafe / cordova-sqlcipher-adapter

A Cordova/PhoneGap plugin to create and access encrypted databases on Android, iOS, and Windows with API similar to HTML5/Web SQL API
Other
89 stars 55 forks source link

Android app crash Android 7.1 #77

Closed nsteenbeek closed 5 years ago

nsteenbeek commented 5 years ago

I'm getting crash on Android app, which closes. Below some info from Google Play Console. Any idea?

Android version: 7.1
Crash cluster: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) in libsqlcipher.so
Backtrace:
#00  pc 000000000013fad0  /data/app/com.xxx.v0100-1/lib/arm64/libsqlcipher.so
#01  pc 00000000002cb57c  /data/app/com.xxx.v0100-1/oat/arm64/base.odex
brodycj commented 5 years ago

It looks like something is going on lower-level SQLCipher C library, not specific to Android. Some more information about how your application uses the plugin would be helpful. It would also be great if you could show the result of cordova plugin ls and cordova platform ls.

nsteenbeek commented 5 years ago

code initialisation db

initDatabase(password = "pass") {
    return new Promise((resolve, reject) => {
        const name = this.name.toLowerCase();
        this.db = window.sqlitePlugin.openDatabase({
            name: name,
            location: "default",
            key: `${password}`
        }, resolve, reject);
    });
}

code for query

query(query) {
    return new Promise((resolve, reject) => {
        this.db.transaction(tx => {
            tx.executeSql(query, [], (tx, results) => {
                resolve(results);
            }, (tx, error) => {
                const message = error.message ? error.message : error;
                reject({
                    message: message
                });
            });
        }, reject, resolve);
    });
}

cordova plugin ls

cordova-plugin-camera 2.3.1 "Camera"
cordova-plugin-compat 1.2.0 "Compat"
cordova-plugin-device 1.1.7 "Device"
cordova-plugin-device-motion 1.2.5 "Device Motion"
cordova-plugin-dialogs 1.3.0 "Notification"
cordova-plugin-file 4.3.3 "File"
cordova-plugin-file-opener2 2.0.19 "File Opener2"
cordova-plugin-geolocation 2.4.3 "Geolocation"
cordova-plugin-ignore-lint-translation 0.0.1 "cordova-plugin-ignore-lint-translation"
cordova-plugin-inappbrowser 1.7.2 "InAppBrowser"
cordova-plugin-ios-non-exempt-encryption 1.0.0 "ITSAppUsesNonExemptEncryption false"
cordova-plugin-media 2.4.1 "Media"
cordova-plugin-media-capture 1.4.3 "Capture"
cordova-plugin-network-information 1.3.4 "Network Information"
cordova-plugin-whitelist 1.3.3 "Whitelist"
cordova-sqlcipher-adapter 0.1.11 "Cordova sqlcipher adapter"

cordova platform ls

Installed platforms:
  android 6.3.0
Available platforms:
  browser ~5.0.1
  ios ~4.5.4
  osx ~4.0.1
  windows ~6.0.0
nsteenbeek commented 5 years ago

Problem didn't occur after using 0.1.12-rc2. So, let's close for now.