kylecorry31 / Trail-Sense

An Android app that uses your phone's sensors to assist with wilderness treks or survival situations.
https://kylecorry.com/Trail-Sense/
MIT License
1.22k stars 75 forks source link

Database doesn't exist (LineageOS) #1281

Closed kylecorry31 closed 1 year ago

kylecorry31 commented 2 years ago

This was reported by a user running LineageOS. It happens every time the app is opened on version 3.9.1. As far as I can tell, they are the only user affected, so it may be a device/OS/configuration specific issue.

java.lang.RuntimeException: Exception while computing database live data. at androidx.room.RoomTrackingLiveData$1.run(:4) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.lang.Thread.run(Thread.java:923) Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: Cannot open database '/mnt/expand/ID/user/0/com.kylecorry.trail_sense/databases/trail_sense': Directory /mnt/expand/ID/user/0/com.kylecorry.trail_sense/databases doesn't exist at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:252) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:205) at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked(SQLiteConnectionPool.java:505) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:206) at android.database.sqlite.SQLiteConnectionPool.open(SQLiteConnectionPool.java:198) at android.database.sqlite.SQLiteDatabase.openInner(SQLiteDatabase.java:918) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:898) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:762) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:751) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper$OpenHelper.getWritableSupportDatabase(Unknown Source:4) at androidx.sqlite.db.framework.FrameworkSQLiteOpenHelper.getWritableDatabase(Unknown Source:4) at androidx.room.RoomDatabase.inTransaction(Unknown Source:2) at androidx.room.RoomDatabase.assertNotSuspendingTransaction(Unknown Source:0) at androidx.room.RoomDatabase.query(Unknown Source:3) at androidx.room.util.DBUtil.androidx.room.util.CursorUtil.copyAndClose(Unknown Source:1) query at com.kylecorry.trail_sense.navigation.beacons.infrastructure.persistence.BeaconDao_Impl$9.com.kylecorry.trail_sense.navigation.beacons.infrastructure.persistence.BeaconDao_Impl$9.call(:1) call ... 4 more Caused by: android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database at android.database.sqlite.SQLiteConnection.nativeOpen(Native Method) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:224) ... 21 more

kylecorry31 commented 1 year ago

I have not received any other reports of this or been able to reproduce it, so I think it was an issue with the user's device running unofficial ROMS.