OneSignal-Android-SDK
OneSignal-Android-SDK copied to clipboard
android.database.sqlite.SQLiteCantOpenDatabaseException[Bug]:
What happened?
Fatal Exception: android.database.sqlite.SQLiteCantOpenDatabaseException: Cannot open database '/data/user/0/com.mynayatel/databases/OneSignal.db': File /data/user/0/com.mynayatel/databases/OneSignal.db doesn't exist at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:254) 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:928) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:908) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:772) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:761) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316) at com.onesignal.OneSignalDbHelper.getSQLiteDatabase(OneSignalDbHelper.java:3) at com.onesignal.OneSignalDbHelper.getSQLiteDatabaseWithRetries(OneSignalDbHelper.java:5) at com.onesignal.OneSignalDbHelper.a(OneSignalDbHelper.java:4) at com.onesignal.OSNotificationDataController$1.run(OSNotificationDataController.java:35) at java.lang.Thread.run(Thread.java:1012)
Caused by android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14 SQLITE_CANTOPEN): Could not open database at android.database.sqlite.SQLiteConnection.nativeOpen(SQLiteConnection.java) at android.database.sqlite.SQLiteConnection.open(SQLiteConnection.java:224) 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:928) at android.database.sqlite.SQLiteDatabase.open(SQLiteDatabase.java:908) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:772) at android.database.sqlite.SQLiteDatabase.openDatabase(SQLiteDatabase.java:761) at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:373) at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:316) at com.onesignal.OneSignalDbHelper.getSQLiteDatabase(OneSignalDbHelper.java:3) at com.onesignal.OneSignalDbHelper.getSQLiteDatabaseWithRetries(OneSignalDbHelper.java:5) at com.onesignal.OneSignalDbHelper.a(OneSignalDbHelper.java:4) at com.onesignal.OSNotificationDataController$1.run(OSNotificationDataController.java:35) at java.lang.Thread.run(Thread.java:1012)
Crash reported on Firebase.
Steps to reproduce?
Crash has been reported on firebase for Transsion devices (Android 12). One signal version used is 4.8.6
What did you expect to happen?
I expected the app to not crash.
OneSignal Android SDK version
4.8.6
Android version
12
Specific Android models
Note Transsion
Relevant log output
No response
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Hi @areehafarooq thank you for reaching out! This sounds similar to an issue we had a while back where we pushed a fix on SDK 4.7.2. However, it looks like you are currently on 4.8.6. Is this only happening with Transsion devices running Android 12 or have you noticed it happening with any other devices?
Thank you for the additional information!
Hi. This has only been reported for Transsion Android 12 devices till now.
@areehafarooq are you still seeing this issue with the latest SDK? Do you get any other SQL related crashes from non-OneSignal code?
if I may add on this one, we currently are having same issue with Transsion devices (99% on Android 12) with pretty similar stack trace: Cannot open database xxx Because file is not found
.
We are not using OneSignal, but just wanted to mention it may not be related to this sdk but to Transsion. We have few million active users and this is only happening for this device.