Thanks to visit codestin.com
Credit goes to github.com

Skip to content

"libsqlcipher.so" not found - Only on Pixel 6 Pro Android 12 #60

Open
@roudikk

Description

@roudikk

Hello,
Our app just started receiving this exception on Crashlytics:

Fatal Exception: java.lang.UnsatisfiedLinkError
dlopen failed: library "libsqlcipher.so" not found

This started to happen suddenly on different app versions. The code of loading sqlcipher hasn't changed. We did recently update to 4.8 but the crash was also happening on other app versions that had different versions of sqlcipher.

It's not happening to all our users, but it's 100% just on Pixel 6 Pro running Android 12. (About 80~ users)

The lib folder generated (Both in aab and apks generated from that aab for Pixel 6 Pro) contain the libsqlcipher.so file for the right target (arm64-v8a) and other targets.

We got a Pixel 6 pro, rolled back to Android 12 and couldn't reproduce the issue.

We saw many instances in the github issues over here where people mentioned using ReLinker or SplitInstallHelper, so we released a version that does the following:

private fun loadInSqlCipher(context: Context) {
    val sqlCipherLibraryName = "sqlcipher"
    try {
        System.loadLibrary(sqlCipherLibraryName)
    } catch (throwable: Throwable) {
        try {
            SplitInstallHelper.loadLibrary(context, sqlCipherLibraryName)

            // send log that indicates that this worked through SplitInstallHelper
        } catch (throwable: Throwable) {
            ReLinker.loadLibrary(context, sqlCipherLibraryName)

            // send log that indicates that this worked through ReLinker
        }
    }
}

But unfortunately the same amount of crashes happening before is still happening but with a different trace since now ReLinker is the last resort:

Could not find 'libsqlcipher.so'. Looked for: [arm64-v8a, armeabi-v7a, armeabi], but only found: [].

Unfortunately I couldn't replicate this at all so can't provide any code snippet.

Any help would be appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions