Skip to content
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

Issues from Android and iOS appear differently in the Sentry UI from a Flutter app #1983

Open
SoftMemes opened this issue Apr 10, 2024 · 5 comments
Assignees

Comments

@SoftMemes
Copy link

Platform

Flutter Mobile

Obfuscation

Enabled

Debug Info

Enabled

Doctor

[✓] Flutter (Channel stable, 3.16.9, on Ubuntu 23.10 6.5.0-27-generic, locale en_GB.UTF-8)
• Flutter version 3.16.9 on channel stable at /home/freed/opt/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 41456452f2 (3 months ago), 2024-01-25 10:06:23 -0800
• Engine revision f40e976bed
• Dart version 3.2.6
• DevTools version 2.28.5

Version

7.16.1

Steps to Reproduce

I have a Flutter project and build for Android and iOS. I am using the dart sentry plugin to upload debug symbols and sources, and use the Sentry CLI directly to create releases in Sentry. Further I'm using the Sentry CLI to upload pro-guard files for Android and explicity specify the UUID when initializing Sentry.

I've added my package name in inAppIncludes in the app.

I have also set up the Github integration and code mappings to point to the relevant directories.

The Android and iOS versions are built separately as part of CI. I use an automatically generated unique build number for each (time based) and infer the version from git tags, resulting in release identifiers liks myapp-android@1.2.3-something+40001 and myapp-ios@1.2.3-something+40041. These are distinct releases/packages in Sentry. This all works and they show up as expected.

Expected Result

  • Android and iOS issues are grouped together.
  • Source context is available for exceptions from my code
  • In-app frames are detected and flagged
  • Links to GitHub work on stack trace frames

Actual Result

  • Android and iOS issues show up separately, not grouped
  • Source context for stacktraces are showing up in Android issues
  • Android stack frames are not flagged as in-app
  • Android issues do not have a link to Github
  • Source context for stacktraces are not visible for iOS issues
  • iOS issues do have stack frames linked correctly to Github
  • iOS issues have the stack frames correctly detected as in-app

Further, the paths reported are different between the two cases (which may explain some of the other issues/differences)

  • For Android, the file path reported when hovering over the filename in the web UI is an absolute path to the file as it existed when the project was built (in this case a path starting with /home/circleci/project
  • For iOS, the file path is prefixed with my package name (package:mypackage/somedir/file.dart). This path does not include "lib".

Are you willing to submit a PR?

Yes

@buenaflor
Copy link
Contributor

Hey can you send the links to these events to me at giancarlo.buenaflor@sentry.io so we can take a closer look

@buenaflor
Copy link
Contributor

Could you also provide a reproducible sample app? It would greatly help in debuggin this

@denrase
Copy link
Collaborator

denrase commented May 14, 2024

So i tried to reproduce this using the TestFlight iOS example, and an Android release build. For the latter, the plugin was also executed so new debug symbols were uploaded. I also set the build number to match iOS. At first this did

List of Reported Issues/Problems

Android and iOS issues show up separately, not grouped

Yes. The issues were correctly grouped for iOS (release) and Android (release) build. This was only not working when one platform did not have --split-debug-info and '--obfuscate' enabled and the other did.

iOS (Release) Android (Release)
Bildschirmfoto 2024-05-14 um 17 59 57 Bildschirmfoto 2024-05-14 um 16 13 47

Source context for stacktraces are showing up in Android issues

Yes, as seen above.

Android stack frames are not flagged as in-app

Yes, only in iOS.

Not in-app
Bildschirmfoto 2024-05-14 um 17 54 44

Android issues do not have a link to Github

Yes, see above.

Source context for stacktraces are not visible for iOS issues

No, this works with --split-debug-info and '--obfuscate' flags. See screenshots above.

iOS issues do have stack frames linked correctly to Github

No, this works with --split-debug-info and '--obfuscate' flags. See screenshots above.

iOS issues have the stack frames correctly detected as in-app

Yes, see screenshots above.

sentry.io Issues

iOS (Release)
Android (Release)

@denrase
Copy link
Collaborator

denrase commented May 14, 2024

Still need to verify if we correctly setup the TestFlight release build.

@denrase
Copy link
Collaborator

denrase commented May 14, 2024

Updated the comments above. It looks like everything works, except detecting in-app frames on Android and linking to GH.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: No status
Status: Needs Investigation
Development

No branches or pull requests

3 participants