-
Notifications
You must be signed in to change notification settings - Fork 640
Closed
Labels
Description
[READ] Step 1: Are you in the right place?
Yes.
[REQUIRED] Step 2: Describe your environment
- Android Studio version: 2020.3.1 Patch 4
- Firebase Component: BoM 29.03 (crashlytics, config-ktx, dynamic-links-ktx, analytics-ktx, database-ktx, auth-ktx)
- Component version: as specified in BoM
[REQUIRED] Step 3: Describe the problem
Issue:
Firebase Crashlytics fails to send any crash, because it crashes internally. It happens after upgrading the library version and it does not fix by themself.
Steps to reproduce:
- Have the library configuration as follow (config/analytics/dynamic-links probably not relevant, but leaving it for completeness):
implementation 'com.google.firebase:firebase-crashlytics:18.0.1'
implementation 'com.google.firebase:firebase-config-ktx:20.0.2'
implementation 'com.google.firebase:firebase-dynamic-links-ktx:19.1.1'
implementation 'com.google.firebase:firebase-analytics-ktx:18.0.1'
- Upgrade to the BoM format as follow (again: config/analytics/dynamic-links/database/auth probably not relevant):
implementation platform('com.google.firebase:firebase-bom:29.0.3')
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-config-ktx'
implementation 'com.google.firebase:firebase-dynamic-links-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
implementation 'com.google.firebase:firebase-database-ktx'
implementation 'com.google.firebase:firebase-auth-ktx'
- Crash the app using random fatal exception.
Error log:
The following warning is shown on logcat
2022-01-11 16:11:19.714 30893-30893/<our_package> I/FirebaseCrashlytics: Initializing Firebase Crashlytics 18.2.6 for <our_package>
2022-01-11 16:11:19.824 30893-30971/<our_package> V/DynamiteModule: Dynamite loader version >= 2, using loadModule2NoCrashUtils
2022-01-11 16:11:30.793 30893-30975/<our_package> E/SQLiteLog: (1) table log_event_dropped already exists
2022-01-11 16:11:30.796 30893-30975/<our_package> W/TransportRuntime: Error scheduling event table log_event_dropped already exists (code 1 SQLITE_ERROR): , while compiling: CREATE TABLE log_event_dropped (log_source VARCHAR(45) NOT NULL,reason INTEGER NOT NULL,events_dropped_count BIGINT NOT NULL,PRIMARY KEY(log_source, reason))
2022-01-11 16:11:30.799 30893-30972/<our_package> W/FirebaseCrashlytics: Crashlytics report could not be enqueued to DataTransport
android.database.sqlite.SQLiteException: table log_event_dropped already exists (code 1 SQLITE_ERROR): , while compiling: CREATE TABLE log_event_dropped (log_source VARCHAR(45) NOT NULL,reason INTEGER NOT NULL,events_dropped_count BIGINT NOT NULL,PRIMARY KEY(log_source, reason))
at android.database.sqlite.SQLiteConnection.nativePrepareStatement(Native Method)
at android.database.sqlite.SQLiteConnection.acquirePreparedStatement(SQLiteConnection.java:903)
at android.database.sqlite.SQLiteConnection.prepare(SQLiteConnection.java:514)
at android.database.sqlite.SQLiteSession.prepare(SQLiteSession.java:588)
at android.database.sqlite.SQLiteProgram.<init>(SQLiteProgram.java:58)
at android.database.sqlite.SQLiteStatement.<init>(SQLiteStatement.java:31)
at android.database.sqlite.SQLiteDatabase.executeSql(SQLiteDatabase.java:1770)
at android.database.sqlite.SQLiteDatabase.execSQL(SQLiteDatabase.java:1698)
at com.google.android.datatransport.runtime.scheduling.persistence.SchemaManager.lambda$static$4(SchemaManager.java:134)
at com.google.android.datatransport.runtime.scheduling.persistence.-$$Lambda$SchemaManager$T1DaSoWWCWfbynOycgGeN7Vw-Vk.upgrade(Unknown Source:0)
at com.google.android.datatransport.runtime.scheduling.persistence.SchemaManager.upgrade(SchemaManager.java:216)
at com.google.android.datatransport.runtime.scheduling.persistence.SchemaManager.onUpgrade(SchemaManager.java:183)
at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:398)
at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:298)
at com.google.android.datatransport.runtime.scheduling.persistence.-$$Lambda$iV7-zVaNm3OzwRKNnkXrWOPrqvk.produce(Unknown Source:2)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.retryIfDbLocked(SQLiteEventStore.java:568)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.getDb(SQLiteEventStore.java:94)
at com.google.android.datatransport.runtime.scheduling.persistence.SQLiteEventStore.runCriticalSection(SQLiteEventStore.java:751)
at com.google.android.datatransport.runtime.scheduling.DefaultScheduler.lambda$schedule$1$DefaultScheduler(DefaultScheduler.java:81)
at com.google.android.datatransport.runtime.scheduling.-$$Lambda$DefaultScheduler$TUAu_XOWDlEdt54QDWOOZf2JNr8.run(Unknown Source:8)
at com.google.android.datatransport.runtime.SafeLoggingExecutor$SafeLoggingRunnable.run(SafeLoggingExecutor.java:47)
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)
2022-01-11 16:19:11.412 4346-5120/? I/cr_CastCrashUploader: Remove crash dumps
It seems that crashlytics cannot handle gracefully situation when some table already exists - and it tries to create it and fails.