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.
Open your app from the home screen of your test device or simulator. In your app, press the "Test Crash" button that you added using the code above. After your app crashes, run it again from Xcode so that your app can send the crash report to Firebase.
In January 2017, Crashlytics and Fabric were acquired by Google. In September 2018, Google announces that Fabric will be deprecated and developers should use Crashlytics via Firebase.
"Crash tracking", "Mobile exception tracking" and "Free" are the key factors why developers consider Crashlytics; whereas "Consolidates similar errors and makes resolution easy", "Email Notifications" and "Open source" are the primary reasons why Sentry is favored.
Non-fatals: While Crashlytics captures crashes automatically, you can also record non-fatal events. Non-fatal events mean that your app is experiencing an error, but not actually crashing. For example, a good scenario to log a non-fatal is if your app has deep links, but fails to navigate to them.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With