Skip to Content

Issue 🙁 Initializing the Usage library in 3.0 SP07 (and in the upcoming SP08 release) by passing in an encryption key to the constructor fails on some Android devices because the SQLCipher fails to connect to the encrypted database, and returns an exception to the application similar to:

E/Database(18356): CREATE TABLE android_metadata failed

E/Database(18356): Failed to setLocale() when constructing, closing the database

E/Database(18356): net.sqlcipher.database.SQLiteException: file is encrypted or is not a database 

E/AndroidRuntime(18356): FATAL EXCEPTION: pool-1-thread-2

E/AndroidRuntime(18356): net.sqlcipher.database.SQLiteException: file is encrypted or is not a database

Workaround 🙂 Until the SQLCipher is stabilized in an upcoming patch/release, use the constructor without the encryption key parameter. The database is used only for temporary data collection, and the content is removed from the local database once data is successfully uploaded.

Example: Initialize the Usage library without encryption:

Usage(Context context, URL url, HttpConversationManager conversationManager);

Instead of:

Usage(Context context, URL url, HttpConversationManager conversationManager, String dataEncryptionKey);

To report this post you need to login first.

1 Comment

You must be Logged on to comment or reply to a post.

Leave a Reply