My Android project is currently using Firebase Crashlytics.
I would like to use Fabric Crashlytics.
I have tried following steps from here, but it is not reporting any crash.
I have also removed this line from app gradle:
implementation "com.google.firebase:firebase-crash:x.y.z"
Any solution to this would be much appreciated. Thank you.
In case you want to know the reason behind this migration decision, please refer to this SO question.
Fabric services will cease to exist after March 2020.
It would not help to migrate. If you are missing feature parity, you may want to contact Firebase Support.
Related
I'm migrating from fabric to firebase crashlytics. I've been able to migrate to AndroidX (which I believe was necessary). Then I followed this steps but the app crashes when I add the crashlytics dependency (everything works if I comment out the crashlytics implementation line).
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
When using a physical phone, I don't get any error, just some SQLiteEventStore and JobInfoScheduler log and the sigkill:
https://gist.github.com/raquelhortab/60ebd50ead5aa820c34bc271a09e94b7
When using an emulator I get an okhttp3 error (you can see it in the gist above). Again, the only difference is the crashlytics line in the app's build.gradle.
The okhttp3 error made me think I might have to update glide and okhttp3 (which is not that easy) but it works just fine without crashlytics so I don't think that's the problem.
I've also tried the crashlytics version 17.2.2 and newer versions of firebase-related implementations, you can find the gradle files in the gist as well.
PS: I apologize if this has already been answered, searching crashes and crashlytics leads to many questions of crashes that are not realated to crashlytics (which is logic)
It doesn't seem firebase issue from the error stack provide. Try to add the same version for com.squareup.okhttp3:logging-interceptor and com.squareup.okhttp3:okhttp
try 3.4.1
I have migrated Fabric Crashlytics to Firebase Crashlytics in my android project. While using fabric, in activity class I have used below line,
Fabric.with(this, new Crashlytics());
But after migration, what is the exact replacement of this in Firebase Crashlytics.
Thanks in Advance..
You have to follow the Firebase tutorial when activating the Crashlytics. You don't need any code to initialize Crashlytics, it's automatic.
The only thing you need, following the tutorial, is to make an intentional crash, api will detect it and your crashlytics will be connected.
Please, follow the next documentation: https://firebase.google.com/docs/crashlytics/get-started?hl=es&platform=android
Does anyone know what the proper way to implement Crash report using Firebase in Android application?
I have read Firebase crashlytics doc in that mention implement Fabric.io. Fabric.io is deprecate and in there document mention removed fabric.io dependency.
Firebase
https://firebase.google.com/docs/crashlytics/get-started?platform=android
Fabric.io reference
https://docs.fabric.io/android/examples/sampleapp/index.html
Without fabric.io dependency I am getting below error
java.lang.RuntimeException: Unable to get provider com.crashlytics.android.CrashlyticsInitProvider: io.fabric.sdk.android.services.concurrency.UnmetDependencyException: The Crashlytics build ID is missing. This occurs when Crashlytics tooling is absent from your app's build configuration. Please review Crashlytics onboarding instructions and ensure you have a valid Crashlytics account.`
Note:
Please compare the steps in both reference, I have go through all the links but didn't find the proper way that's why I am asking here.
I am sure no 1 go through the links, that's why getting down vote great. I have attached the Firebase and Fabric.io document steps screen
Late post
Here is the solution, first of all remove all the fabric.io related reference and code.
In the main gradle.build project level
buildscript {
ext.kotlin_version = '1.4.0'
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.0.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// Add this line
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.3.0'
}
}
Next, in the build.gradle app level
apply plugin: 'com.google.firebase.crashlytics' // add this line at top
and in the dependency area
dependencies {
implementation 'com.google.firebase:firebase-crashlytics:17.2.2' // add this line
}
If you really want to remove the Fabric SDK from your app and use the Firebase SDK, Follow the Upgrade to the Firebase Crashlytics SDK
This guide describes how to upgrade to the new SDK from the Fabric Crashlytics SDK. It describes the changes that come with the new APIs, the reason for the changes, and how to update your code, if required.
docs.fabric.io you can get the following information, So I don't know why you have so many down votes, this is a legit question IMHO. Maybe because you didn't do this research yourself which I just did here.
You can continue using the Fabric Crashlytics SDK in your apps until a deprecation date is announced. Once the Fabric Crashlytics SDK deprecation date is announced you will need to upgrade to the new Firebase Crashlytics SDK. 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. Just leave it the way it is.
Are you talking about this?
apply plugin: 'io.fabric'
According to the documentation in here,
Crashlytics has been integrated into Firebase, with new Firebase-only
features. New apps should use Crashlytics in Firebase to get access to
the latest updates and features. Fabric Crashlytics and the Fabric
dashboard will be available until March 31, 2020 for existing users.
My guess is that, it might be - Let's call it grace period ;) up until every other user migrates it and they migrate every other tool from Fabric.
By the end of March 31, 2020 everything related to Fabric might be removed. Hope I answered what you were stating about.
One of the problems is that the Google page omits the android tutorial in languages other than English. (it can happen by bug. It happened to me.)
Ok ... I'm not very experienced with Crashlytics, and looking to make the migration I came across exactly these links that you showed and I was also confused.
But as I understand it, Fabric Crashlytics was acquired and incorporated into Firebase, so the first tutorial is old, when there was a need for the Fabric library to implement Crashlytics in Firebase.
The second tutorial does not seem to want to specify which new libraries will be implemented.
The best tutorial I found is this:
Oficial:
https://firebase.google.cn/docs/crashlytics/upgrade-sdk?platform=android#kotlin+ktx_5
or:
https://medium.com/#onkart10/migrating-from-fabric-to-firebase-crashlytics-e8819933c484
I hope it helps others.
I try to setup Firebase Crashlytics after done setup Firebase.
The crashes was sent successfully.
Which I can see them in firebase dashboard.
But When I enter crashlytics to see crash detail.
I got stuck on step 3 (Build and run your app , We'll be listening for your app to communicate with our servers.).
I already try uninstall-reinstall , remove fabric or firebase crash report part but not working at all.
Here is firebase,fabric,crashlytics version I use.
classpath 'com.android.tools.build:gradle:3.3.1'
classpath 'com.google.gms:google-services:4.0.2'
classpath 'io.fabric.tools:gradle:1.26.1'
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9#aar')
{
transitive = true;
}
Any solution?
Guys I have commented earlier here for solution but fortunately got its solution on my own.
Initialization of app is not mentioned anywhere to get crashlytics report on our console!
Step 1. First follow the official doc's link to include all dependencies as it is given there and setup your firebase app through firebase console.
Step 2. Now do the following initialization in your base application class or base activity class.
FirebaseApp.initializeApp(getApplicationContext());
FirebaseCrashlytics.getInstance().setCrashlyticsCollectionEnabled(true);
Now clean you project and do some force crash for few times, you should be able to see your crashlytics report on your firebase console
Refer this answer also OkHttp timeout issue
I had the same problem.I was working in an old project with the old Fabric Crashlytics and Google Analytics
So, this are the steps I did to see the screen in Firebase of "Installation successful!"
Delete everything related to Fabric from the project-level build.gradle
Delete everything related to Fabric from the app-level build.gradle
Search and delete all calls to Crashlytics within the project
Clean Project
Build Project
and finally, start again following the steps from this link
The first 4 steps were the most important in my case. They cleaned every trace of the Fabric library that I had previously installed.
Firebase Document also tells us to wait 5 minutes https://firebase.google.com/docs/crashlytics/test-implementation?platform=android
This is what is said in document :
To test the implementation, press the button in your app to force the
crash, then reopen your app so that Crashlytics can send the crash
report to Firebase. It may take up to five minutes for the report to
appear in the Firebase console.
I also followed #Shetanks answer https://stackoverflow.com/a/59906454/14784590
And its working after few crashes in two different devices.
Try updating your dependencies according to the Get Started page.
It should be something like:
implementation 'com.google.firebase:firebase-core:16.0.7'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9')
Remove the line:
transitive = true;
If you have multiple apps in the project then make sure that right app is selected for communication in the Firebase crashlytics console.
I searched everything on the web, at the end I realized that I have selected the wrong app in crashlytics console.
I have the same problem as well and tried out all the possible solutions. I just deleted the project from firebase console and recreate the project. It works for me.
Note: It is not a good approach If you have a lot of data in your firebase project. I would suggest using this approach If you are using firebase only for crashlytics.
my case i selected Crashlytic for android, not ios
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.
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.
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.
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".