Skip to content

Deobfuscate class/field names in exception messages #942

Closed

Description

@OlivierFreyssinet-old

I'm getting a lot of exceptions of this kind:

NullPointerException
Attempt to read from field 'java.util.List f.f.c.j.b.a.t.a.b' on a null object reference

The stacktrace is perfectly deobfuscated and thanks Sentry for that, it's really great! However I was wondering if it's possible to detect obfuscated class names inside error messages.

Right now in order to understand what this error is I have to open the mapping.txt file and manually search for what the f.f.c.j.b.a.t.a.b field is, which I have to do every time I open such an issue on Sentry.

I guess automatically detecting and deobfuscating obfuscated class/field names in such error messages is not as straightforward as deobfuscating the strack trace but maybe when a mapping file is detected, there could be a button like "Deobfuscate message based on mapping file" next to the error message, and it would look for matches between the message string and the mapping file ?

That would be a killer feature!

Activity

  1. bruno-garcia commented on Sep 22, 2020

    @bruno-garcia
    Member

    Thanks for raising. This came up a few times. We should be prioritizing this eventually.

  2. marandaneto commented on Sep 25, 2020

    @marandaneto
    Contributor

    @OlivierFreyssinet just a quick question, could you exemplify how you are capturing those messages?

    Are you doing something like Sentry.captureMessage(exeption.getMessage())? just to understand what you'd be expecting to be deobfuscated.

    Thanks.

  3. OlivierFreyssinet-old commented on Sep 25, 2020

    @OlivierFreyssinet-old
    Author

    Sure, I'm just doing Sentry.captureException(exception)

  4. marandaneto commented on Sep 25, 2020

    @marandaneto
    Contributor

    @OlivierFreyssinet could you link us to a Sentry issue like this so we could have a look at the event? thanks
    Breadcrumbs and messages are not deobfuscated, but when you do Sentry.captureException(exception), the event's title should be inferred from the already deobfuscated classes, if not, it's a bug.

  5. OlivierFreyssinet-old commented on Sep 25, 2020

    @OlivierFreyssinet-old
    Author

    Here's one:
    https://sentry.io/organizations/blloc/issues/1630576419/?project=1284943&query=is%3Aunresolved

    Edit: Actually it seems like this exception is handled by the UncaughtExceptionHandler, not manually with a Sentry.captureException

  6. romtsn commented on Mar 16, 2023

    @romtsn
    Contributor

    This has been tackled on the product, see this comment #2406 (comment). Closing this for now, feel free to reopen/comment if it's still not working for some cases and we'll look into it!

  7. OlivierFreyssinet commented on Mar 16, 2023

    @OlivierFreyssinet

    Nice! Thanks for the follow up

  8. romtsn commented on Jul 23, 2024

    @romtsn
    Contributor

    Reopening, since this doesn't work anymore after moving deobfuscation to symbolicator

  9. reopened this on Jul 23, 2024
  10. 8 remaining items

  11. moved this from Waiting for: Product Owner to No status in GitHub Issues with 👀 3on Sep 17, 2024
  12. changed the issue type fromtoon Mar 20, 2025
  13. romtsn commented on Sep 25, 2025

    @romtsn
    Contributor

    Update: I've merged a PR to sentry to address this, so most of the new incoming events' exception values should get deobfuscated from now on. It still does not cover 100% of the cases since it's based on regexps and it does not deobfuscate method/field names yet, but it should be improve the situation already.

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

Metadata

Metadata

Assignees

Labels

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions