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:
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?
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)
I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
Hi!
Can you clarify what it is that you are trying to accomplish ? Are you building the project from source while trying to make a contribution?
I'm using this Firebase SDK library in my Android application.
We are also seeing the same stacktrace on GPlay Publish, happening only on a Philips 4K ((PH7M_EU_5596) with Android 8.0
android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.nativeOpen (SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:209)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:808)
at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:793)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:696)
at android.app.ContextImpl.openOrCreateDatabase (ContextImpl.java:723)
at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:299)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:254)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:194)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore$$Lambda$1.a (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:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
at java.lang.Thread.run (Thread.java:764)
Using the latest version:
firebase_core = '17.3.0'
firebase_perf = '19.0.6'
firebase_messaging = '20.1.5'
firebase_links = '19.1.0'
From the above it's hard to see the underlying issue, does the exception have a "caused by" chain and or the error message?
@ReCursia @fpittersacc
Hi @vkryachko, sadly there is no further information on Google Play Publish, and is not reported to Firebase, so it's probably happening at launch, at the very beginning?
Although we are seeing that crashes are happening on groups: ~6 at the same time (only hours and minutes on GPlay), which could potentially mean that above logic is being hit too often?
We are trying to trace down on which cases above logic is reached, but any help or guidance is appreciated.
Thanks
I see, that makes sense. Unfortunately it seems like a known issue in the Play Console. i.e. lack of any details in the stacktrace makes the stacktraces useless in terms of helping diagnose the problem :(
Any steps to repro would be greatly appreciated as we don't have that hardware available for testing at this time
@fpittersacc alternatively I would suggest trying to install com.google.firebase:firebase-crashlytics:17.0.0-beta01 and seeing if a more detailed crash lands into the Firebase Console.
fyi @mrwillis21
I also have this
android.database.sqlite.SQLiteCantOpenDatabaseException:
at android.database.sqlite.SQLiteConnection.nativeOpen (SQLiteConnection.java)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:209)
at android.database.sqlite.SQLiteConnection.open (SQLiteConnection.java:193)
at android.database.sqlite.SQLiteConnectionPool.openConnectionLocked (SQLiteConnectionPool.java:463)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:185)
at android.database.sqlite.SQLiteConnectionPool.open (SQLiteConnectionPool.java:177)
at android.database.sqlite.SQLiteDatabase.openInner (SQLiteDatabase.java:808)
at android.database.sqlite.SQLiteDatabase.open (SQLiteDatabase.java:793)
at android.database.sqlite.SQLiteDatabase.openDatabase (SQLiteDatabase.java:696)
at android.app.ContextImpl.openOrCreateDatabase (ContextImpl.java:723)
at android.content.ContextWrapper.openOrCreateDatabase (ContextWrapper.java:299)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked (SQLiteOpenHelper.java:254)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase (SQLiteOpenHelper.java:194)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore$$Lambda$1.a (SQLiteEventStore.java:2)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.a (SQLiteEventStore.java:6)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.a (SQLiteEventStore.java:13)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.ensureBeginTransaction (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.ensureTransportContext (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.getDb (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.getNextCallTime (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.inTransaction (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.join (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$cleanUp$10 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$ensureBeginTransaction$15 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$getNextCallTime$4 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$hasPendingEventsFor$5 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$loadEvents$12 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$loadMetadata$13 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$persist$1 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$recordFailure$3 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.lambda$recordNextCallTime$6 (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.loadMetadata (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.persist (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.recordNextCallTime (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.recordSuccess (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.retryIfDbLocked (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.runCriticalSection (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.tryWithCursor (SQLiteEventStore.java)
at com.google.android.datatransport.runtime.scheduling.jobscheduling.WorkInitializer.lambda$ensureContextsScheduled$1 (WorkInitializer.java:6)
at com.google.android.datatransport.runtime.scheduling.jobscheduling.WorkInitializer$$Lambda$1.run (WorkInitializer.java:2)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1162)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:636)
at java.lang.Thread.run (Thread.java:764)
The above is all that play console shows...
It only happens to Android 8.0 devices, and stated after I enable crashlytics plugin
I have crashlytics-gradle 2.0.0-beta04 and crashlytics 17.0.0-beta04 enable
No reports arriving at the firebase console about this only on play console, so I assume that is firebase crashing for some reason.
Device is the same as @fpittersacc posted about
Philips 4K LED TV powered by Android (PH7M_EU_5596), 2048MB RAM, Android 8.0
plus
Sony BRAVIA 4K GB (BRAVIA_ATV2), 1792MB RAM, Android 8.0
Sony BRAVIA 4K GB ATV3 (BRAVIA_ATV3_4K), 1792MB RAM, Android 8.0
I don't own any of those can help with device testing...
I didn't received any user reporting that the app stopped working so it may only be a firebase crash and the app keeps working or maybe the user just install the app it didn't work so unistall don't know for sure yet.
About the above commit, I have 75+ crashes on play console after enabling the crashlytics plugin, only 2 showed in firebase console.
63 of those crash on play are from android.database.sqlite.SQLiteCantOpenDatabaseException:
So there is at least 10 missing from firebase so it is not working for me at all.
After a few days I report back with the result of not having the plugging enable.
@fgl27 the issue is that it's not possible to repro android.database.sqlite.SQLiteCantOpenDatabaseException plus it is missing the underlying problem. All it tells is that the sqlite db was not openable, usually the exception message would reveal the reason it was so.
What I can tell is the on the device in question(PH7M_EU_5596) the os is preventing from writing into/reading from app private storage(which should not require any permission at all), so this is either a bug in the os or the devices is in some misconfigured state.
So to be able to tell more precisely what the cause is, we would need that exception message
I understand that I read it before the console is bugged that is why I enable crashlytics.
Also there is others android 8.0 devices affected not just PH7M_EU_5596, is a 8.0 issue, this is probably a bad implementation of selinux, maybe those device have a earlier version of 8.0 that has a unfinished sepolicy rulles that is prevent the write of a particularly action, I already see issues like this on other devices, maybe is something else on the underline of android permission. As this device is probably deprecated it will not receive Android updates, this issue will not be fixed by the manufacturer so if is something that we can address here will probably help others.
The main problem I have is that enabling the plugin has no result.
As I wrote... after enabling I have 75+ crashes on play console on that particularly version of the app that has crashlytics enable, and only 2 on firebase, it makes no sense to keep a thing that crashes and has no result enabled...
So lets see the result after I disable it.
Maybe someday google goes back and fixes they crash console and we can have a proper log.
The main reason I'm writing here is not to complain is just to post my info and keep my self on the conversation in case there is news on it.
I understand that I read it before the console is bugged that is why I enable crashlytics.
Also there is others android 8.0 devices affected not just
PH7M_EU_5596, is a 8.0 issue, this is probably a bad implementation of selinux, maybe those device have a earlier version of 8.0 that has a unfinished sepolicy rulles that is prevent the write of a particularly action, I already see issues like this on other devices, maybe is something else on the underline of android permission. As this device is probably deprecated it will not receive Android updates, this issue will not be fixed by the manufacturer so if is something that we can address here will probably help others.
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.
The main problem I have is that enabling the plugin has no result.
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.1com.google.firebase:firebase-datatransport:17.0.3TransportRuntime.initialize(getApplicationContext());this will make sure the crash is delivered to Firebase Console and should preserve all the details of the stacktrace.
As I wrote... after enabling I have 75+ crashes on play console on that particularly version of the app that has crashlytics enable, and only 2 on firebase, it makes no sense to keep a thing that crashes and has no result enabled...
So lets see the result after I disable it.
Maybe someday google goes back and fixes they crash console and we can have a proper log.
The main reason I'm writing here is not to complain is just to post my info and keep my self on the conversation in case there is news on it.
No worries, thanks for your input.
OK I will try that and report when I get results... thanks
By using this implementation:
https://github.com/fgl27/SmartTwitchTV/commit/103f530608210cf53cf23ff45fd7af4ba2c84c31#diff-44b7d352026ef7177875a6cb619d638f
follow up fix
https://github.com/fgl27/SmartTwitchTV/commit/91dda2fa1ef43da1ea57019e2668d7cc9a1ea189#diff-44b7d352026ef7177875a6cb619d638f
I don't have any more crashes regarding the one from this issue first post, but I also don't have any crashes showing on firebase console, the analytics are working and show that 90% of active user have update to latest version of the app and on play that same version has around 15 crashes since the update.
I don't wanna to spam just a yes on or answer is fine as this maybe a offtopic question, so is my implementation correct? that is how one "catches" crashes from services that start at bootcomplete?
I followed the old instructions + @vkryachko recommendation:
https://firebase.google.com/docs/crashlytics/get-started?platform=android&hl=it
I ask that because that service on the app has some crashes they show on play console, but they don't show on firebase console... that is not a big deal because the crases are expected ones from a service that is starting at boot (all I believe is because the notification fail to show in 5 seconds because the device lags or something related, as the notification code is OK and the services has never fail at least on the device I have personally tested), but I would like to see the reason using crashlytics as the play console doesn't show the proper log.
@vkryachko , hi, how to know when your commit will be included in new library version? Will this issue mentioned or something? I read release notes for April 23, but this issue was not mentioned
@ReCursia it will be included in the next Firebase release sometime late next week under version firebase-datatransport:17.0.5.
@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.
Most helpful comment
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.1com.google.firebase:firebase-datatransport:17.0.3TransportRuntime.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.