You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ProGuard deobfuscation can replace unrelated substrings in exception messages #123739
Issue originally reported against sentry-java at getsentry/sentry-java#6056 (tracked as JAVA-723), but the actual code path lives in this repo's Java event-processing pipeline, not the SDK. See the discussion there for more details.
What's happening?
deobfuscate_exception_value() in src/sentry/lang/java/processing.py builds raw_method_name from the last raw stacktrace frame's module.function and replaces it in the exception message via re.sub(re.escape(raw_method_name), deobfuscated_method_name, exception["value"]). This is a plain substring replace with no word-boundary or context check confirming the match is actually a reference to that frame.
When a ProGuard mapping obfuscates some unrelated class down to a short, ordinary-looking name (e.g. ...AccountsListFragmentKt$$ExternalSyntheticLambda19 -> en:), and the exception message happens to contain that same string for an unrelated reason (e.g. a locale code like 'en'), the substring gets swapped for the fully-qualified class name even though it has nothing to do with the frame.
How to reproduce
An exception with message string/pay_anyone_cancel_dialog_positive: requested 'en-IE', got 'en', combined with a ProGuard mapping containing com.monzo.standin.screens.accountslist.AccountsListFragmentKt$$ExternalSyntheticLambda19 -> en:.
Actual: en in the message is deobfuscated to com.monzo.standin.screens.accountslist.AccountsListFragmentKt$$ExternalSyntheticLambda19.
Confidence
Root cause confidence: high — traced directly to the literal substring re.sub in deobfuscate_exception_value (src/sentry/lang/java/processing.py, lines ~20-41).
I'd like to take this. The fix looks like tightening the re.sub in deobfuscate_exception_value (src/sentry/lang/java/processing.py) so the raw method name only gets replaced when it actually reads as a frame reference (word-boundary/context check around the match), plus a regression test using the en locale-code repro from the report. Will open a PR shortly.
Activity
linear-code commentedon Sep 7, 2026
ENG-8559
bunnysayzz commentedon Sep 7, 2026
I'd like to take this. The fix looks like tightening the
re.subindeobfuscate_exception_value(src/sentry/lang/java/processing.py) so the raw method name only gets replaced when it actually reads as a frame reference (word-boundary/context check around the match), plus a regression test using theenlocale-code repro from the report. Will open a PR shortly.fix(java): Stop deobfuscating quoted values that are not classes. (#1…
fix(java): Stop deobfuscating quoted values that are not classes. (#1…