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

UI events not detected on all widgets (like GestureDetector and Tab) #2012

Open
Jonny1987 opened this issue Apr 25, 2024 · 5 comments
Open
Assignees

Comments

@Jonny1987
Copy link

Jonny1987 commented Apr 25, 2024

Platform

Dart

Obfuscation

Disabled

Debug Info

Disabled

Doctor

[✓] Flutter (Channel stable, 3.19.6, on Ubuntu 22.04.4 LTS 6.5.0-26-generic, locale en_US.UTF-8)
• Flutter version 3.19.6 on channel stable at /home/john/dev/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 54e66469a9 (8 days ago), 2024-04-17 13:08:03 -0700
• Engine revision c4cd48e186
• Dart version 3.3.4
• DevTools version 2.31.1

[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
• Android SDK at /home/john/Android/Sdk
• Platform android-34, build-tools 34.0.0
• Java binary at: /opt/android-studio/jbr/bin/java
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)
• All Android licenses accepted.

[✓] Chrome - develop for the web
• Chrome at google-chrome

[✓] Linux toolchain - develop for Linux desktop
• Ubuntu clang version 14.0.0-1ubuntu1.1
• cmake version 3.22.1
• ninja version 1.10.1
• pkg-config version 0.29.2

[✓] Android Studio (version 2023.1)
• Android Studio at /opt/android-studio
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 17.0.7+0-17.0.7b1000.6-10550314)

[✓] VS Code (version 1.88.1)
• VS Code at /usr/share/code
• Flutter extension version 3.86.0

[✓] Connected device (3 available)
• sdk gphone x86 64 (mobile) • emulator-5554 • android-x64 • Android 13 (API 33) (emulator)
• Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.4 LTS 6.5.0-26-generic
• Chrome (web) • chrome • web-javascript • Google Chrome 123.0.6312.86

[✓] Network resources
• All expected network resources are available.

• No issues found!

Version

8.0.0

Steps to Reproduce

  1. Add a key to GestureDetector and Tab objects as needed for UI detection to work for other elements
  2. Cause an error in a child widget
  3. See that the issue result in sentry does not show the user clicking on the gesture detector or tab bar in the breadcrumbs

Expected Result

Clicks on the GestureDetector or Tab should show in the issue breadcrumbs

Actual Result

I don't think there is much point showing breadcrumbs with things missing since it's pretty easy to imagine

Are you willing to submit a PR?

None

@Jonny1987 Jonny1987 changed the title UI events not detected on all widgets (like GestureDetector and TabBar) UI events not detected on all widgets (like GestureDetector and Tab) Apr 25, 2024
@buenaflor
Copy link
Contributor

Thanks for reporting this! Has this been an issue in older versions as well?

@Jonny1987
Copy link
Author

I only have experience with the newest version. It's not actually urgent because I can trigger a breadcrumb manually in these elements but it would be nice if it was done automatically

@buenaflor
Copy link
Contributor

Got it, thanks for raising this, we'll have a look

@denrase
Copy link
Collaborator

denrase commented May 7, 2024

As far as I understand this after looking at the code and debugging, only certain widgets are supported:

/// It's supported by the most common [Widget], for example:

UserInteractionWidget? _getDescriptionFrom(Element element) {

@Jonny1987 So doing this manually in your case is, currently, the correct approach.

If supporting GestureDetector, Tab or other widget types is needed more broadly, we need to add them in code or discuss other approaches how to open up this API. @buenaflor

@buenaflor
Copy link
Contributor

Let's add it 👍

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

No branches or pull requests

3 participants