Firebase-android-sdk: Crashlytics report could not be enqueued to DataTransport (IllegalArgumentException)

Created on 22 Sep 2020  路  12Comments  路  Source: firebase/firebase-android-sdk

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 4.0.1
  • Firebase Component: Firebase Crashlytics & Firebase Crashlytics Gradle
  • Component version: 17.2.1 & 2.2.0

[REQUIRED] Step 3: Describe the problem

App built with DexGuard doesn't report to Firebase Console, I cant even see the build version in the filter console.
Every time what the app is launched produce the same exception:

D/FirebaseCrashlytics: Checking for crash reports...
D/FirebaseCrashlytics: Found crash report /data/user/0/com.xxxxxxx/files/.com.google.firebase.crashlytics/nonfatal-sessions/5F64E11E01BD-0001-6C5D-32B9DF9F8C8E.cls
D/FirebaseCrashlytics: Reports are being sent.
D/FirebaseCrashlytics: Starting report processing in 1.0 second(s)...
D/FirebaseCrashlytics: No log data to include with this event.
D/FirebaseCrashlytics: Update app request ID: aca879994130dcc6ab3f551k2j4bjj23
D/FirebaseCrashlytics: No log data to include with this event.
D/FirebaseCrashlytics: Result was 204
D/FirebaseCrashlytics: Crashlytics report could not be enqueued to DataTransport
    java.lang.IllegalArgumentException: Transport backend 'cct' is not registered
        at com.google.android.datatransport.runtime.scheduling.DefaultScheduler$$Lambda$1.run(:1077)
        at com.google.android.datatransport.runtime.SafeLoggingExecutor$SafeLoggingRunnable.run(: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:919)

Instead if the app is built in debug (without dexguard), it works.

Steps to reproduce:

Building the project with the next configuration:

build.gradle

apply plugin: 'com.android.application'
apply plugin: 'dexguard'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
apply plugin: 'realm-android'
apply plugin: 'com.google.android.gms.strict-version-matcher-plugin'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'com.google.firebase.firebase-perf'
...
release {
           firebaseCrashlytics {
                mappingFileUploadEnabled true
            }
...
dependencies {
    implementation 'com.google.firebase:firebase-core:17.2.0'
    implementation 'com.google.firebase:firebase-analytics:17.2.2'
    implementation 'com.google.firebase:firebase-crashlytics:17.1.1'
...

dexguard-rules.pro

-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
needs-triage

Most helpful comment

In case you are still struggling with it try to add this you your dexguard/proguard config file:

-keepresourcexmlelements manifest/application/service/meta-data@value=cct

All 12 comments

I found a few problems with this issue:

  • I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.
  • This issue does not seem to follow the issue template. Make sure you provide all the required information.

@pablopatarca Hi
If you can solve your problem, out of the issue let me know, pls
I am facing almost the same problem with dexguard (#1987 )

i have too same problem and not find a solution.

I am also facing the same issue. Using 17.2.1. I tried with 17.1.0 still getting the same

I've found a solution for this issue provided from the DexGuard documentation:

First off, the Crashlytics plugin should be applied before the DexGuard plugin.

apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'dexguard'

source: https://www.guardsquare.com/en/manual/dexguard/stable/gradle/dexguard-plugin.html#firebaseCrashlytics

But steal the problem doesn't resolve, the app version is not published in the firebase console 馃槩

Here the crashlytics plugin is applied before dexguard plugin, but even so i have the same problems. The crashes aren't sended to console.

@omesquita which plugin version are you testing with?

I'm trying with 2.3.0 for crashlytics and 8.5.06 for dexguard

@omesquita which plugin version are you testing with?

I'm trying with 2.3.0 for crashlytics and 8.5.06 for dexguard

here i'm using 2.2.1 for crashlytics plugin and 8.6.09 for dexguard.

In case you are still struggling with it try to add this you your dexguard/proguard config file:

-keepresourcexmlelements manifest/application/service/meta-data@value=cct

Ok guys, I've solved the problem,
The solution requires two part:

1- Check the plugins order:
Your gradle.properties should look like this:

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
apply plugin: 'dexguard'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
apply plugin: 'kotlin-kapt'
...

2- Downgrade the firebase-crashlytics version to 17.1.0
implementation 'com.google.firebase:firebase-crashlytics:17.1.0'

Otherwise, if you want to use the las version of crashlytics, you should upgrade the DexGuard version to 8.7.06 but keeping the same order that the point 1.

And that's it!

I hope this helps you.

In case you are still struggling with it try to add this you your dexguard/proguard config file:

-keepresourcexmlelements manifest/application/service/meta-data@value=cct

It worked for me. Thanks for the help.

17.2.0 with DexGuard version to 8.6.X is working? @pablopatarca
Sorry @GauravP123, with version DexGuard 8.7.06 and Crashlytics 17.2.1 works!

Was this page helpful?
0 / 5 - 0 ratings