Crash: android.database.sqlite.SQLiteCantOpenDatabaseException:
See original GitHub issue[READ] Step 1: Are you in the right place?
Issues filed here should be about bugs in the code in this repository. If you have a general question, need help debugging, or fall into some other category use one of these other channels:
- For general technical questions, post a question on StackOverflow with the firebase tag.
- For general Firebase discussion, use the firebase-talk google group.
- For help troubleshooting your application that does not fall under one of the above categories, reach out to the personalized Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Android Studio version: 3.6.1
- Firebase Component: i have problem in /transport directory
- Components versions: firebaseCloudMessaging 20.1.0 firebaseStorage 16.0.1 firebaseConfig 16.1.0 firebasePerfomance :19.0.5
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
I have crashes SQLite for Android version >= 7
I do have <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
in AndroidManifest.xml.
Does it write to external storage or it uses internal storage?
Relevant Code:
android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.nativeOpen (SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:284)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:215)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:705)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:272)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:239)
at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:1292)
at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:1247)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:903)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:893)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:355)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:298)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore$$Lambda$1.produce (SQLiteEventStore.java:2)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.retryIfDbLocked (SQLiteEventStore.java:456)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.getDb (SQLiteEventStore.java:80)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.runCriticalSection (SQLiteEventStore.java:488)
at com.google.android.datatransport.runtime.scheduling.jobscheduling.WorkInitializer.lambda$ensureContextsScheduled$1 (WorkInitializer.java:54)
at com.google.android.datatransport.runtime.scheduling.jobscheduling.WorkInitializer$$Lambda$1.run (WorkInitializer.java:2)
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:764)
at com.android.internal.os.Device.fp (Device.java)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:18 (8 by maintainers)
Top Results From Across the Web
Crash SQLiteCantOpenDatabaseException from androidx.work
I don't know how to reproduce the issue, but I have too many crashes in Google Play Vitals. Happens on many various devices....
Read more >unknown error (code 14): Could not open database
In which I kept on getting the same DB error. android.database.sqlite.SQLiteCantOpenDatabaseException: unknown error (code 14): Could not open database 06-10 23 ...
Read more >Getting error android.database.sqlite ...
Hello. I have implemented Firebase into an application of mine and released it on Google Play. I have checked the logs and noticed...
Read more >SQLiteCantOpenDatabaseExcep...
There are ~10-20 of these crashes in our app per day. ... SQLiteCantOpenDatabaseException: at android.database.sqlite.SQLiteConnection.
Read more >CrashScope report
SQLiteCantOpenDatabaseException : unknown error (code 14): Could not open database E/SQLiteDatabase(26252): at android.database.sqlite.SQLiteConnection.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The change I made above will help mitigate the problem, i.e. it will not crash the app(to be released in the coming weeks), but I imagine any app or sdk that uses sqlite will not work on such devices, which is a big deal imo.
This is because the new crashlytics(com.google.firebase:firebase-crashlytics) depends on datatransport for crash delivery, and datatransport is what is failing to initialize.
To debug this further, one thing you could try doing is:
com.crashlytics.sdk.android:crashlytics:2.10.1
com.google.firebase:firebase-datatransport:17.0.3
TransportRuntime.initialize(getApplicationContext());
this will make sure the crash is delivered to Firebase Console and should preserve all the details of the stacktrace.
No worries, thanks for your input.
I’m using this Firebase SDK library in my Android application.