Reputation: 1674
My Firebase Crashlytics logs are partially obfuscated (method names only) for some crashes while using Proguard, even though the mapping seems to be setup correctly.
The Proguard mapping was working until around September 12th, which was the last time Gradle (via Jenkins) logged Uploading deobfuscation file
and related logs into ~/Library/Caches/com.crashlytics/com.crashlytics.tools/crashlytics.log
. Now, Gradle is not logging any Proguard obfuscation file related logs or errors. Also, I checked the git commits leading up to the date to make sure nothing related changed.
Here is my implementation. I have added/excluded the Proguard rules from the documentation.
Added:
-keep public class * extends java.lang.Exception
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
Excluded:
-printmapping mapping.txt
Here is an example of the method names not being obfuscated:
com.app.android.coursetaking.nonvideo.ebook.EbookDataManager.a (SourceFile:18)
com.app.android.coursetaking.nonvideo.ebook.EbookViewModel.a (SourceFile:53)
com.app.android.viewmodel.RxViewModel.a (SourceFile:110)
com.app.android.viewmodel.RxViewModel.O (SourceFile:102)
com.app.android.coursetaking.nonvideo.ebook.AbstractEbookFragment.onViewCreated (SourceFile:98)
androidx.fragment.app.FragmentManagerImpl.a (SourceFile:1471)
androidx.appcompat.app.AppCompatActivity.onStart (SourceFile:178)
com.app.android.activity.BaseActivity.onStart (SourceFile:212)
com.app.android.core.activity.UserBoundActivity.onStart (SourceFile:63)
android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1391)
com.android.internal.os.ZygoteInit.main (ZygoteInit.java:858)
If I lookup the mapping file, I can see the mapping to the obfuscated names.
I think the issue occurs after the app is built since I can see the mapping file. But I am unsure where to look next due to the lack of Gradle logs for Firebase Crashlytics.
Lastly, I tried manually running the Gradle task to upload a signed APK, crashlyticsUploadDistributionMainAppRelease
. It failed to find a signed APK: Crashlytics halted compilation because it can't distribute the unsigned APK path/to/release/app-mainApp-release.apk
even though a signed APK was there.
Upvotes: 2
Views: 3047
Reputation: 1674
Fabric Crashlytics was the cause of the Proguard mapping issue. I was on version 1.29.0
and at version 1.30.0
, they solved my problem: Fixed an issue preventing mapping files from being uploaded for Proguard builds with Android Gradle Plugin 3.5.
. The unobfuscated mapping can now be viewed on Firebase Crashlytics after upgrading to version 1.31.1
.
Upvotes: 2