Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Crashlytics not reporting crashes when manually enabled

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.

like image 575
Null Avatar asked Dec 11 '18 13:12

Null


People also ask

Is Crashlytics deprecated?

Old versions of your app still using the Fabric Crashlytics SDK will not break once it's deprecated, however they will no longer submit crash reports. But it seems like it will just continue to work as per normal after this date until further notice.

Do I need Firebase analytics for Crashlytics?

For an optimal experience with Crashlytics, we recommend enabling Google Analytics in your Firebase project and adding the Firebase SDK for Google Analytics to your app.

Is Firebase Crashlytics real time?

Firebase Crashlytics, a real time crash reporting tool, helps you prioritize and fix your most pervasive crashes based on the impact on real users.


2 Answers

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.

like image 181
gxcare Avatar answered Sep 17 '22 15:09

gxcare


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.

like image 44
GIRIRAJ NAGAR Avatar answered Sep 18 '22 15:09

GIRIRAJ NAGAR