Skip to content
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

Unable to create application: sqlite.SQLiteDatabaseLockedException: database is locked #13

Open
yaroslav-v opened this issue Jul 23, 2018 · 0 comments

Comments

@yaroslav-v
Copy link

Hi there!

I got a few crash reports with this issue "Unable to create application: sqlite.SQLiteDatabaseLockedException: database is locked" initializing HyperLog library.

The initialization code is situated in an extension of Application class and looks like this:

HyperLog.initialize(this, 3 * LockerData.LIMIT_MAX); // default 3 days
if (BuildConfig.DEBUG_MODE) {
	HyperLog.setLogLevel(Log.DEBUG);
} else {
	HyperLog.setLogLevel(Log.ASSERT);
}

Here is a full crash log from Firebase:

Caused by android.database.sqlite.SQLiteDatabaseLockedException
database is locked (code 5): , while compiling: PRAGMA journal_mode ################################################################# Error Code : 5 (SQLITE_BUSY) Caused By : The database file is locked. (database is locked (code 5): , while compiling: PRAGMA journal_mode) #################################################################

android.database.sqlite.SQLiteConnection.nativePrepareStatement (SQLiteConnection.java)
android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:163)
com.hypertrack.hyperlog.DeviceLogDatabaseHelper.initializeDatabase (DeviceLogDatabaseHelper.java:53)
com.hypertrack.hyperlog.DeviceLogDatabaseHelper. (DeviceLogDatabaseHelper.java:48)
com.hypertrack.hyperlog.DeviceLogDatabaseHelper.getInstance (DeviceLogDatabaseHelper.java:60)
com.hypertrack.hyperlog.HyperLog.initialize (HyperLog.java:128)
com.hypertrack.hyperlog.HyperLog.initialize (HyperLog.java:96)
com.myapp.app.MyApplication.onCreate (MyApplication.java:160)
android.app.Instrumentation.callApplicationOnCreate (Instrumentation.java:1032)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1410)

Please advice, what can be done here to fix the issue? Is it some issue of the library itself or a misplaced configuration?

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

1 participant