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

Dart symbol map uploaded successfully but stack traces remain obfuscated in Sentry

Open petodavid opened this issue 2 months ago • 8 comments

Environment

  • Self hosted Sentry (25.9.0)
  • Flutter: 3.38.2
  • sentry_dart_plugin: 3.2.0
  • Platforms: Android & iOS (issue happens on both)
  • Sentry CLI: 2.52.0 (downloaded automatically)

Build command:

flutter build apk \
  --flavor prod \
  --target lib/main_prod.dart \
  --dart-define-from-file=env.json \
  --build-number=1 \
  --obfuscate \
  --split-debug-info=build/symbols \
  --extra-gen-snapshot-options=--save-obfuscation-map=build/mapping.json

Dart Sentry plugin command:

dart run sentry_dart_plugin \
  --sentry-define=project=my-project-name \
  --sentry-define=org=my-org \
  --sentry-define=upload_sources=true \
  --sentry-define=auth_token=$SENTRY_AUTH_TOKEN \
  --sentry-define=dart_symbol_map_path=build/mapping.json

Dart Sentry plugin Logs:

Building package executable... 
Built sentry_dart_plugin:sentry_dart_plugin.
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 0% reading config values..        
Searching for pubspec.yaml or sentry.properties config...

No file config found. Reading values from arguments or environment.

Downloading Sentry CLI 2.52.0 from https://downloads.sentry-cdn.com/sentry-cli/2.52.0/sentry-cli-Darwin-universal to .dart_tool/pub/bin/sentry_dart_plugin/sentry-cli

Sentry CLI binary checksum verification passed successfully (hash: d2e49a13bc253044dd8bc4bc822ca255ad8b3353488378e6ded1d5483cfad835).

Sentry CLI downloaded successfully.
☑ reading config values                                                             
☑ validating config values                                                             
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 18% uploading debug symbols..                                
> Found 11 debug information files

> Resolved source code for 0 debug information files

> Prepared debug information files for upload

> Nothing to upload, all files are on the server

> Found 130 debug information files

> Resolved source code for 8 debug information files

> Prepared debug information files for upload

> Nothing to upload, all files are on the server

> Found 1 debug information file

> Resolved source code for 1 debug information file

> Prepared debug information files for upload

> Nothing to upload, all files are on the server

> Found 1 debug information file

> Resolved source code for 1 debug information file

> Prepared debug information files for upload

> Nothing to upload, all files are on the server

> Found 1 debug information file

> Resolved source code for 1 debug information file

> Prepared debug information files for upload

> Nothing to upload, all files are on the server

> Found 1 debug information file

> Resolved source code for 1 debug information file

> Prepared debug information files for upload

> Nothing to upload, all files are on the server

> Found 1 debug information file

> Resolved source code for 1 debug information file

> Prepared debug information files for upload

> Nothing to upload, all files are on the server

> Found 1 debug information file

> Resolved source code for 1 debug information file

> Prepared debug information files for upload

> Nothing to upload, all files are on the server
[❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚❚] 18% uploading Dart symbol map(s)..                               
No iOS symbols found in the configured build folder or project root.

Uploading Dart symbol map '/Users/david/Documents/Projects/wl-mobile-energy-and-loyalty-app/build/mapping.json' paired with '/Users/david/Documents/Projects/wl-mobile-energy-and-loyalty-app/./build/symbols/app.android-x64.symbols'

> Nothing to upload, all files are on the server

Uploading Dart symbol map '/Users/david/Documents/Projects/wl-mobile-energy-and-loyalty-app/build/mapping.json' paired with '/Users/david/Documents/Projects/wl-mobile-energy-and-loyalty-app/./build/symbols/app.android-arm64.symbols'

> Nothing to upload, all files are on the server

Uploading Dart symbol map '/Users/david/Documents/Projects/wl-mobile-energy-and-loyalty-app/build/mapping.json' paired with '/Users/david/Documents/Projects/wl-mobile-energy-and-loyalty-app/./build/symbols/app.android-arm.symbols'

> Nothing to upload, all files are on the server

Dart symbol map upload summary: attempted=3, succeeded=3, failed=0
☑ uploading Dart symbol map(s)                                                             
☑ uploading debug symbols                                                             

Created release [email protected]+1

uploadSourceMaps is disabled.

Could not determine any commits to be associated with a repo-based integration. Proceeding to find commits from local git tree.

No commits found. Leaving release alone. If you believe there should be some, change commits range or initial depth and try again.

Finalized release [email protected]+1

Expected Result:

  • Crash events should show de-obfuscated Dart stack traces for release [email protected]+1.
  • Dart symbol map and debug symbols should be correctly applied.
  • No “Unapplied debug info” issues.

Actual Result:

  • Plugin logs indicate success.
  • Despite all uploads reported as successful, Sentry still shows fully obfuscated Dart stack traces for this release.
  • Reprocessing events gives no improvement.
Image Image Image Image

petodavid avatar Nov 19 '25 08:11 petodavid

DARTPL-32

linear[bot] avatar Nov 19 '25 08:11 linear[bot]

Happens both cases when ran locally or CI (Codemagic)

petodavid avatar Nov 19 '25 11:11 petodavid

I believe the flavour may be one of the reasons, is there a way for you to try without specifying a flavour?

buenaflor avatar Nov 19 '25 13:11 buenaflor

@buenaflor Yes, I’ll test it soon like that. In the meantime, I also noticed that using the cloud-hosted Sentry works normally.

petodavid avatar Nov 19 '25 13:11 petodavid

Ah okay then it's not necessarily the flavour, hm, we've had some issues before with self-hosted not entirely working

buenaflor avatar Nov 19 '25 13:11 buenaflor

@buenaflor Can you confirm whether updating Sentry from v25.9.0 to the latest version would make any difference?

petodavid avatar Nov 19 '25 14:11 petodavid

@petodavid sorry I don't know much about self-hosted, I think it would be more helpful for you if you posted in Sentry discord under the #self-hosted channel. Maybe your symbolicator setup is not entirely correct.

buenaflor avatar Nov 19 '25 14:11 buenaflor

Stack trace symbolication don't work on self-hosted since Android has a private symbol server. See https://develop.sentry.dev/self-hosted/#differences-between-self-hosted-and-saas

aldy505 avatar Nov 20 '25 09:11 aldy505

didnt know this detail - makes sense, thanks

buenaflor avatar Nov 28 '25 17:11 buenaflor