net.sqlcipher.database.SQLiteException: file is encrypted or is not a database

Appcelerator JIRA | Marco Cota | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    h3. Issue When working on Android and trying to install a pre-populated database Encrypted database module and open is throwing the following error: {code} [INFO] Database: sqlite returned: error code = 26, msg = file is encrypted or is not a database [ERROR] Database: CREATE TABLE android_metadata failed [ERROR] Database: Failed to setLocale() when constructing, closing the database [ERROR] Database: net.sqlcipher.database.SQLiteException: file is encrypted or is not a database [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.native_setLocale(Native Method) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.setLocale(SQLiteDatabase.java:2102) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.<init>(SQLiteDatabase.java:1968) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:901) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:929) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:936) [ERROR] Database: at appcelerator.encrypteddatabase.EncrypteddatabaseModule.open(EncrypteddatabaseModule.java:83) [ERROR] Database: at appcelerator.encrypteddatabase.EncrypteddatabaseModule.install(EncrypteddatabaseModule.java:145) [ERROR] Database: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR] Database: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [ERROR] Database: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:908) [ERROR] Database: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1131) [ERROR] Database: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347) [ERROR] Database: at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:101) [ERROR] Database: at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:424) [ERROR] Database: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] Database: at android.os.Looper.loop(Looper.java:137) [ERROR] Database: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112) [WARN] W/System.err: java.lang.NullPointerException [WARN] W/System.err: at appcelerator.encrypteddatabase.EncrypteddatabaseModule.open(EncrypteddatabaseModule.java:90) [WARN] W/System.err: at appcelerator.encrypteddatabase.EncrypteddatabaseModule.install(EncrypteddatabaseModule.java:145) [WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [WARN] W/System.err: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:908) [WARN] W/System.err: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1131) [WARN] W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347) [WARN] W/System.err: at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:101) [WARN] W/System.err: at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:424) [WARN] W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) [WARN] W/System.err: at android.os.Looper.loop(Looper.java:137) [WARN] W/System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112) [ERROR] TiExceptionHandler: (main) [947,947] ----- Titanium Javascript Runtime Error ----- [ERROR] TiExceptionHandler: (main) [0,947] - In ti:/invoker.js:101,19 [ERROR] TiExceptionHandler: (main) [0,947] - Message: Uncaught Error: Java Exception occurred [ERROR] TiExceptionHandler: (main) [1,948] - Source: return delegate.apply(invoker.__thisObj__, args); [ERROR] V8Exception: Exception occurred at ti:/invoker.js:101: Uncaught Error: Java Exception occurred {code} During research i found some similar issues in native development: http://stackoverflow.com/questions/13537073/android-sqlcipher-pragma-problems http://stackoverflow.com/questions/20373066/sqlcipher-create-table-android-metadata-failed h3. Steps to reproduce 1. Run alloySample (attached alloySample.zip) Expected Result The database will install and run correctly Actual Result We receive the following error "sqlite returned: error code = 26, msg = file is encrypted or is not a database"

    Appcelerator JIRA | 2 years ago | Marco Cota
    net.sqlcipher.database.SQLiteException: file is encrypted or is not a database
  2. 0

    h3. Issue When working on Android and trying to install a pre-populated database Encrypted database module and open is throwing the following error: {code} [INFO] Database: sqlite returned: error code = 26, msg = file is encrypted or is not a database [ERROR] Database: CREATE TABLE android_metadata failed [ERROR] Database: Failed to setLocale() when constructing, closing the database [ERROR] Database: net.sqlcipher.database.SQLiteException: file is encrypted or is not a database [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.native_setLocale(Native Method) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.setLocale(SQLiteDatabase.java:2102) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.<init>(SQLiteDatabase.java:1968) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:901) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:929) [ERROR] Database: at net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:936) [ERROR] Database: at appcelerator.encrypteddatabase.EncrypteddatabaseModule.open(EncrypteddatabaseModule.java:83) [ERROR] Database: at appcelerator.encrypteddatabase.EncrypteddatabaseModule.install(EncrypteddatabaseModule.java:145) [ERROR] Database: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [ERROR] Database: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [ERROR] Database: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:908) [ERROR] Database: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1131) [ERROR] Database: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347) [ERROR] Database: at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:101) [ERROR] Database: at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:424) [ERROR] Database: at android.os.Handler.dispatchMessage(Handler.java:95) [ERROR] Database: at android.os.Looper.loop(Looper.java:137) [ERROR] Database: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112) [WARN] W/System.err: java.lang.NullPointerException [WARN] W/System.err: at appcelerator.encrypteddatabase.EncrypteddatabaseModule.open(EncrypteddatabaseModule.java:90) [WARN] W/System.err: at appcelerator.encrypteddatabase.EncrypteddatabaseModule.install(EncrypteddatabaseModule.java:145) [WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method) [WARN] W/System.err: at org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62) [WARN] W/System.err: at org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:908) [WARN] W/System.err: at org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1131) [WARN] W/System.err: at org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347) [WARN] W/System.err: at org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:101) [WARN] W/System.err: at ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:424) [WARN] W/System.err: at android.os.Handler.dispatchMessage(Handler.java:95) [WARN] W/System.err: at android.os.Looper.loop(Looper.java:137) [WARN] W/System.err: at org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112) [ERROR] TiExceptionHandler: (main) [947,947] ----- Titanium Javascript Runtime Error ----- [ERROR] TiExceptionHandler: (main) [0,947] - In ti:/invoker.js:101,19 [ERROR] TiExceptionHandler: (main) [0,947] - Message: Uncaught Error: Java Exception occurred [ERROR] TiExceptionHandler: (main) [1,948] - Source: return delegate.apply(invoker.__thisObj__, args); [ERROR] V8Exception: Exception occurred at ti:/invoker.js:101: Uncaught Error: Java Exception occurred {code} During research i found some similar issues in native development: http://stackoverflow.com/questions/13537073/android-sqlcipher-pragma-problems http://stackoverflow.com/questions/20373066/sqlcipher-create-table-android-metadata-failed h3. Steps to reproduce 1. Run alloySample (attached alloySample.zip) Expected Result The database will install and run correctly Actual Result We receive the following error "sqlite returned: error code = 26, msg = file is encrypted or is not a database"

    Appcelerator JIRA | 2 years ago | Marco Cota
    net.sqlcipher.database.SQLiteException: file is encrypted or is not a database
  3. 0

    upgrading from 3.1.0 to 3.3.0

    GitHub | 2 years ago | dragosraducanu
    net.sqlcipher.database.SQLiteException: file is encrypted or is not a database
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 55#5817693

    GitHub | 5 years ago | Atom99
    net.sqlcipher.database.SQLiteException: file is encrypted or is not a database
  6. 0

    net.sqlcipher.database.SQLiteException ??? not error exception on SQLiteDatabase.dbOpen

    GitHub | 2 years ago | kivsiak
    net.sqlcipher.database.SQLiteException: not an error
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. net.sqlcipher.database.SQLiteException

    file is encrypted or is not a database

    at net.sqlcipher.database.SQLiteDatabase.native_setLocale()
  2. net.sqlcipher.database
    SQLiteDatabase.openOrCreateDatabase
    1. net.sqlcipher.database.SQLiteDatabase.native_setLocale(Native Method)
    2. net.sqlcipher.database.SQLiteDatabase.setLocale(SQLiteDatabase.java:2102)
    3. net.sqlcipher.database.SQLiteDatabase.<init>(SQLiteDatabase.java:1968)
    4. net.sqlcipher.database.SQLiteDatabase.openDatabase(SQLiteDatabase.java:901)
    5. net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:929)
    6. net.sqlcipher.database.SQLiteDatabase.openOrCreateDatabase(SQLiteDatabase.java:936)
    6 frames
  3. appcelerator.encrypteddatabase
    EncrypteddatabaseModule.install
    1. appcelerator.encrypteddatabase.EncrypteddatabaseModule.open(EncrypteddatabaseModule.java:83)
    2. appcelerator.encrypteddatabase.EncrypteddatabaseModule.install(EncrypteddatabaseModule.java:145)
    2 frames
  4. org.appcelerator.kroll
    KrollProxy.handleMessage
    1. org.appcelerator.kroll.runtime.v8.V8Object.nativeFireEvent(Native Method)
    2. org.appcelerator.kroll.runtime.v8.V8Object.fireEvent(V8Object.java:62)
    3. org.appcelerator.kroll.KrollProxy.doFireEvent(KrollProxy.java:908)
    4. org.appcelerator.kroll.KrollProxy.handleMessage(KrollProxy.java:1131)
    4 frames
  5. org.appcelerator.titanium
    TiWindowProxy.handleMessage
    1. org.appcelerator.titanium.proxy.TiViewProxy.handleMessage(TiViewProxy.java:347)
    2. org.appcelerator.titanium.proxy.TiWindowProxy.handleMessage(TiWindowProxy.java:101)
    2 frames
  6. ti.modules.titanium
    WindowProxy.handleMessage
    1. ti.modules.titanium.ui.WindowProxy.handleMessage(WindowProxy.java:424)
    1 frame
  7. Android Platform
    Looper.loop
    1. android.os.Handler.dispatchMessage(Handler.java:95)
    2. android.os.Looper.loop(Looper.java:137)
    2 frames
  8. org.appcelerator.kroll
    KrollRuntime$KrollRuntimeThread.run
    1. org.appcelerator.kroll.KrollRuntime$KrollRuntimeThread.run(KrollRuntime.java:112)
    1 frame