Skip to content

Streamline process to get Proguard mapping file for a developer role #2406

Closed as not planned

Description

@Angelodaniel

Problem Statement

In Android sometimes there are exceptions with obfuscated class names in exception messages (e.g. something like Attempt to invoke virtual method 'java.lang.String x3g.a()' on a null object reference), and that’s completely fine that they are not deobfuscated automatically, because it’s not the stacktrace.

But it’s still possible to deobfuscate it manually, but in order to do that it is needed to have access to the Proguard mapping file.
In order to get the mapping file we need to do:

  • go to the raw JSON payload of the issue
  • find the debug_meta key (something like "debug_meta":{"images":[{"uuid":"","type":"proguard"}]})
  • get the UUID from this value
  • go to the Settings -> Projects -> pd-android-main -> ProGuard Mappings
  • get this specific mapping for the UUID

Solution Brainstorm

No response

Activity

  1. edwardgou-sentry commented on Dec 9, 2022

    @edwardgou-sentry

    Hey @Angelodaniel , just to confirm, are you referring to this particular attribute for issues?
    image

    If so, if we could deobfuscate this attribute (when mapping is available) would that resolve this problem for you? I'm still looking into the specifics on how we may do this, but I think this might be a simpler solution than exposing easier access to the proguard files.

  2. viakunin commented on Dec 12, 2022

    @viakunin

    Hi @edwardgou-sentry , yes, that's correct, e.g.
    Screenshot 2022-12-12 at 15 56 12
    or
    Screenshot 2022-12-12 at 15 56 27
    I'm not so sure this is a simpler solution, but yes, automatic deobfuscation of those messages will solve the issue for us.

  3. edwardgou-sentry commented on Dec 12, 2022

    @edwardgou-sentry

    Thanks @viakunin ! I will try to explore how viable it is to automatically deobfuscate those messages. We can fall back to exposing the proguard file if the former is not feasible. Will let you know if we have updates!

  4. romtsn commented on Dec 12, 2022

    @romtsn
    Contributor

    @edwardgou-sentry I have explored this a bit in the past, and we might want to hook into event processing through event_enhancers. Ideally we'd want to have it centralized, because we also want to deobfuscate breadcrumbs, span descriptions, transaction names, etc. in the future

  5. edwardgou-sentry commented on Dec 22, 2022

    @edwardgou-sentry

    Hey @viakunin , just wanted to give you a heads up that we've made some improvements to this. If you have new issues being created, you should start seeing some of them being deobfuscated now. This only really applies to new issues for now, so If you have an existing issue, it may not be deobfuscated yet. We're still looking at ways to better this so we'll keep you updated if we have any further improvements!

  6. viakunin commented on Dec 23, 2022

    @viakunin

    Thank you, @edwardgou-sentry!
    How can we check it? I suppose the exception message should still be obfuscated in the JSON raw payload, but deobfuscated when checking on the issue page in Sentry? Are there any flags in the interface or messages on the issue activity page that it was deobfuscated?

  7. edwardgou-sentry commented on Jan 13, 2023

    @edwardgou-sentry

    Hey @viakunin , sorry for the late reply! You can try to verify this by searching some of your issues that might have previously contained obfuscated messages in the issues page.

    For example from your screenshot above, try searching Parameter specified as non-null is null in the issue search bar. Select one of the issues from the results and view the All Events tab. In the All Events tab, you can sort the table by timestamp ascending and descending and look at the title column to see if newer events are being deobfuscated compared to older events. You should be able to see a difference here.

    The deobfuscation happens on event processing so the JSON response will contain the deobfuscated message. We don't have any flags in the ui at this moment to indicate if the message was deobfuscated at this moment (good feedback though, we can take this into consideration).

    Let me know if you have any other questions, thanks!

  8. viakunin commented on Jan 13, 2023

    @viakunin

    @edwardgou-sentry thanks for the clarification! yes, it looks like it works, all recents events in those issues have deobfuscated messages, and also event messages were updated as well.
    great job, thank you!

  9. markushi commented on Dec 4, 2024

    @markushi
    Member

    Closing as a dup of #942

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions