Crashlytics reports showing wrong line number after migrating app to kotlin, i have already -keepattributes SourceFile,LineNumberTable
in my proguard file
An example of wrong line number report:
Crashlytics reports showing wrong line number after migrating app to kotlin, i have already -keepattributes SourceFile,LineNumberTable
in my proguard file
An example of wrong line number report:
I disabled R8 and it worked fine, the line code on reports now shows the correct line number
The thing is R8 is applying extra optimizations to save space using small integer numbers instead of real line numbers.
The problem with de-obfuscation appears when you try to de-obfuscate using the retrace script inside the Android sdk folder at: /sdk/tools/proguard/bin/retrace.sh
The version of the proguard inside the tools folder is 4.7 which is unable to de-obfuscate optimized line number stacktrace.
The solution is to download the latest official proguard version here and use the retrace tool inside the bin folder, then the line numbers will be de-obfuscated correctly even with R8 enabled. You can verify it manually with
latest_proguard/bin/retrace.sh mapping.txt stacktrace.txt
.kt
to .java
, yet the line numbers are still wrong. –
Lamprophyre I disabled R8 and it worked fine, the line code on reports now shows the correct line number
© 2022 - 2024 — McMap. All rights reserved.
java
so I don't think it is. – Enact