Skip to content

Android debug symbols not symbolicated when using Flutter flavors with --split-debug-info #379

@Kobby-Bawuah

Description

@Kobby-Bawuah

Environment

sentry_dart_plugin: 3.2.1 (latest)
sentry_flutter: 9.10.0 / 9.11.0
Flutter: 3.38.9 (stable)
Platform: Android (arm64)
Build type: appbundle with flavors

Steps to Reproduce

  • Have a Flutter project with multiple Android flavors (e.g. googlePlay, appGallery)

  • Build with flavors and --split-debug-info:
    flutter build appbundle --flavor=googlePlay --obfuscate --split-debug-info=debug_info/googlePlay --extra-gen-snapshot-options=--save-obfuscation-map=build/obfuscation.map.json

  • Configure pubspec.yaml:
    sentry: symbols_path: debug_info upload_source_maps: true upload_sources: true dart_symbol_map_path: build/obfuscation.map.json

  • Run dart run sentry_dart_plugin

  • Trigger an error on Android and view the issue in Sentry

Expected Result

Android stack traces are symbolicated, with function names, file names, and line numbers visible — the same as iOS.

Actual Result

All Android stack frames show symbolicator_status: "missing_symbol". iOS events from the same project are symbolicated correctly.

Root cause: Debug ID mismatch between uploaded .symbols file and the libapp.so in the final APK.

The upload logs show the plugin uploads symbols from the wrong flavor:
UPLOADED edda1b4f-6d6f-b66d-128a-5ff367eac22c (merged_native_libs/googlePlayRelease/.../libapp.so; arm64 library)UPLOADED edda1b4f-6d6f-b66d-128a-5ff3d45a56ef (flutter/appGalleryRelease/arm64-v8a/app.so; arm64 library)

The debug companion (with DWARF info) is uploaded with the appGallery debug ID:
UPLOADED edda1b4f-6d6f-b66d-128a-5ff3d45a56ef (app.android-arm64.symbols; arm64 debug companion)

But the running app reports the googlePlay debug ID:
debug_id: "edda1b4f-6d6f-b66d-128a-5ff367eac22c"

In Sentry's Debug Files, searching for the event's debug ID shows only the stripped libapp.so (symtab + unwind, no debug). The debug companion with full DWARF info is associated with a different debug ID.

Key observations:

  • Removing --flavor from the build command results in correct symbolication
  • Cleaning the build environment (including debug_info/ and .dart_tool/) before building does not fix the issue
  • The .dart_tool/flutter_build/ directory generates separate subdirectories for each flavor, and the plugin/CLI picks up artifacts from the wrong one
  • iOS is unaffected because dSYM generation doesn't have this flavor interaction

#352 — "Missing debug symbols since updating to Flutter 3.32.8" (closed as not planned, same root cause)

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions