Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

debuggable: false causes native errors to not be reported on Android 10. #1678

Closed
jlennox opened this issue Jun 17, 2020 · 18 comments
Closed
Assignees

Comments

@jlennox
Copy link

jlennox commented Jun 17, 2020

[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

@mrwillis21
Copy link
Contributor

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.

@hborders
Copy link

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?

@kmandrika
Copy link
Contributor

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

int x = *reinterpret_cast<int *>(0);

does the crash get reported?

@hborders
Copy link

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.

@hborders
Copy link

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?

@kmandrika
Copy link
Contributor

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

@hborders
Copy link

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

@bikranttripathi
Copy link

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.

@jkcailteux
Copy link

Any update on this?

@jlennox
Copy link
Author

jlennox commented Nov 5, 2020

@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.

@mrwillis21
Copy link
Contributor

@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?

@jkcailteux
Copy link

jkcailteux commented Nov 5, 2020

@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"?

@mrwillis21
Copy link
Contributor

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

@kmandrika
Copy link
Contributor

@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.

@hborders
Copy link

hborders commented Nov 5, 2020

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.

@kmandrika
Copy link
Contributor

kmandrika commented Nov 5, 2020

@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.

@mrwillis21
Copy link
Contributor

mrwillis21 commented Nov 12, 2020

@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!

@hborders
Copy link

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

@firebase firebase locked and limited conversation to collaborators Jan 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants