简体   繁体   中英

Firebase crashlytics not reporting crash

I'm upgrading from Fabric to Firebase crashlytics. I've added Firebase and Fabric/Crashlytics pods to my project, added the .plist etc. All seems to be working fine, except crashes are not being reported. I'm generating a crash using assert(! "crashing on purpose to test crashlytics"); as I saw someone else mention [[Crashlytics sharedInstance] crash] didn't work for them.

What's interesting is the 'crash free users' for the build number I'm using drops to 0% after the crash is generated, but crashes is reported as 0. The dSYMs tab doesn't list the version number.

在此处输入图片说明

Here's the crash coming through on the debug view when -FIRDebugEnabled is passed as an argument: 在此处输入图片说明

Any suggestions?

I had a similar issue when migrating from Fabric to Firebase Crashlytics. You should not follow the Firebase website instructions. Stick with the Fabric instructions as mentioned by @Ashvini. I am assuming that you already had Crashlytics working fine before migration to Firebase. I tested this approach and it works for me. This is a pain as older and newer projects will have different Crashlytics implementations.

  • After installation make sure you have initialized Fabric SDK in your AppDelegate file by using below line of code:

    For Objective-C : [Fabric with:@[[Crashlytics class]]]; and

    For swift : Fabric.with([Crashlytics.self])

  • After that force your app to be crash by calling Crashlytics.sharedInstance().crash() for swift and [[Crashlytics sharedInstance] crash] for Objective-C. Call this method by adding any button programmatically in your ViewController or on existing action.

  • Crashlytics doesn't capture crashes if a debugger is attached at launch, so to see the crash in action you'll need to follow these steps:

    1. Run your app from Xcode to install it on the simulator or your device
    2. Press the Stop button in Xcode to quit it
    3. Launch your app from the home screen to run it without the debugger
    4. Press the “Crash” button to trigger the crash
    5. Run the app again from Xcode so it can deliver the recorded crash to Crashlytics.
  • Within a few minutes, you should see the crash appear on your Fabric Dashboard.

  • If you didn't found crash in dashboard then Double-check in your Build Settings that your Debug Information Format is “DWARF with dSYM File” for both Debug and Release.

  • Make sure to launch the app after crashing it, so that the crash can be uploaded.

  • If you don't see the crash after a few minutes, run your app again to retry crash delivery.

  • You can refer to this link [ https://fabric.io/kits/ios/crashlytics/install] .

See that you have the latest pods installed, as the firebase docs says you should have this pod versions

pod 'Fabric', '~> 1.9.0'
pod 'Crashlytics', '~> 3.12.0'

Here is the link to the docs of firebase crashlitycs

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM