Diana
Diana

Reputation: 140

Firebase Crashlytics not reporting crashes after Fabric Migration

Recently we migrated our app from Fabric to Firebase Crashlytics and Firebase Analytics. In android, everything works like a charm after following Google documentation. The problem is that in iOS we get no report on Firebase Crashlytics (works perfectly on Firebase Analytics)after following the same documentation.

Paths:

Dev Google Service Info Plist: Supporting Files > Firebase > Dev > GoogleService-Info-Dev.plist

Prod Google Service Info Plist: Supporting Files > Firebase > Prod > GoogleService-Info-Prod.plist

Empty Plist: Supporting Files > GoogleService-Info.plist

Build Phases:

Run Script (GoogleService-Info.plist assignment):

if [ "${CONFIGURATION}" = "Release" ]; then
    GOOGLE_SERVICE_INFO_PLIST_FROM="${PROJECT_DIR}/Supporting Files/Firebase/Prod/GoogleService-Info-Prod.plist"
else
    GOOGLE_SERVICE_INFO_PLIST_FROM="${PROJECT_DIR}/Supporting Files/Firebase/Dev/GoogleService-Info-Dev.plist"
fi

GOOGLE_SERVICE_INFO_PLIST_TO="${PROJECT_DIR}/Supporting Files/GoogleService-Info.plist" 
cp "${GOOGLE_SERVICE_INFO_PLIST_FROM}" "${GOOGLE_SERVICE_INFO_PLIST_TO}" 

Run Script (Firebase Crashlytics Run):

# Run Firebase Crashlytics

"${PODS_ROOT}/FirebaseCrashlytics/run" -gsp "${PROJECT_DIR}/Supporting\ Files/GoogleService-Info.plist" 

AppDelegate:

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
       
   // Set Google -Info.plist for enviroment
       let filePath = Bundle.main.path(forResource: ULima.getInfoPlist(buildType: ULima.buildType), ofType: "plist")
   if let fileopts = FirebaseOptions(contentsOfFile: filePath!) {
       // Use Firebase library to configure APIs and Crashlytics
       FirebaseApp.configure(options: fileopts)
   }
  [...]
}
       

Crashlytics Console:

Crashlytics Console

What I already tried:

        Crashlytics.crashlytics().setCrashlyticsCollectionEnabled(false)

        Crashlytics.crashlytics().checkForUnsentReports { _ in
            Crashlytics.crashlytics().sendUnsentReports()
        }

Upvotes: 0

Views: 1804

Answers (1)

Mickey16
Mickey16

Reputation: 131

The run script doesn't look fine to me. There should be one or two separated commands:

  1. run (start) Firebase Crashlytics: "${PODS_ROOT}/FirebaseCrashlytics/run" (see docs)
  2. if Firebase Crashlytics is unable to process the dSYM files itself, you should upload the dSYM file to Firebase to get deobfuscated crash reports (see docs)

So I suggest you to edit your Firebase Crashlytics Run Script just to Run Crashlytics (without uploading any dSYM file). If it helps and you can see a crash in console, than you can check if dSYM file is missing (so another script for uploading dSYM will be needed).

Upvotes: 0

Related Questions