Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Crashlytics doesn't deobfuscate code

I have mysterious problem with Frabric(Crashlytics) service.
I found that crashlytics doesn't de-obfuscate crashlogs automatically.

io.fabric.tools version 1.19.1 and android.tools version 1.2.3 in top-level build file:

dependencies {
    classpath 'com.android.tools.build:gradle:1.2.3'
    classpath 'io.fabric.tools:gradle:1.19.1'
}

BuildTypes config:

buildTypes {
    debug{
        debuggable true
        jniDebuggable true
    }
    release {
        debuggable false
        jniDebuggable false
        minifyEnabled true
        proguardFiles 'proguard-coda.txt', 'proguard-rules.pro'
    }
}

And dependencies:

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

The proguard config file contain:

-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable

From gradle console I see tasks related to crashlytics are okay :app:crashlyticsStoreDeobsRelease and :app:crashlyticsUploadDeobsRelease:

Executing tasks: [:app:assembleRelease]

Configuration on demand is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
...............................
:app:fabricGenerateResourcesRelease
:app:processReleaseResources
:app:generateReleaseSources
:app:processReleaseJavaRes UP-TO-DATE
:app:compileReleaseJava UP-TO-DATE
:app:compileReleaseNdk UP-TO-DATE
:app:compileReleaseSources UP-TO-DATE
:app:collectReleaseMultiDexComponents UP-TO-DATE
:app:proguardRelease UP-TO-DATE
:app:shrinkReleaseMultiDexComponents UP-TO-DATE
:app:createReleaseMainDexClassList UP-TO-DATE
:app:retraceReleaseMainDexClassList UP-TO-DATE
:app:dexRelease UP-TO-DATE
:app:crashlyticsStoreDeobsRelease           <=====
:app:crashlyticsUploadDeobsRelease          <=====
:app:lintVitalRelease
:app:validateExternalOverrideSigning
:app:packageRelease
:app:zipalignRelease
:app:assembleRelease

BUILD SUCCESSFUL

Total time: 11.569 secs

But crash logs are still not de-obfuscated.

Caused by: java.lang.RuntimeException: Test exception!!!
       at coda.RootActivity.onCreate(SourceFile:189)     <====
       at android.app.Activity.performCreate(Activity.java:5990)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1106)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2278)

Can somebody help me with it?

like image 822
Hospes Avatar asked Jul 08 '15 10:07

Hospes


People also ask

How does Firebase Crashlytics handle debug symbols?

By default, Firebase Crashlytics automatically processes your debug symbol (dSYM) files to give you deobfuscated and human-readable crash reports. This behavior is set when you add a run script that initializes Crashlytics to your app's build phase.

Does Crashlytics collect user data?

This class’s main responsibility is to figure out whether Crashlytics has the permission to collect user data. Most of the library works regardless of this permission, collecting crash report data and storing it on device doesn’t but uploading the crash report to Crashlytics requires it.

Is it possible to disable Crashlytics in debug?

... ... Unfortunately, while this setting is absolutely mandatory to disable crashlytics in debug, you still need to explicitly enable Crashlytics in other build types. Even though we enabled Crashlytics data collection in the manifest, my tests show that it’s not enough to actually get the reports.

Why can't Crashlytics Find my App's dSYM?

Sometimes Crashlytics can’t locate your app's dSYM due to bitcode configurations or the console's connectivity. When this happens, there are two additional ways you can troubleshoot:


1 Answers

I checked one of our projects, we are not using this line in proguard configuration and it's working fine

-renamesourcefileattribute SourceFile
like image 53
Vojtěch Sázel Avatar answered Sep 21 '22 06:09

Vojtěch Sázel