Skip to content

Fatal Exception: net.sqlcipher.database.SQLiteException file is encrypted or is not a database: create locale table failed #246

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
surajnavkudkarpersonal opened this issue Jul 11, 2016 · 6 comments

Comments

@surajnavkudkarpersonal
Copy link

surajnavkudkarpersonal commented Jul 11, 2016

Hi,

I am getting the exception for some devices mainly for Vivo v3,Samsung Galaxy Grand Quattro GT-I8552 , and sony experia e.

Version used of library: 'net.zetetic:android-database-sqlcipher:3.5.1@aar'
OS Version: 5.1.1
Device: vivo V3
RAM Free: 75.5%
Disk Free: 73.7%

Fatal Exception: java.lang.RuntimeException: An error occured while executing doInBackground()
at android.os.AsyncTask$3.done(AsyncTask.java:304)
at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:355)
at java.util.concurrent.FutureTask.setException(FutureTask.java:222)
at java.util.concurrent.FutureTask.run(FutureTask.java:242)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Caused by net.sqlcipher.database.SQLiteException: file is encrypted or is not a database: create locale table failed
at net.sqlcipher.database.SQLiteDatabase.native_setLocale(SQLiteDatabase.java)
at net.sqlcipher.database.SQLiteDatabase.setLocale(SQLiteDatabase.java:2474)
at net.sqlcipher.database.SQLiteDatabase.openDatabaseInternal(SQLiteDatabase.java:2338)
at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:1087)
at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:1150)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:162)
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:129)
at com.xxx.xxx.database.DBOperation.getDatabase(DBOperation.java:37)
at com.xxx.xxx.database.DBOperation.endTransaction(DBOperation.java:58)

@developernotes
Copy link
Member

Hello @suraj9781

It appears that you have an older sqlcipher.jar version being included within your application. The 3.5.1 version of SQLCipher for Android does not make a call to setLocale(…). You should also consider upgrading to the latest release of SQLCipher for Android which is currently 3.5.2.

@foben
Copy link

foben commented Sep 29, 2016

@developernotes :I am working on an app that reports a very similar stacktrace 'in the wild'. The app uses version 3.3.1-2 of SQLCipher and the SQLCipher part of the Stacktrace is identical from
at net.sqlcipher.database.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:162)
on. Is there a chance this error is resolved if I upgrade to the current version, e.g. is there a known issue here?

@developernotes
Copy link
Member

Hi @foben

It is difficult to say what caused your exception to occur without additional information. Have you tried upgrading to the latest release yet?

@foben
Copy link

foben commented Sep 29, 2016

@developernotes thank you for your reply. Unfortunately, the error is not reproducible locally, but we can see the error happenening to users. Therefore, I can not easily verify if an upgrade solves the problem.

I'd like to know if there is a known issue with older versions that cause this error on some API and/or device configurations.

@developernotes
Copy link
Member

Hello @foben

There is no known issue, the setLocale(…) call has been removed in recent versions of SQLCipher for Android. I would recommend updating your library.

@foben
Copy link

foben commented Sep 29, 2016

@developernotes alright, thanks for your reply!

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

3 participants