Deobfuscation of Android proguard stack trace issues

We are uploading our Android mappings file via the Sentry Android gradle plugin. The build messages indicate it uploaded successfully and we do see our crashes now have the ‘Symbolicated’ options in the web UI. However, we are noticing that while some of the stack trace is deobfuscated some of it is not. We run the same ‘raw’ stack through retrace.sh locally and it produces much better results.

Is this being caused by something we are not doing correctly when interfacing with Sentry or is this a current limitation of the deobfuscation feature?

============== RAW Unsymbolicated Exception ===============
java.lang.RuntimeException: Lance Sentry Test Exception 5. Ignore me
    at co.betterup.betterup.activities.a.b$b.a(SourceFile:2007)
    at co.betterup.betterup.views.adapters.recyclerview.e$1.a(SourceFile:24)
    at android.support.v7.widget.au.a(SourceFile:250)
    at android.support.v7.view.menu.f.a(SourceFile:811)
    at android.support.v7.view.menu.h.b(SourceFile:152)
    at android.support.v7.view.menu.f.a(SourceFile:958)
    at android.support.v7.view.menu.k.onItemClick(SourceFile:4948)
    at android.widget.AdapterView.performItemClick(AdapterView.java:318)
    at android.widget.AbsListView.performItemClick(AbsListView.java:1165)
    at android.widget.AbsListView$PerformClick.run(AbsListView.java:3134)
    at android.widget.AbsListView$3.run(AbsListView.java:4049)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6541)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

============== Symbolicated through Sentry.io web view of crash ==============
java.lang.RuntimeException: Lance Sentry Test Exception 5. Ignore me
    at co.betterup.betterup.activities.completed.CompletedActivitiesFragment$MyResourceOverflowMenuListener.a(SourceFile:2007)
    at co.betterup.betterup.views.adapters.recyclerview.ResourceOverflowClickHandler$1.onMenuItemClick(SourceFile:24)
    at android.support.v7.widget.PopupMenu.onMenuItemSelected(SourceFile:250)
    at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(SourceFile:811)
    at android.support.v7.view.menu.MenuItemImpl.invoke(SourceFile:152)
    at android.support.v7.view.menu.MenuBuilder.performItemAction(SourceFile:958)
    at android.support.v7.view.menu.MenuPopupHelper.onItemClick(SourceFile:4948)
    at android.widget.AdapterView.performItemClick(AdapterView.java:318)
    at android.widget.AbsListView.performItemClick(AbsListView.java:1165)
    at android.widget.AbsListView$PerformClick.run(AbsListView.java:3134)
    at android.widget.AbsListView$3.run(AbsListView.java:4049)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6541)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

============== Symbolicated through retrace.sh in Android SDK ===============
/Users/lance/Library/Android/sdk/tools/proguard/bin/retrace.sh -verbose app/build/outputs/mapping/release/mapping.txt exception.txt
java.lang.RuntimeException: Lance Sentry Test Exception 5. Ignore me
    at co.betterup.betterup.activities.completed.CompletedActivitiesFragment$MyResourceOverflowMenuListener.void co.betterup.betterup.activities.completed.BoomStick.makeItGoBoom()(SourceFile:2007)
                                                                                                            void co.betterup.betterup.activities.completed.CompletedActivitiesPresenter.favoriteClicked(co.betterup.betterup.models.Resource)
                                                                                                            void onFavoriteClicked(co.betterup.betterup.models.Resource)
    at co.betterup.betterup.views.adapters.recyclerview.ResourceOverflowClickHandler$1.boolean onMenuItemClick(android.view.MenuItem)(SourceFile:24)
    at android.support.v7.widget.PopupMenu.boolean onMenuItemSelected(android.support.v7.view.menu.MenuBuilder,android.view.MenuItem)(SourceFile:250)
    at android.support.v7.view.menu.MenuBuilder.boolean dispatchMenuItemSelected(android.support.v7.view.menu.MenuBuilder,android.view.MenuItem)(SourceFile:811)
    at android.support.v7.view.menu.MenuItemImpl.boolean invoke()(SourceFile:152)
    at android.support.v7.view.menu.MenuBuilder.boolean performItemAction(android.view.MenuItem,android.support.v7.view.menu.MenuPresenter,int)(SourceFile:958)
    at android.support.v7.view.menu.MenuPopupHelper.boolean android.support.v7.view.menu.MenuBuilder.performItemAction(android.view.MenuItem,int)(SourceFile:4948)
                                                    void onItemClick(android.widget.AdapterView,android.view.View,int,long)
    at android.widget.AdapterView.performItemClick(AdapterView.java:318)
    at android.widget.AbsListView.performItemClick(AbsListView.java:1165)
    at android.widget.AbsListView$PerformClick.run(AbsListView.java:3134)
    at android.widget.AbsListView$3.run(AbsListView.java:4049)
    at android.os.Handler.handleCallback(Handler.java:789)
    at android.os.Handler.dispatchMessage(Handler.java:98)
    at android.os.Looper.loop(Looper.java:164)
    at android.app.ActivityThread.main(ActivityThread.java:6541)
    at java.lang.reflect.Method.invoke(Method.java)
    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)

Note in example here that the retrace version calls out the actual class (BoomStick.makeItGoBoom()) the crash happened and the Sentry version does not.

Thanks

1 Like