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:
Run your app from Xcode to install it on the simulator or your device
Press the Stop button in Xcode to quit it
Launch your app from the home screen to run it without the debugger
Press the “Crash” button to trigger the crash
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
Related
Firebase integration with my app is working like a charm.
So I tried to add Crashlytics.
After pod the SDK and configuring my app in XCode, I've got the version message on log:
"2020-10-23 14:13:36.386002-0300 Findn[44158:3074710] [Firebase/Crashlytics] Version 4.6.2"
But at Firebase Console there isn't a card for Crashlytics.
And at Crashlytics tab this circle keep spinning.
Any tips?
EDIT:
Guess I wasn't clear enough, sorry.
I did follow all guidelines to integrate Firebase to my app.
The problem seems to be on Firebase side, since my app's log does not report any errors on xcode.
Yes, Now you can not use fabric solely. You have to integrate firebase to use a fabric.
Check this link:
firebase crashlytics
Maybe the solution is here!
The steps are the following:
Ensure you add the code in order to force a crash, something like that firebase
First, you need to build the app and launch the app with Xcode,
Next launch without attaching with Xcode (manually, tapping on icon app), and force crash app with fatalError()
Then launch with Xcode and the app will send the traces... 💥
I have implemented Firebase Analytics 6.15.2 into my project, then I have builded the Xcode project and have run it on the device, everything went perfect, but when I try to open the app afterwards, without it running from Xcode - it crashes after 20 seconds of launch screen.
So I have no logs and anything, I somehow figured out it's an issue with Firebase and downgraded the pods in the Xcode project to Firebase 5.3.0, it worked.
I have other projects where the same issue is occurring.
So my question is, how do I fix it? Because there is no way it's happening to everyone, I might be doing something wrog here and I just don't see it.
I use Unity 2020.1.2f1
Firebase Core + Analytics 6.15.2 via Package Manager (also tried installing it manually, still the same)
Other plugins I am using are Facebook and ironSource
ps. The funny thing that it crashes on all devices, but it passes Apple review because they test it in some kind of debug mode, but when it's in release mode - it crashes.
Have you tried to reinstall Firebase Analytics 6.15.2? Also, you can try to restart your device and try to make it work again.
You need to add the debug symbols to your app debug archive file:
Select your Target -> Build Settings -> Build Options -> Debug
Information Format
Then Select DWARF with dSYM file for the debug mode.
I have implemented firebase Crashlytics in my swift projects without cocoapods. I have done the following task so far. But still, not getting anything on the dashboard.
Created project in firebase console. Downloaded the plist file and added to project.
Added the firebase library all with Firebase.h header file. Then added the header with an Obj-c bridge header file from settings. Also fabric and Crashlytics library.
Added the run script.
In appdelegate, didFinishLaunchingWithOptions() , added these 3 lines.
FirebaseApp.configure()
Fabric.sharedSDK().debug = true
Fabric.with([Crashlytics.self])
In a viewcontroller, added the following line, run on the simulator, make a crash, relaunch the apps. So that I can expect it to upload on the dashboard. Nothing found in the log, just see firebase enabled. Crashlytics version ...
Crashlytics.sharedInstance().crash()
From project settings i set , Debug Inforation Format : DWARF with dSYM File
But I see nothing on the dashboard. I don't use any API key in my Plist, I just using the plist in my project. What could be my problem?
I think I know what the issue is. You're probably running in the Simulator with the debugger attached.
Crashlytics can’t capture crashes if your build attaches a debugger at launch.
Docs for forcing a crash: https://firebase.google.com/docs/crashlytics/force-a-crash
To fix this, go to your app in the Simulator w/o the debugger attached and reproduce your crash. You should see your crash in the Firebase console.
I have searched a lot for a solution to my case but no answer. I proceed with the installation for crashlytics on iOS, but the crashes don't appear on crashlytics. There are no missing DSYM, and I set the 'Debug Information Format' to 'DWARF with dSYM File'. I tried a lot of solutions but no one fit my case. Any help is appreciated!
when I press run I get the following from fabric window
the updated output of the console when I press run
Looking at the output from your log, it seems like you're using Firebase Crash Reporting and not Firebase Crashlytics. If you want to use Crashlytics, you need to remove the Firebase Crash Reporting SDK (you can't have 2 exception handlers in iOS apps) and then follow the instructions for installing and setting up Firebase Crashlytics.
I found that calling to latest Fabric Crashlytics 3.7.0
[Fabric with:#[[Crashlytics class]]];
causes my app to close / crash, but only when the app was distributed with TestFlight... it doesn't happen, even when build with release
It is the first thing called in didFinishLaunchingWithOptions, as i found out it is crashing the app, i moved it to another part of code, when a button is pressed and it crashed / closed the app
The problem is, i cannot find any trace of a crashlog nowhere, not in Settings -> Privacy... not when attaching to XCode and looking at the console
I had a separate target for the AppStore distribution and looks like i forgot the Fabrics entry in the plist