getsentry / sentry-dart-plugin

A Dart Build Plugin that uploads debug symbols for Android, iOS/macOS and source maps for Web to Sentry via sentry-cli
MIT License
66 stars 29 forks source link

Sentry-dart support (not sentry-flutter) #256

Closed alanalanlu closed 3 days ago

alanalanlu commented 3 weeks ago

Im having nearly the exact same issue as this post https://github.com/getsentry/sentry-dart-plugin/issues/237

To summarize: I have --obfuscate and --split-debug-info while building my Flutter app for iOS. I'm using sentry-dart-plugin to upload the debug symbols, but the stack traces are not being deobfuscated. (Note: I am using sentry-dart and not sentry-flutter)

flutter build ipa --release --dart-define "SENTRY_DSN=****" --dart-define "SENTRY_RELEASE=***@1.0.0+30" --dart-define "SENTRY_ENVIRONMENT=****" --obfuscate --split-debug-info=./debug-info

dart run sentry_dart_plugin

I changed everything sentry to sentry-flutter and the stack trace finally was deobfuscated. The problem is we absolutely cannot use sentry-flutter due to extremely strict app size limitations. Is there a way to get the debug symbols to work with sentry-dart?

buenaflor commented 2 weeks ago

symbolicating dart only on flutter doesn't work currently unfortunately: https://github.com/getsentry/sentry-dart/issues/1508

I don't have an ETA for this.

The problem is we absolutely cannot use sentry-flutter due to extremely strict app size limitations

What is your calculated app size using sentry-flutter and what is your limit?

alanalanlu commented 2 weeks ago

I have a hard cap of 15mb (app clips) and flutter takes about ~12MB so if I use sentry-flutter (2-3mb), I will have no space for my actual app. My app is currently 14.9mb with sentry-dart so I am nearly completely out of space.

Side question: Any thoughts on how to handle stack traces deobfuscation with a hard app size limit?

buenaflor commented 2 weeks ago

Side question: Any thoughts on how to handle stack traces deobfuscation with a hard app size limit?

Unfortunately there is no way currently unless you somehow write the symbolication yourself and send the deobfuscated stacktrace to sentry which is not easy.

So it's currently not possible in our SDK, but I'm working on it and might have found something that works, I'll keep you posted.

buenaflor commented 2 weeks ago

https://github.com/getsentry/sentry-dart/pull/2256 I've prepared a draft PR which will fix this issue.

buenaflor commented 3 days ago

This issue should be fixed in 8.9.0 which is already released.