New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[sentry] Missing guide on configuration/use for production builds (--obfuscate --split-debug-info) #59321
Comments
Does this have to do with obfuscation maybe? I couldn't find any specific info on using Sentry and Flutter re. obfuscation, also nothing about uploading the .symbols files (app.android-arm64.symbols, app.ios-arm64.symbols, app.ios-armv7.symbols). |
I am having this problem as well on iOS with enabling DART_OBFUSCATION. I am not using Sentry though. This VM has been configured to produce stack traces that violate the Dart standard is printed out. |
Same for me, when building iOS and Android release apps with
I'm not using Sentry, I'm just building and running the app on a physical device |
I have the same issue here when building a release with the |
The Sentry dart/flutter SDK uses the stacktrace provided by the app, at runtime. It looks like we'll need to add support for this. To allow uploading the generated symbols and once a crash comes in, symbolicate it to show you the original source code. Sentry already does similar for for JS/Dart sourcemaps, proguard, PDBs, etc. Quick looked up and it seems it uses DWARF symbols which Sentry already has support. So that's good news. |
any updates on this? |
Any update on this? Possible to upload symbols files? |
@bruno-garcia uploading the symbols does not seem to do anything yet
The Sentry event shows
When I copy that into a local file
results in
What do you think is missing that Sentry uses the uploaded symbols to deobfuscate the stack trace? |
@zoechi Can you confirm it's there? To get it to work we will also need to set the Also add the The docs for it are here: https://develop.sentry.dev/sdk/event-payloads/debugmeta It's similar to what a iOS crash works. It will show up like this in the event's view: |
Yup, they are there |
@jonahwilliams I have seen creating a few PRs related to build-id (NT_GNU_BUILD_ID, .note.gnu.build-id, LC_UUID). What I think is missing is a way to get the build-id at runtime to send it with an Sentry event to the Sentry service, so that debug symbols and stack traces can be associated. Do you know if there is a way to get this build-id at runtime in Flutter? If not, I guess this would need to be a build step to add an asset file containing the info See also |
I would be surprised if that info was available at runtime, but if there is something the tool could do to make it available during the build perhaps that is a better route? Also FYI @sstrickl |
Unfortunately it's not currently available at runtime, though I actually would like it to be! (Right now, we'd either have to extend the embedder interface or figure out a similar workaround as we did for BSS sections, but we can't take the same approach as we've already used up all the space in the There's a known symbol for the build ID in the dynamic symbol table of ELF snapshots ( |
@sstrickl are there bugs on the dart-sdk that could be followed for these features? |
Hi how is everything going? Will we have the feature in the near future? |
Currently we're blocked on being able to get the |
@bruno-garcia Ah... So do I understand correctly: We should not use obfuscate currently, otherwise we will not get stacktraces and not work with Sentry. Thanks very much! |
|
Where? Upload where? Googling android upload debug symbols sentry returns nothing relevant. There's a document for iOS though. Umm, on further digging, it seems I have to use sentry-cli. docs >> https://docs.sentry.io/product/cli/ it would help to have a link somewhere or even a document google can find |
that's our official docs https://docs.sentry.io/platforms/flutter/ and here is the section for uploading debug symbols https://docs.sentry.io/platforms/flutter/usage/advanced-usage/#uploading-debug-symbols-android-and-ios |
Hi, from dart-lang/sdk#43612, it is said that
Therefore, maybe this is possible on iOS? (For example, after we upload "enough information" to Sentry and sentry should be able to do it?) I am not very familiar with iOS... |
@fzyzcjy afaik, Flutter generates a Linux executable (ELF file) when splitting debug info instead of an iOS one. It should create the right file. |
@marandaneto Hmm so you mean |
@fzyzcjy yes and no, we think that the right approach is Flutter emitting the right file as it does for Android for example. |
As part of triaging general Sentry issues in the Flutter issue tracker we decided to close this issue in favor of an issue tracking on Sentry's repo. Dependencies are linked in there. |
@marandaneto Hi, I have made an attempt on manually symbolize the stack, but it does not work :( I manually trigger an error, and see: https://user-images.githubusercontent.com/5236035/126902011-a7557f18-a0a8-48e7-93cc-206eff8c0632.png I try to manually cook up some pseudo-traces that is acceptable by
and even
unfortunately, they output something that is completely unrelated!
where the real thing lies in I use dwarfdump and see:
so the .symbols file should be correct - since the relative address does lie in debug_page.dart but p.s. that is android, but since ios does not have automatic symbolize in sentry, i am trying to solve it in the manual way as you suggest. |
For me, I ended up printing the stack trace, as given by Flutter to the breadcrumbs just before reporting the crash with sentry. For me the whole report like this:
does work with
You use the Log.e in the following way:
|
@t-kozak Thanks for the suggestion! However, I am curious: why my manually cooked up pseudo-stacktrace does not work, given that the address seems to be correct... |
oh i see... what sentry captures: raw stacktrace:
|
Seems that the real useful address is the @marandaneto Hi, is this a bug of Sentry? could this be fixed? Thanks! |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
The first time I set it up and sometime after it was reporting errors just fine. All I get now when errors get captured is:
NoSuchMethodError: The method '' was called on null.
Receiver: null
Tried calling: ()
...
unparsed in Warning: This VM has been configured to produce stack traces that violate the Dart standard.
...
This was a sort of a surprise since I haven't changed anything directly related to Sentry / its config within or outside of the app.Update (3 Jul 2020):
This seems to be the outcome of moving to builds produced with --obfuscate --split-debug-info=somefolder
So this issue is likely a question to which I haven't found a good and complete answer yet. How does one correctly configure/use Sentry for iOS and Android apps that use the flags above? Those are or should be used for production releases.
(At least a few of the events on top came from a Google Pixel device with Android 10 on it.)
Environment:
sentry 3.0.1
Flutter 1.19.0-4.1.pre • channel beta • https://github.com/flutter/flutter.git
Framework • revision f994b76 (3 days ago) • 2020-06-09 15:53:13 -0700
Engine • revision 9a28c3bcf4
Tools • Dart 2.9.0 (build 2.9.0-14.1.beta)
[✓] Flutter (Channel beta, 1.19.0-4.1.pre, on Mac OS X 10.15.5 19F101, locale en-NO)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 11.5)
[✓] Chrome - develop for the web
[!] Android Studio (version 4.0)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] VS Code (version 1.46.0)
[✓] Connected device (2 available)
The text was updated successfully, but these errors were encountered: