Firebase Crashlytics not reporting crashes when manually enabled
Solution 1
There is an issue with Firebase Crashlytics 2.9.7 preventing opt-in reporting as described in the documentation to work: the start of Crashlytics from code will not be performed. For the time being downgrading to 2.9.6 will enable your code to work properly.
Solution 2
Please follow this answer https://stackoverflow.com/a/59906454/6743289
For those wish to use crashlytics for their android app who haven't been using crashlytics of fiber.io, there are certain changes in the way you FirebaseApp is initialized which you will find in the above link.
Solution 3
Use following dependencies for android.
Paste it into build.gradle app:
implementation('com.crashlytics.sdk.android:crashlytics:2.9.6@aar') {
transitive = true
}
Upgrade it from 2.9.5 to 2.9.6.
It works for me.
Null
Updated on June 08, 2022Comments
-
Null about 2 years
Crashlytics works just fine without opt-in reporting. But it stops reporting anything as soon as I set up opt-in reporting according to the tutorial.
Specifically, I added the following content to
AndroidManifest.xml
<meta-data android:name="firebase_crashlytics_collection_enabled" android:value="false" />
And I added the following into the
onCreate
:Fabric.with(this, Crashlytics())
With a debugger, I am sure that the above line has been executed.
However, nothing is reported to the Crashlytics. Instead, the logger gives the following,
D/Fabric: Falling back to Crashlytics key lookup from Manifest D/Fabric: Falling back to Crashlytics key lookup from Strings D/Fabric: Generating Crashlytics ApiKey from google_app_id in Strings D/Fabric: Using AdvertisingInfo from Preference Store D/Fabric: Falling back to Crashlytics key lookup from Manifest D/Fabric: Falling back to Crashlytics key lookup from Strings D/Fabric: Build ID is: ... D/CrashlyticsCore: Crashlytics is disabled, because data collection is disabled by Firebase. D/Fabric: Initializing io.fabric.sdk.android:fabric [Version: 1.4.6.29], with the following kits: com.crashlytics.sdk.android:crashlytics [Version: 2.9.7.29] com.crashlytics.sdk.android:beta [Version: 1.2.10.27] com.crashlytics.sdk.android:answers [Version: 1.4.5.29] com.crashlytics.sdk.android.crashlytics-core [Version: 2.6.6.29] D/Fabric: Not fetching settings, because data collection is disabled by Firebase. D/Fabric: Falling back to Crashlytics key lookup from Manifest D/Fabric: Falling back to Crashlytics key lookup from Strings D/Fabric: Build ID is: ... D/Fabric: Analytics collection disabled, because data collection is disabled by Firebase. D/Fabric: Could not get parcel from Google Play Service to capture AdvertisingId D/Fabric: Could not get parcel from Google Play Service to capture Advertising limitAdTracking D/Fabric: AdvertisingInfo not present D/Fabric: Asychronously getting Advertising Info and storing it to preferences
I have noticed this interesting line:
D/CrashlyticsCore: Crashlytics is disabled, because data collection is disabled by Firebase.
which is probably the cause of the issue. Yet I can't find any information about this log. -
Null over 5 yearsHi, thank you for your reply but I have already added this into the
onCreate
of my activities and I can confirm that this line is executed, as I have mentioned in my question. -
FrankMonza over 5 yearsMan this drove me crazy
-
gxcare over 5 yearsIt was the same for me until I saw this question here. Anyway the bug was confirmed also by Firebase support which I contacted.
-
Ravi Yadav almost 5 yearsis this solved in 2.10.1? As I am still facing the issue
-
Ravi Yadav almost 5 yearsFacing the issue in 2.10.1 . I am testing using this line 'Crashlytics.getInstance().crash();'
-
lilienberg almost 5 yearsI face same with 2.10.1. Downgrading to 2.9.6 fixes the issue. Could it be that the bug only appears in more recent created firebase projects? We have an old project that works with 2.10.1 but our new project only works with 2.9.6
-
Ravi Yadav over 4 years@DKV yes it worked after some delay. I was facing difficulty in multi module app.
-
DKV over 4 years@Ravi Yadav: for me debug build working perfectly. But not the release
-
Ravi Yadav over 4 years@DKV invited you to chat