简体   繁体   中英

Android Firebase crashes doesn't send crash report in third party libs (or *.aar)

I found that I didn't receive crash issues which was registered in a third party libs attached to project as dependency or like *.aar. I mean, for example, like this:

implementation 'xxxx:2.1.1'

I developed some library in my project and attached it as dependency to an app. I simulated some crash in this lib, but I didn't receive any crash report in Firebase. Moreover, I created the same library which is using NDK. But I also haven't any crash reports.

It seems that Firebase sends crashes which were detected only in the app, but we didn't send it from libs. It's not a good, because previously, in Fabric, we got it.

I had followed to the instructions which described here I had used:

dependencies {
    // Recommended: Add the Firebase SDK for Google Analytics.
    implementation 'com.google.firebase:firebase-analytics:17.4.2'

    // Add the Firebase Crashlytics SDK.
    implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
}

Does anybody have the same situation?

Firebaser here -

There are a couple things going on here. First, what we expect to work:

  • Receiving Java crashes from a library. If you're initializing Crashlytics as normal in your main app process, we would expect it to be able to pick up crashes from a library/AAR that you're pulling in. Once compiled into an APK, the library code is all just app code, and Crashlytics should be able to report on it.
  • For example, if you're including a math library, and the Crashlytics initialization is occurring before a method call like mathlibrary.add(number1, number2) , that method call should get captured and symbolicated.
  • Crashlytics initializing before library method calls would be the expected behavior, because in Android, as long as Firebase is configured correctly Crashlytics should be starting up automatically at the start of your app process. If you're doing any work to change this behavior in your app, it could be causing this issue. I'd need to know more about how you're actually initializing Crashlytics, since if you're trying to initalize Crashlytics in the library itself, or the library code itself spins up a Service, that could cause issues with reporting.

What doesn't work:

  • NDK reporting from a library. AARs can contain native code and Java code, but the Java specifically should be getting captured even if it's in a library.
  • However if you're in a situation where you would need to upload native symbol files to Crashlytics in order to get sensible stacktraces from your AAR, Crashlytics doesn't support this particular path yet.

Overall, what you're trying to do should work with Java code, and to diagnose your issue we'd need to know more about how you're setting up Crashlytics in your app and how you're setting up the library itself. Feel free to submit a support case with Firebase support as well with all that information.

You might have to enable NDK crash reports; see Get Android NDK crash reports .

implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
implementation 'com.google.firebase:firebase-crashlytics-ndk:17.0.0'

I used a third-party NDK library for my Android project and created a crash, but I didn't see any crash reports on the firebase site, but strangely enough, JAVA crashes were available on the site. I have checked the configuration of each step of the firebase SDK, and it is confirmed that there is no error. I want to know what the problem is, is it that firebase Crashlytics does not support third-party NDK crash reporting?

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