Skip to content

No implementation found for native Lnet/sqlcipher/database/SQLiteDatabase;.dbopen (Ljava/lang/String;I)V #58

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
pstegegn opened this issue Jun 9, 2012 · 14 comments

Comments

@pstegegn
Copy link

pstegegn commented Jun 9, 2012

06-26 11:38:53.559: W/dalvikvm(22382): No implementation found for native Lnet/sqlcipher/database/SQLiteDatabase;.dbopen (Ljava/lang/String;I)V
06-26 11:38:53.559: D/AndroidRuntime(22382): Shutting down VM
06-26 11:38:53.559: W/dalvikvm(22382): threadid=1: thread exiting with uncaught exception (group=0x40018560)
06-26 11:38:53.569: E/AndroidRuntime(22382): FATAL EXCEPTION: main
06-26 11:38:53.569: E/AndroidRuntime(22382): java.lang.UnsatisfiedLinkError: dbopen
06-26 11:38:53.569: E/AndroidRuntime(22382): at net.sqlcipher.database.SQLiteDatabase.dbopen(Native Method)
06-26 11:38:53.569: E/AndroidRuntime(22382): at net.sqlcipher.database.SQLiteDatabase.(SQLiteDatabase.java:2030)
06-26 11:38:53.569: E/AndroidRuntime(22382): at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:931)
06-26 11:38:53.569: E/AndroidRuntime(22382): at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1010)
06-26 11:38:53.569: E/AndroidRuntime(22382): at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:236)
06-26 11:38:53.569: E/AndroidRuntime(22382): at com.viber.voip.contacts.ViberContactsProvider.onCreate(ViberContactsProvider.java:53)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.content.ContentProvider.attachInfo(ContentProvider.java:798)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.app.ActivityThread.installProvider(ActivityThread.java:3706)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.app.ActivityThread.installContentProviders(ActivityThread.java:3461)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3417)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.app.ActivityThread.access$2200(ActivityThread.java:123)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:977)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.os.Handler.dispatchMessage(Handler.java:99)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.os.Looper.loop(Looper.java:130)
06-26 11:38:53.569: E/AndroidRuntime(22382): at android.app.ActivityThread.main(ActivityThread.java:3835)
06-26 11:38:53.569: E/AndroidRuntime(22382): at java.lang.reflect.Method.invokeNative(Native Method)
06-26 11:38:53.569: E/AndroidRuntime(22382): at java.lang.reflect.Method.invoke(Method.java:507)
06-26 11:38:53.569: E/AndroidRuntime(22382): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864)
06-26 11:38:53.569: E/AndroidRuntime(22382): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622)
06-26 11:38:53.569: E/AndroidRuntime(22382): at dalvik.system.NativeStart.main(Native Method)
06-26 11:38:53.589: W/ActivityManager(224): Force finishing activity com.viber.voip/.Encrypt
06-26 11:38:54.089: W/ActivityManager(224): Activity pause timeout for HistoryRecord{4057b378 com.viber.voip/.Encrypt}

@developernotes
Copy link
Member

Hi pstegegn,

Could you verify that all of the native libraries were deployed? If you could run your application on an emulator and then issue the following in a terminal, please share the results:

adb shell
cd /data/data/[YourPackageName]  #possibly com.viber.voip
ls lib

@pstegegn
Copy link
Author

Hi Parker,
I have checked that the three of .so native libraries do exist. but icudt46l.zip is not deployed. There is only lib and databeses(which is empty) folder on appplication /data/data/com.viber.voip file directiry. I am using sqlcipher for android 1.1.0 and testing on android 2.3.7 platform.
Its been week trying to fix this error. thanks in advance

ls lib
libVoipEngineNative.so libsqlcipher_android.so
libdatabase_sqlcipher.so libstlport_shared.so

@developernotes
Copy link
Member

Hi pstegegn,

The icudt46l.zip file belongs to the 2.0 release of SQLCipher for Android, it is not compatible with 1.1.0. If you are just integrating SQLCipher for the first time, it would be best to use the latest release, 2.0.5 which can be found here. The icu46dtl.zip file should be placed in your assets directory, but will be expanded into a folder called icu in the files directory on a 2.3.7 device. Could you try that and report back? Thanks!

@pstegegn pstegegn reopened this Jun 12, 2012
@developernotes
Copy link
Member

Hi pstegegn,

I received a message from you, but it isn't displaying here. You closed the issue and then reopened it. You mentioned some customizations to the sqlcipher.jar. Would it be possible for you to drop in the new 2.0.5 binaries to verify whether or not you see the same issue? Thanks!

@pavaniakella
Copy link

Can you post how you solved this problem...
Thanks in advance..

Regards,
Pavani

@developernotes
Copy link
Member

Hi Pavani,

You can find a detailed article covering the setup of a project that uses SQLCipher for Android here. The issue above was a missing icudt46l.zip file in the assets folder of the application that is required.

@HansSchlegel
Copy link

hi,
I get this message occasionally in my developer console. Shortly I was lucky to see it on one of my devices.

java.lang.UnsatisfiedLinkError: Native method not found: net.sqlcipher.database.SQLiteDatabase.dbopen:(Ljava/lang/String;I)V
at net.sqlcipher.database.SQLiteDatabase.dbopen(Native Method)
at net.sqlcipher.database.SQLiteDatabase.(SourceFile:1950)
at net.sqlcipher.database.SQLiteDatabase.openDatabase(SourceFile:900)
at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SourceFile:943)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SourceFile:112)

This happens only by chance and not very often. Still it is annoying. Do you know what is causing the problem? Seems more like a platform thing.

@developernotes
Copy link
Member

Hi HansSchlegel,

The dbopen call is a native method, a likely cause is that the native .so files were not included in the apk package. Can you verify the contents of your apktool?

@HansSchlegel
Copy link

hello developernotes,
I have ensured that the .so files are part of my apk. If they were missing I would assume to have this error every time. The thing is that I had this error only once on my device and few customer reported this error.

@developernotes
Copy link
Member

Hi HansSchlegel,

The only other reason this might be occurring is if the client code is not calling SQLiteDatabase.loadLibs(...) as this call loads the native libraries into the running image to support calls such as dbopen. Please let us know if you are able to consistently reproduce the issue.

@pavaniakella
Copy link

It happened only because of the version of sqlcipher I was using which
contains older .zip file in assets folder. Please go through the link
provided by nick and replace ur files and check whether it re occurs or not.
On 9 May 2013 18:55, "Nick Parker" [email protected] wrote:

Hi HansSchlegel,

The only other reason this might be occurring is if the client code is not
calling SQLiteDatabase.loadLibs(...) as this call loads the native
libraries into the running image to support calls such as dbopen. Please
let us know if you are able to consistently reproduce the issue.


Reply to this email directly or view it on GitHubhttps://github.com//issues/58#issuecomment-17663936
.

@darshanz
Copy link

darshanz commented Aug 6, 2014

i m having the same problem, i can only see three .so files in data/data/com.technoguff.sciencequiz/libs
but i m not sure where does the zip file get extracted. there is not files directory.
is this issue solved?
hi @pstegegn , have you solved the issue.
I need help.

@developernotes
Copy link
Member

Hi @pstegegn,

Can you attempt to run the SQLCipher for Android test suite - do those run properly for you? If so, can you compare your project configuration with that, looking for any differences?

@svaithia
Copy link

I forgot to call SQLiteDatabase.loadLibs(this); in my MainActivity, which gave me this error.

Once I added it, the code seemed to work fine for me.

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

6 participants