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

Support `split-debug-info` for Flutter Desktop (Linux and Windows)

Open ueman opened this issue 4 years ago • 18 comments

We need to test

  • [x] split-debug-info and obfuscate on macOS
  • [ ] split-debug-info and obfuscate on Linux
  • [ ] #2286 split-debug-info and obfuscate on Windows

Those options have not been tested. They might require changes in the SDK and/or on the server. It could be that they already work, and in this case we don't need to do anything.

We need to update the docs after this has been tested.

ueman avatar Apr 26 '21 09:04 ueman

let's add the windows/macos/linux support to this script

https://github.com/getsentry/sentry-dart/blob/main/flutter/example/run.sh

the way of uploading debug files is the same as iOS/Android -> https://github.com/getsentry/sentry-dart/blob/main/flutter/example/run.sh#L58-L60

we need to see if frames are symbolicated, file/function names are available and line number is also correct.

I believe macOS won't work if Flutter has the same format as iOS debug files, but let's try.

@bruno-garcia you may need to help us on Windows, would you be willing to do so? :)

marandaneto avatar Apr 27 '21 08:04 marandaneto

Didn't seem to work: https://sentry.io/organizations/sentry-sdks/issues/2367778946/?project=5428562&query=is%3Aunresolved

We would need to add the debug_meta with the DLL's build_id of sorts. @jan-auer might have pointers.

image

bruno-garcia avatar Apr 28 '21 01:04 bruno-garcia

image

.so on Windows? They really went all in with ELF it seems

bruno-garcia avatar Apr 28 '21 01:04 bruno-garcia

indeed, we'd need to install the LoadAndroidImageListIntegration integration for Flutter Desktop, but not only, on Android, sentry-native is also responsible for loading that. That means, either we ship sentry-native for Linux/Windows or we find a way to do it via Native code or ffi

macOS requires that too, so Sentry Cocoa needs to expose a way of getting the debug image list. https://github.com/getsentry/sentry-cocoa/issues/1089

marandaneto avatar Apr 28 '21 07:04 marandaneto

The Flutter docs state that obfuscate is not supported on Windows and Linux.

ueman avatar May 13 '21 08:05 ueman

Makes it easier. On Windows and Linux we only need to bundle sentry-native to capture native crashes.

bruno-garcia avatar May 16 '21 17:05 bruno-garcia

Removed obfuscate from the title since it's not supported by the tooling anyway.

marandaneto avatar Apr 29 '22 06:04 marandaneto

@ueman I believe this is now possible? https://docs.flutter.dev/deployment/obfuscate#supported-targets macOS should work already, I believe, since we already use the Sentry Cocoa SDK as well, after uploading debug symbols of course.

marandaneto avatar Jun 14 '23 10:06 marandaneto

Yes, it seems like it's now possible 🥳

ueman avatar Jun 14 '23 10:06 ueman

Ok removed the limitation https://github.com/getsentry/sentry-docs/pull/7156/files This has been tested already https://github.com/getsentry/sentry-dart/blob/8ccf7824c7322eebfda677dcce9d0ee25614b31a/flutter/example/run.sh#L33

marandaneto avatar Jun 14 '23 11:06 marandaneto

Is there any update on this now that obfuscate is supported on windows? https://docs.flutter.dev/deployment/obfuscate#supported-targets

Ghelwig avatar Nov 20 '23 21:11 Ghelwig

I imagine we'd need to add sentry-native to the SDK and capture loaded image info. That with PDB uploading etc. @vaind might know how much work this would entails

bruno-garcia avatar Nov 20 '23 23:11 bruno-garcia

interested

alexvoina avatar Dec 06 '23 13:12 alexvoina

@bruno-garcia thanks for looking into this, any updates greatly appreciated :)

Ghelwig avatar Jan 02 '24 17:01 Ghelwig

I'm not involved directly so I don't think this is planned to be honest, but I'm sure we're happy to get contributions if folks want to get support. @kahest will know what's going on

bruno-garcia avatar Jan 02 '24 18:01 bruno-garcia

Just to confirm @kahest is this something that will only be supported with outside contributions or is this something that the Sentry team plans on supporting?

Ghelwig avatar Feb 09 '24 21:02 Ghelwig

Hey @Ghelwig - we're interested in supporting this, but currently don't have the bandwidth internally. We're happy to work with folks interested in contributing!

kahest avatar Feb 12 '24 09:02 kahest

We would really love to see support for flutter build bundle as well. The only way currently is to build a debug build, which is a heavy penalty on an embedded target.

JesseRiemens avatar Apr 02 '24 09:04 JesseRiemens