sentry-dart icon indicating copy to clipboard operation
sentry-dart copied to clipboard

Symbolicate Flutter issue's title

Open marandaneto opened this issue 2 years ago • 23 comments

Problem Statement

https://docs.sentry.io/platforms/flutter/troubleshooting/#known-limitations

Issue titles might be obfuscated as we rely on the runtimeType, but they may not be human-readable. See the Obfuscate Caveat.

The issue's title is still obfuscated even if uploading debug symbols and symbolicating the error.

Solution Brainstorm

We can infer the title from the exception list, similarly to how Java does. https://github.com/getsentry/sentry/blob/master/src/sentry/lang/java/processing.py#L6

Product Area

Issues


Update

Native platforms such as iOS, Android:

  • Can be implemented, sentry-cli can associate the generated file (--extra-gen-snapshot-options=--save-obfuscation-map=mapping.json) with the Code ID from the debug symbols

Web:

  • ~Still blocked by https://github.com/dart-lang/sdk/issues/53027~ needs investigation whether this is really blocked

marandaneto avatar May 02 '23 13:05 marandaneto

Likely small effort

kahest avatar May 11 '23 13:05 kahest

is it doable in the nearest future ?

aprzedecki avatar May 11 '23 13:05 aprzedecki

This issue has gone three weeks without activity. In another week, I will close it.

But! If you comment or otherwise update it, I will reset the clock, and if you label it Status: Backlog or Status: In Progress, I will leave it alone ... forever!


"A weed is but an unloved flower." ― Ella Wheeler Wilcox 🥀

github-actions[bot] avatar Jun 02 '23 00:06 github-actions[bot]

Any updates on this? It will save us some time if we have this feature and might also help with the issues grouping.

ioanniskouts avatar Jun 02 '23 08:06 ioanniskouts

@ioanniskouts is in the plan but I don't have a timeline, this won't affect grouping though, it's only about the issue's title. The stack trace frames are already symbolicated.

marandaneto avatar Jun 02 '23 08:06 marandaneto

There seem to be a bigger issue with that - each release is a new build, which regenerated all symbols that have different obfuscation values. This causes that existing issues are duplicated and maintaining the project becomes very time consuming to merge again and again the same issues. Is there any solution for that ?

aprzedecki avatar Jun 28 '23 07:06 aprzedecki

@aprzedecki issues are grouped per stack trace by default, and grouping happens after symbolication, this isn't related to this issue (this is just about the title). In case you are facing grouping problems, please raise a new issue with more context (eg links of 2 different issues that should be grouped together but are not).

marandaneto avatar Jun 28 '23 08:06 marandaneto

Ok, thanks for clearing up.

aprzedecki avatar Jun 28 '23 08:06 aprzedecki

This is not possible on Flutter web, See https://github.com/dart-lang/sdk/blob/master/pkg/compiler/doc/sourcemap_extensions.md#global-minified-names The source maps contain only the minified types but not the damangled ones. The frames also don't contain the type, but rather the filename and function only. In this case, showing the function and filename/module would be already better but it's not possible to map the right frame from the minified type.

We'll need to address https://github.com/dart-lang/sdk/issues/51941 first which is being able to upload the generated file from (--extra-gen-snapshot-options=--save-obfuscation-map=mapping.json) and then demangle the type based on the mappings.json.

I'll check AOT compiled apps now.

marandaneto avatar Jul 17 '23 14:07 marandaneto

Found an alternative for AOT apps, See https://github.com/dart-lang/sdk/issues/51941#issuecomment-1639907165 This has to be implemented on the Sentry SDK first, sentry-cli, Sentry Dart plugin, and Sentry itself first, which is a way bigger scope than actually planned, I will talk internally about this investment.

marandaneto avatar Jul 18 '23 10:07 marandaneto

@marandaneto any news on this one ?

aprzedecki avatar Jan 04 '24 13:01 aprzedecki

Hey @aprzedecki, thanks for your interest - we don't have definite plans or a timeline at the moment. cc @buenaflor

kahest avatar Jan 04 '24 13:01 kahest

@kahest do you guys have any update on this? Thanks

ioanniskouts avatar Mar 19 '24 09:03 ioanniskouts

Hey @ioanniskouts nothing definite at the moment, we'll keep you posted!

kahest avatar Mar 19 '24 10:03 kahest

Any update on this?

metafounder avatar Apr 10 '24 20:04 metafounder

Any update on this please?

EmmanuelAdeiza avatar Apr 17 '24 08:04 EmmanuelAdeiza

Please see above - we plan to tackle this but don't have a concrete ETA yet. We're keeping this issue up to date as things develop.

kahest avatar Apr 17 '24 09:04 kahest

While this issue is resolved, what is the current workaround to troubleshoot issue like this ?

type 'minified:a6o' is not a subtype of type 'minified:dH'

The deobfuscated stack trace might not be enough without knowing which types are causing trouble

Masadow avatar Jun 12 '24 07:06 Masadow

Routing to @getsentry/product-owners-issues-source-maps for triage ⏲️

getsantry[bot] avatar Jun 14 '24 05:06 getsantry[bot]

@Masadow could you share a link to the event to [email protected] please

buenaflor avatar Jun 17 '24 09:06 buenaflor

Update: we merged an improvement to mitigate this issue for well-known exception types, will be available with the next release. cc @buenaflor

Edit: Read our changelog entry for more info

kahest avatar Jul 29 '24 13:07 kahest

In our case, the title of issues are still obfuscated, even for throwing a simple exception. I see in the update that we could upload the obfuscation map, but I don't see any option for that in the latest version. Any update on getting this to work on native platforms?

Tested with

sentry_flutter: ^8.14.0
sentry_dart_plugin: ^2.4.1

bawahakim avatar Mar 19 '25 05:03 bawahakim

I see in the update that we could upload the obfuscation map, but I don't see any option for that in the latest version

Right now we cant upload, the update was meant to say that we can implement this and don't have any blockers, it's not supported yet, sry for misleading here.

If you want to mitigate this issue for now you can use our ExceptionIdentifier (as described here) to add exceptions to the list you want to have not obfuscated. It's a temporary workaround for now until we can properly fix this with the obfuscation map

buenaflor avatar Mar 19 '25 12:03 buenaflor

Support for Android and iOS landed in Sentry Dart Plugin 3.2.0-beta.1

Compile your app with the extra obfuscation map flag:

e.g flutter build apk --obfuscate --split-debug-info=build/symbols --extra-gen-snapshot-options=--save-obfuscation-map=build/mapping.json

use the new config field dart_symbol_map_path to point directly to the generated mapping file:

# in pubspec.yaml config
sentry
  # ... other sentry plugin config
  dart_symbol_map_path: /my/path/to/build/mapping.json

Now the mapping file will be used to symbolicate the issue title.

If any issues come up please open an issue

I will now close this issue and create new issues for the feature request for Web and Desktop (macOS, Windows, Linux) support

buenaflor avatar Aug 14 '25 18:08 buenaflor

thats pretty cool :)

marandaneto avatar Aug 18 '25 09:08 marandaneto