Crashlytics doesn't display native crashes
Asked Answered
T

1

12

Crashlytics Native report

Before this gets marked as a duplicate, I have tried everything from all the possible questions. Java crashes are reported properly, however crashes from the native libs don't have the debug symbols.

What i've tried:

./gradlew crashlyticsUploadSymbolsDevDebug // to upload the symbols manually
androidNdkOut 'build/intermediates/ndkBuild/devDebug/obj/local' //specify the ndk paths manually
androidNdkLibsOut 'build/intermediates/merged_native_libs/devDebug/out/lib'` //specify the ndk paths manually

The current setup:

Dependencies:

implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') { transitive = true }

implementation 'com.crashlytics.sdk.android:crashlytics-ndk:2.1.1'

android.applicationVariants.all { variant ->
def variantName = variant.name.capitalize()
def task = task("ndkbuild${variantName}")
task.finalizedBy("crashlyticsUploadSymbols${variantName}")
}

crashlytics {
enableNdk true
manifestPath 'AndroidManifest.xml'
androidNdkOut 'build/intermediates/ndkBuild/devDebug/obj/local'
androidNdkLibsOut 'build/intermediates/merged_native_libs/devDebug/out/lib'
}

The fabric dependencies:

buildscript {
repositories {
    maven { url 'https://maven.fabric.io/public' }
}

dependencies {
    // The Fabric Gradle plugin uses an open ended version to react
    // quickly to Android tooling updates
    classpath 'io.fabric.tools:gradle:1.31.2'
    }
}

Fabric is setup and working with the Java layer crashes.

Fabric.Builder builder = new Fabric.Builder(this).kits(new Crashlytics(), new 
CrashlyticsNdk());`

The problem: Native crashes get reported but the debug symbols are missing, there are no error/outputs that indicate why they're missing.

I made a sample app in order to be able to reproduce this more easily. All you have to do is create a project in firebase and paste the google-services.json file and build. Link to the repo

Tonsure answered 12/12, 2019 at 13:34 Comment(1)
Were you able to get it working? We have the same problem. Tried everything and still not seeing any symbols.Parole
M
0

This might be caused by debug symbols in another module or because of an outdated configuration.

Try to configure it alike this:

crashlytics {
    enableNdk true
    // If using the Android plugin for Gradle version 2.2.0+ with the externalNativeBuild DSL,
    // you should remove the androidNdkOut and androidNdkLibsOut properties, as these paths will
    // automatically be detected by the Fabric plugin.
    androidNdkOut 'obj'
    androidNdkLibsOut 'libs'
    manifestPath 'AndroidManifest.xml'
}

However, you should better migrate to Firebase Crashlytics, because Fabric will shut it down soon:

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.

Maros answered 22/12, 2019 at 19:15 Comment(3)
Thanks for your answer, Martin. Unfortunately this did not solve the issue. Reading the fabric docs, it is stated that even if we remove the androidNdkOut and androidNdkLibsOut paths completely from the crashlytics, fabric should still find the debug symbols. I am using crashlytics.Tonsure
two months ago, I had upload symbols successfully. but now, it response 202Tonnie
Meanwhile there is only Fabric Crashlytics, so this question is obsolete.Maros

© 2022 - 2024 — McMap. All rights reserved.