Parissa Kalaee
Parissa Kalaee

Reputation: 638

Crashlytics doesn't show in Firebase

I have an already published app as a product that using Firebase for messaging or analytics. Now I want to activate Crashlytics.

The debug mode was already activated and after a test crash nothing happened :-|

% adb shell setprop log.tag.FirebaseCrashlytics DEBUG
% adb logcat -s FirebaseCrashlytics 

the output of Run window of AndroidStudio:

D/FirebaseCrashlytics: Handling uncaught exception "java.lang.RuntimeException: Test Crash" from thread main
D/FirebaseCrashlytics: No userId set for session 6357...
D/FirebaseCrashlytics: No userId set for session 6357...
D/FirebaseCrashlytics: Opening a new session with ID 6357...
D/FirebaseCrashlytics: Crashlytics automatic data collection ENABLED by global Firebase setting.
D/FirebaseCrashlytics: Logging app exception event to Firebase Analytics
D/FirebaseCrashlytics: Sending report through Google DataTransport: 6357...
D/CompatibilityChangeReporter: Compat change id reported: 194532703; UID 10160; state: DISABLED
V/FA: Connection attempt already in progress
V/FA: Recording user engagement, ms: 221517
D/FirebaseCrashlytics: Crashlytics report successfully enqueued to DataTransport: 6357...
D/FirebaseCrashlytics: Deleted report file: /.../files/.com.google.firebase.crashlytics.files.v2:.../priority-reports/6357...
D/FirebaseCrashlytics: Completed exception processing. Invoking default exception handler.
I/Process: Sending signal. PID: 13845 SIG: 9

I added the sdks offered in this link: https://firebase.google.com/docs/crashlytics/get-started?platform=android#add-sdk

should I do anything else, like deleting app from firebase and making it again? since it is in a product mode, I am a little bit worried about the consequences.

or adding the new google-services.json in my project?

Update: I tested the second one, adding the new google-services.json to my project in Android Studio but it didn't make any difference. Did I add/activate the Crashlytics correctly?

// in build.gradle module level:
apply plugin: 'com.google.firebase.crashlytics'

...

implementation platform('com.google.firebase:firebase-bom:30.5.0')
// Add the dependency for the Firebase SDK for Google Analytics
// When using the BoM, don't specify versions in Firebase dependencies
implementation 'com.google.firebase:firebase-crashlytics'
implementation 'com.google.firebase:firebase-analytics'

//in build.gradle project level:
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'

complete project level build.gradle:

allprojects {
    repositories {
        google()
        mavenCentral()
        maven {
            url "https://jitpack.io"
        }
        jcenter()
    }
}

ext {
    retrofit_version = '2.6.2'
    dagger_version = '2.35.1'
    butterknife_version = '8.8.1'
    room_version = '1.1.1'
    kotlin_coroutines_version = "1.1.0"
    lifecycle_version = '2.2.0'
    fragmentKtxVersion = '1.3.0-alpha07'
}

buildscript {
    repositories {
        google()
        mavenCentral()
        maven {
            url "https://jitpack.io"
        }
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.2'
        classpath 'com.google.gms:google-services:4.3.13'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'

    }
}

Yours, Parissa

Upvotes: 1

Views: 625

Answers (1)

Parissa Kalaee
Parissa Kalaee

Reputation: 638

Ok after a couple of days struggling with all the details of my project, I noticed that in my project, there were three copies of google-services.json, I had only changed one of them! Then I changed all of them, available in different build flavors and the problem is now solved!

Upvotes: 1

Related Questions