Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Crashlytics not sending crash report [duplicate]

I am using firebase in my app. I add Crashlytic to my app. when I run, I simulate an exception but Crashlytic never generate and send report in my firebase console. Below the exception I got.

04-03 17:10:35.731 12442-12477/com.package.app E/CrashlyticsCore: Tried to write a fatal exception while no session was open.
04-03 17:10:39.733 12442-12442/com.package.app E/CrashlyticsCore: Failed to execute task.
    java.util.concurrent.TimeoutException
        at java.util.concurrent.FutureTask.get(FutureTask.java:177)
        at com.crashlytics.android.core.CrashlyticsBackgroundWorker.submitAndWait(CrashlyticsBackgroundWorker.java:41)
        at com.crashlytics.android.core.CrashlyticsController.handleUncaughtException(CrashlyticsController.java:320)
        at com.crashlytics.android.core.CrashlyticsController$6.onUncaughtException(CrashlyticsController.java:300)
        at com.crashlytics.android.core.CrashlyticsUncaughtExceptionHandler.uncaughtException(CrashlyticsUncaughtExceptionHandler.java:42)
        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1068)
        at java.lang.ThreadGroup.uncaughtException(ThreadGroup.java:1063)

Even when I simulate crash from Crashlytic get started the app never crash

Button crashButton = new Button(this);
crashButton.setText("Crash!");
crashButton.setOnClickListener(new View.OnClickListener() {
    public void onClick(View view) {
        Crashlytics.getInstance().crash(); // Force a crash
    }
});
addContentView(crashButton,
               new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
               ViewGroup.LayoutParams.WRAP_CONTENT));

and when I simulate my own app crash the report never generate and sent.

Gradle script project level

buildscript {
    repositories {
        jcenter()
        maven { url 'https://maven.google.com' }
        maven {url 'https://maven.fabric.io/public'}

        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.0'

        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
        classpath 'com.google.gms:google-services:3.1.2'
        classpath 'io.fabric.tools:gradle:1.25.1'
    }
}

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

Gradle build script app level

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {
    compileSdkVersion 27
    defaultConfig {
        applicationId "xxxxxxxxxxxxxxxxxxxxxxxx"
        minSdkVersion 14
        targetSdkVersion 27
        versionCode 3
        versionName "1.0.2"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
        debug {
            debuggable true
            ext.enableCrashlytics = true
        }
    }

}

dependencies {
    implementation fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.support.constraint:constraint-layout:1.0.2'
    implementation 'com.android.support:support-annotations:27.0.2'
    //..........some dependencies
    implementation 'com.android.support:design:27.0.2'
    //implementation 'com.android.support:animated-vector-drawable:27.0.2'
    implementation 'com.android.support:recyclerview-v7:27.0.2'
    implementation 'com.android.support:cardview-v7:27.0.2'
    implementation 'com.android.support:support-v4:27.0.2'
    //implementation 'com.squareup.okhttp3:okhttp:1.5.4'
    implementation 'com.firebaseui:firebase-ui-database:3.2.2'
    implementation 'com.firebaseui:firebase-ui-storage:3.2.2'
    //implementation 'com.google.firebase:firebase-core:12.0.0'
    //................. some dependencies
    //Crashlytics sdk dependency
    implementation 'com.crashlytics.sdk.android:crashlytics:2.9.1'
}

apply plugin: 'com.google.gms.google-services'
like image 435
Jean-Pascal MEWENEMESSE Avatar asked Apr 03 '18 17:04

Jean-Pascal MEWENEMESSE


People also ask

How do I get Crashlytics crash reports in the Firebase console?

To continue getting crash reports in the Firebase console, upgrade to use the latest Firebase Crashlytics SDK: v8.10.0 for iOS+ , v18.2.6 for Android, or v8.7.0 for Unity . This page provides troubleshooting help and answers to frequently-asked questions about using Crashlytics.

What are the different types of Firebase Crashlytics logs?

To give you more insight into crash reports, Firebase Crashlytics provides four logging mechanisms right out of the box: custom keys, custom logs, user identifiers, and caught exceptions. Custom keys help you get the specific state of your app leading up to a crash.

How do I associate custom key/value pairs to a Firebase Crash Report?

You can associate arbitrary key/value pairs with your crash reports, then use the custom keys to search and filter crash reports in the Firebase console. In the Crashlytics dashboard, you can search for issues that match a custom key.

What happened to the firebase fabric SDK?

The Fabric SDK is no longer supported as of November 15, 2020. To continue getting crash reports in the Firebase console, upgrade to use the latest Firebase Crashlytics SDK: v8.10.0 for iOS+, v18.2.6 for Android, or v8.7.0 for Unity.


1 Answers

I hope you have enabled notifications in fabric dashboard settings for the test crash that your are generating in you code.

after enabling , You will then get crash mails.

like image 158
Relsell Avatar answered Oct 08 '22 23:10

Relsell