Skip to content

UnsatisfiedLinkError: Couldn't load sqlcipher_android from loader #145

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

Closed
TheNephilim88 opened this issue Nov 13, 2014 · 3 comments
Closed

Comments

@TheNephilim88
Copy link

Hey.

I am using SQLCipher 3.2.0 in my app, which is working well on most devices. Unfortunately I am getting very rare bug reports on developer console:

java.lang.UnsatisfiedLinkError: Couldn't load sqlcipher_android from loader dalvik.system.PathClassLoader[dexPath=/system/framework/multiwindow.jar:/data/app/com.myapp-2.apk,libraryPath=/data/app-lib/com.myapp-2]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:358)
at java.lang.System.loadLibrary(System.java:526)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(Unknown Source)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(Unknown Source)

Affected devices: Galaxy S5, S2
Affected Android versions: 4.4 & 4.1

For now I currently only have very few of those bug reports (4 bug reports, but way more than 50.000 active installs, that updated to new version of my app, that now includes SQLCipher (didnt use it before)), but of course I want to know why this is happening and how to prevent this.
Unfortunately I am not able to reproduce this behaviour on any of my testing devices.

Another thing what is strange to me: a friend of mine is using Galaxy S5 with Android KitKat 4.4 - also on his device everything is working very well.

Any ideas?

@developernotes
Copy link
Member

Hi @Reneph

I am not aware of what might cause this error unless the apk either was not including the native libraries correctly, or there was a failure during the installation to properly copy over the native libraries. That said, without being able to reproduce this it is difficult to isolate a cause. If you are ever able to reproduce this, I would like to know if you can in fact locate the native libraries on the device, and following that, if a reinstall of the application resolves the issue.

@TheNephilim88
Copy link
Author

Thanks for your answer :)

So some feedback:
It seems that somehow the installations went wrong on those devices that reported this bug. Anyhow they didnt had the native libraries on the device after installation. After they reinstalled the app (same version - so I changed nothing!) its working without any problems.

Now I catch this exception and show an error message with the hint to reinstall.

Is there any way to fix this without reinstalling?

@developernotes
Copy link
Member

Hi @Reneph

Thank you for getting back to us, we are glad to hear that a reinstall resolved the issue. I am not aware of another solution, nor do I know what caused the installation failure initially.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants