Firebase-android-sdk: `debuggable: false` causes native errors to not be reported on Android 10.

Created on 17 Jun 2020  路  18Comments  路  Source: firebase/firebase-android-sdk

[READ] Step 1: Are you in the right place?

Issues filed here should be about bugs in __the code in this repository__.
If you have a general question, need help debugging, or fall into some
other category use one of these other channels:

  • For general technical questions, post a question on StackOverflow
    with the firebase tag.
  • For general Firebase discussion, use the firebase-talk
    google group.
  • For help troubleshooting your application that does not fall under one
    of the above categories, reach out to the personalized
    Firebase support channel.

[REQUIRED] Step 2: Describe your environment

  • Android Studio version: 3.6.2
  • Firebase Component: Crashlytics (Database, Firestore, Storage, Functions, etc)
  • Component version:
firebaseAnalyticsVersion = '17.4.2'
firebaseCrashlyticsGradlePluginVersion = '2.1.1'
firebaseCrashlyticsNdkVersion = '17.0.1'
firebaseCoreVersion = '17.4.3'
firebaseGradlePluginVersion = '1.1.5'
firebaseMessagingVersion = '20.2.0'
firebaseDynamicLinksKtxVersion = '19.1.0'
firebaseDynamicLinksVersion = '19.1.0'
firebasePerfsVersion = '19.0.7'

[REQUIRED] Step 3: Describe the problem

Steps to reproduce:

At Discord we're moving from the deprecated com.crashlytics.android.Crashlytics to the supported com.google.firebase.crashlytics.FirebaseCrashlytics ahead of the discontinuation later this year but have encountered an issue.

We're experiencing an issue where a native crash is not being reported if debuggable: false is set inside the build.gradle on Android 10. The application is restarted after each crash and FirebaseCrashlytics reports there's nothing pending to send.

Works: Java crash, all.
Works: Native crash, Nexus 5, Android 6, debuggable: false
Works: Native crash, Pixel 2, Android 10, debuggable: true
Does not work: Native crash, Pixel 2, Android 10, debuggable: false

abort() is called inside the native code to test the update and we've discovered the above to be true.

From my observation of the logs, it appears the sigaction handler is not being triggered.

Working Crashalytics, Android 10, debuggable: true logs: https://gist.github.com/jlennox/c0673424a515ccd3941a5ce87d0413b7
Non-working Crashalytics, Android 10, debuggable: false logs: https://gist.github.com/jlennox/229129a29934d7fecc0da7343ad87e08

Relevant Code:

N/A

crashlytics

Most helpful comment

Any update? This is still preventing me from upgrading to the latest Crashlytics and the deadline is fast approaching. 馃檧

All 18 comments

Hi @jlennox, thanks for the detailed report! We're aware of and are currently looking into similar reports of issues like this with native crash handling on Android 10, and I'll let you know once I have more information.

I'm affected by this as well. If I crash my app in an API 29 emulator, I don't see the crash report in the firebase console, but if I crash my app in an API 28 emulator, I see a new crash report.

However, my native crash isn't symbolicated. I only have unstripped symbols for the 3 libraries I build from source. I have to manually delete all the .so files that don't have corresponding unstripped versions before I run ./gradlew uploadCrashlyticsSymbolFileRelease, so maybe that's related?

@jlennox @hborders are you seeing this issue for signals other than SIGABRT? For example, if you crash via

int x = *reinterpret_cast(0);

does the crash get reported?

I changed my native code to crash with int x = *reinterpret_cast<int *>(0); and Crashlytics-NDK still doesn't report the crash on an API 29 emulator. (I restarted the app after the crash and let it sit for a minute to ensure the report was uploaded.) The same crash reported successfully on an API 28 emulator.

This is blocking my adoption of the new version. Since the old version will stop reporting crashes, it's important that I get migrated as soon as possible. Do you have any ideas about when this will get fixed?

@hborders we are actively working on a fix for this - I don't have an ETA at this time unfortunately.

Any update? This is still preventing me from upgrading to the latest Crashlytics and the deadline is fast approaching. 馃檧

Hi @kmandrika, Any update on this? We are also blocked from migrating to Firebase Crashlytics and the deadline is in 11 days. Please let us know if there is any talk about extending this deadline or a workaround for this.

Any update on this?

@mrwillis21 @kmandrika Losing this will be a massive setback to our ability to support our product.

A Google advocate just this week wrote an article about the importance of crash reduction https://medium.com/androiddevelopers/fewer-crashes-and-more-stability-with-kotlin-b606c6a6ac04

With 10 days left we've been in the dark for months. Please extend the deprecation until there's a product to replace it with.

@jlennox Hi there! Sorry for the radio silence. Our next release will address this, which should be out sometime next week, barring any unforeseen issues. I do apologize that this is coming in so hot.

You mentioned that you've been in the dark for months - have you been receiving crashes for Android versions < 10 or no?

@jlennox Hi there! Sorry for the radio silence. Our next release will address this, which should be out sometime next week, barring any unforeseen issues. I do apologize that this is coming in so hot.

You mentioned that you've been in the dark for months - have you been receiving crashes for Android versions < 10 or no?

Is it possible for Google to extend the deprecation given how "this is coming in so hot"?

@jkcailteux Unfortunately I don't have any say over that, but I will pass the message along.

@jlennox @jkcailteux apologies for the radio silence!

The issue that you're running into - SIGABRT not handled correctly on Android 10+ - is a problem within Breakpad. This problem also exists in the Fabric NDK SDK, unfortunately. As Matt mentioned, the next version of the Crashlytics NDK SDK should fix it.

An option to consider is to upgrade your app to the current, production Firebase SDK - since it provides the same quality of service as Fabric - and do a fast follow once the Crashpad-backed version is live next week.

For full transparency, our fix involved completely replacing Breakpad with Crashpad. As you can imagine, this is quite an undertaking.

This problem also exists in the Fabric NDK SDK

This isn't consistent with the behavior I saw with com.crashlytics.sdk.android:crashlytics-ndk:2.1.1@aar. We were getting SIGABRT crashes in Android 10+ with that.

@hborders that's odd, there were no significant changes within the internals of the Crashlytics NDK SDK between Fabric and Firebase (aside from an upgraded version of Breakpad, potentially).

Are you able to reproduce this currently? If so, what device and what build of Android 10+ yields these results? The reason I ask is because I suspect that this may not have been a problem on certain builds of Android 10. I was unable to get SIGABRT working with Breakpad on any of the Android 10+ devices in my possession.

@hborders @jlennox @jkcailteux Wanted to make everyone aware that we've just released firebase-crashlytics-ndk version 17.3.0 which should address this issue. When you update the SDK version, make sure to update the version of the Crashlytics Gradle plugin as well to 2.4.1, to ensure you continue to get properly symbolicated crashes.

Let me know how it goes for you!

I upgraded and I got SDK and NDK crashes on Android 8.1 and Android 10.

Was this page helpful?
0 / 5 - 0 ratings