firebase-android-sdk: Crash: android.database.sqlite.SQLiteCantOpenDatabaseException:
[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)
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 18 (8 by maintainers)
Commits related to this issue
- Datatransport failures should not crash the app. This is achieved by protecting the executor thread by a catch all. This makes sure that failures are logged to logcat but do not cause the underlying ... — committed to firebase/firebase-android-sdk by vkryachko 4 years ago
- disable firebase.crashlytics plugin is not working as expected plus some device just crash on open it https://github.com/firebase/firebase-android-sdk/issues/1436 70+ crash on 3 days Lets see if it ... — committed to fgl27/SmartTwitchTV by fgl27 4 years ago
- Datatransport failures should not crash the app. (#1486) This is achieved by protecting the executor thread by a catch all. This makes sure that failures are logged to logcat but do not cause the u... — committed to firebase/firebase-android-sdk by vkryachko 4 years ago
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.
@vkryachko, @ashwinraghav, hello, i updated all Firebase dependencies to actual versions (May 21), but they use
firebase-datatransport:17.0.3
. Specifically,com.google.firebase:firebase-messaging:20.2.0
uses old version of datatransport library. How to use the newest version of datatransport correctly (update firebase libraries or something)? Because now i have to force override version in Gradle to use the newest one.@ReCursia it will be included in the next Firebase release sometime late next week under version
firebase-datatransport:17.0.5
.