Firebase Crashlytics not working without Fabric AP

2020-08-16 04:00发布

问题:

I got an android app where Fabric Crashytics is installed. I've followed the official guide to setup Firebase Crashlytics and linked the Fabric and Firebase accounts (AFAIK Firebase acquired Fabric recently). So in particular I removed the Fabric API key with <meta-data/> tag in manifest.xml.

Then I tried to make a test crash but it didn't appear neither in Firebase not Fabric dashboard, however I got a success log in logcat: Crashlytics report upload complete: <ID>.

When I sniffed the network, it appeared that I'm getting 403 Unathorized from Crashlytics. However when I add the Fabric API key in <meta-data/> tag it works and I see the crash report.

Help me please what is wrong with my configuration, why do I need to use old Fabric API key if I'm using new Firebase Crashlytics and docs don't state that.

回答1:

For those on iOS that used Fabric, so this is what I finally got from support. I wanted to start fresh.

  • Visit https://firebase.google.com/docs/crashlytics/get-started?authuser=1#ios.
    • Revise pods in Podfile accordingly (specify versions of Fabric and Crashlytics as instructed)
    • Update the build phase run script: "${PODS_ROOT}/Fabric/run" instead of the current one that points to their Fabric API key
  • Remove API key from Info.plist - In your AppDelegate.swift, remove import Fabric and import Crashlytics and any Fabric.with statement, keep import Firebase and use FirebaseApp.configure() instead

  • Go to project settings in Firebase console, click the Integrations tab, unlink the appropriate Fabric app from Firebase (if you don't do this, you will get an error looking like: "[Fabric] failed to download settings Error Domain=FABNetworkError Code=-5")

  • Go to the Crashlytics tab and you should see that you have to onboard Firebase Crashlytics again.
  • Go through those steps choosing "This app doesn't have Crashlytics installed" and when you get to the final step, build and run the app and wait a few seconds. Then you Crashlytics tab will be setup.

Once I did this, and force crashed, it FINALLY showed up.



回答2:

Below things are mandatory, if you Migrate from existing Fabric crashlytic application to Firebase crashlytic

<meta-data
          android:name="io.fabric.ApiKey"
            android:value="xxxxxxxxxxxxxxxxxxxxxxxxxx"
            />
 Fabric.with(new Crashlytics()));

But not sure what will happen to these API and KEY, once fabric is down Say mid 2019.



回答3:

The Firebase Crash Reporting will be superseded by Fabric Crashlytics and not the other way around ...currently there still seems to be some dependency to firebase-crash, which might get removed in future versions.

https://firebase.google.com/docs/crashlytics/upgrade-from-crash-reporting

^ despite it reads "Firebase Crashlytics" there, it might still be "Fabric Crashlytics".