I have successfully integrated Firebase into my project
(Authentication and Storage works great) but after the simple integration of Crashlytics and crashing my app on purpose (and not on purpose :) - No crash report appear in the crash dashboard.
i do see in Logcat:
D/FirebaseApp: com.google.firebase.crash.FirebaseCrash is not linked. Skipping initialization
I/CrashlyticsCore: Crashlytics report upload complete: 5BEDB1320329-0001-43...
i have already integrated Crashlytics into 3 other apps with no problem, but for some reason it doesn't work in my new app.
Can anyone think of what i have missed?
a freshly downloaded google-services.json file is in place
and i added to the project gradle file:
buildscript {
repositories {
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.google.gms:google-services:4.2.0'
classpath 'io.fabric.tools:gradle:1.26.1'
}
}
allprojects {
repositories {
// ...
maven {
url 'https://maven.google.com/'
}
}
}
and added to the app gradle file:
apply plugin: 'io.fabric'
dependencies {
// ...
implementation 'com.google.firebase:firebase-core:16.0.5'
implementation 'com.crashlytics.sdk.android:crashlytics:2.9.6'
}
Thanks for your thoughts
Update
enabling Crashlytics debug logs shows that the crash was captured and reported but still nothing shows in the project's Firebase Crashlytics dashboard
D/CrashlyticsCore: Checking for crash reports...
D/CrashlyticsCore: Found crash report /data/.../files/.Fabric/com.crashlytics.sdk.android.crashlytics-core/fatal-sessions/5BEEA22001B0-0001-21C3-C00BC3A0D0B2.cls
D/CrashlyticsCore: Attempting to send 1 report(s)
D/Answers: Response code for analytics file send is 200
D/CrashlyticsCore: Adding single file 5BEEA22001B0-0001-21C3-C00BC3A0D0B2.cls to report 5BEEA22001B0-0001-21C3-C00BC3A0D0B2
D/CrashlyticsCore: Sending report to: https://reports.crashlytics.com/spi/v1/platforms/android/apps/com.salt.logomaker/reports
D/CrashlyticsCore: Create report request ID: null
D/CrashlyticsCore: Result was: 202
I/CrashlyticsCore: Crashlytics report upload complete: 5BEEA22001B0-0001-21C3-C00BC3A0D0B2
D/CrashlyticsCore: Removing report at /data/.../files/.Fabric/com.crashlytics.sdk.android.crashlytics-core/fatal-sessions/5BEEA22001B0-0001-21C3-C00BC3A0D0B2.cls
D/CrashlyticsCore: Checking for crash reports...
D/CrashlyticsCore: No reports found.
4 Answers 4
I had the same problem, Crashlytics not reporting event trends neither crash stacktraces in PROD builds. The problem was in Proguard config. As stupid as it sounds, there is no reference at all about Proguard in all the documentation from Google. Here you can find what I had to add to make it work:
# Firebase
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
-keep public class * extends java.lang.Exception
-keep class com.crashlytics.** { *; }
-dontwarn com.crashlytics.**
I hope this helps to you and many others, I've spent a week debugging and trying anything I've imagined.
2 Comments
Have you also added Fabric.with(this, Crashlytics()) to the onCreate of your main activity?
2 Comments
For development applications, crashlytics will not upload any reports. You need to create a new version. React has a very well documented page about how to release new applications. As soon as you have the apk ready you can run android with the variant release. After doing this, your logs will start to have some crash reports uploads.
For a more detailed answer you can also see this stackoverflow post
Comments
In my case for Android, I made the silly mistake of doing:
FirebaseCrashlytics.getInstance().setUserId(uid);
where uid was still null. Maybe this helps someone else.
manifests.xmlbut stillFirebasedoesn't get any report. How can I solve that problem?