Skip to content

Error after enabling replay #2887

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

Closed
jplekkerkerker opened this issue Apr 24, 2025 · 6 comments · Fixed by #2946
Closed

Error after enabling replay #2887

jplekkerkerker opened this issue Apr 24, 2025 · 6 comments · Fixed by #2946
Labels
bug dart Pull requests that update Dart code Explore > Replays Replays

Comments

@jplekkerkerker
Copy link

jplekkerkerker commented Apr 24, 2025

Platform

Flutter Mobile iOS

Obfuscation

Not sure, but probably disabled

Debug Info

Not sure, but I think this is enabled

Doctor

[✓] Flutter (Channel stable, 3.29.3, on macOS 15.4.1 24E263 darwin-arm64, locale en-NL) [2.2s]
    • Flutter version 3.29.3 on channel stable at /Users/jplekkerkerker/fvm/versions/3.29.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision ea121f8859 (13 days ago), 2025-04-11 19:10:07 +0000
    • Engine revision cf56914b32
    • Dart version 3.7.2
    • DevTools version 2.42.3

[✓] Android toolchain - develop for Android devices (Android SDK version 35.0.0) [1,843ms]
    • Android SDK at /Users/jplekkerkerker/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/jplekkerkerker/Library/Android/sdk
    • ANDROID_SDK_ROOT = /Users/jplekkerkerker/Library/Android/sdk
    • Java binary at: /opt/homebrew/Cellar/openjdk@17/17.0.13/libexec/openjdk.jdk/Contents/Home/bin/java
      This JDK is specified in your Flutter configuration.
      To change the current JDK, run: `flutter config --jdk-dir="path/to/jdk"`.
    • Java version OpenJDK Runtime Environment Homebrew (build 17.0.13+0)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 16.3) [1,469ms]
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 16E140
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web [9ms]
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.3) [8ms]
    • Android Studio at /Applications/Android Studio.app/Contents
    • 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 21.0.5+-13047016-b750.29)

[✓] VS Code (version 1.98.0) [7ms]
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.106.0

[✓] Connected device (3 available) [6.1s]
    • sdk gphone64 arm64 (mobile)                           • emulator-5554             • android-arm64  • Android 14 (API 34) (emulator)
    • iPhone van Jean-Paul Lekkerkerker (wireless) (mobile) • [...]                     • ios            • iOS 18.4.1 22E252
    • macOS (desktop)                                       • macos                     • darwin-arm64   • macOS 15.4.1 24E263 darwin-arm64
    • Mac Designed for iPad (desktop)                       • mac-designed-for-ipad     • darwin         • macOS 15.4.1 24E263 darwin-arm64
    • Chrome (web)                                          • chrome                    • web-javascript • Google Chrome 135.0.7049.97

[✓] Network resources [1,571ms]
    • All expected network resources are available.

• No issues found!

Version

8.14.2

Steps to Reproduce

When I enable replays in my app, I get an error while I press any button in the app.

I enable the replays with the following options:

 options.experimental.replay.onErrorSampleRate = 1.0;
 options.experimental.privacy.maskAllText = false;
 options.experimental.privacy.maskAllImages = false;
 options.tracesSampleRate = 1.0;
 options.experimental.replay.sessionSampleRate = 1.0;

Expected Result

Not throw an error in the SentryUserInteractionWidgetState

Actual Result

[sentry] [error] Error while handling pointer-up event _TransformedPointerUpEvent#911cd(position: Offset(390.3, 91.3)) in SentryUserInteractionWidget
         'package:flutter/src/rendering/box.dart': Failed assertion: line 2251 pos 12: 'hasSize': RenderBox was not laid out: RenderSeman...
         #0      _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:63:4)
         #1      _AssertionError._throwNew (dart:core-patch/errors_patch.dart:45:5)
         #2      RenderBox.size (package:flutter/src/rendering/box.dart:2251:12)
         #3      RenderBox.paintBounds (package:flutter/src/rendering/box.dart:3099:41)
         #4      _SentryUserInteractionWidgetState._getElementAt.elementFinder (package:sentry_flutter/src/user_interaction/sentry_user_interaction_widget.dart:559:61)
         #5      MultiChildRenderObjectElement.visitChildren (package:flutter/src/widgets/framework.dart:7137:16)
         #6      Element.visitChildElements (package:flutter/src/widgets/framework.dart:3895:5)
[...]

Are you willing to submit a PR?

None

@buenaflor
Copy link
Contributor

Hi and this error does not pop up with replay disabled?

@jplekkerkerker
Copy link
Author

Correct, when I disable those settings the error doesn't occur.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Apr 24, 2025
@buenaflor
Copy link
Contributor

Is it possible for you to provide a minimal repro sample?

@jplekkerkerker
Copy link
Author

I tried to make a quick example, but I can't seem to reproduce it when I try to add this to the Flutter demo app. We have the issue in at least 2 apps we have replays enabled, so it might have to do with the combination of packages we include.

At the moment I don't have a lot of time to do that, but I hope to have some time this week to make an example.

@getsantry getsantry bot moved this to Waiting for: Product Owner in GitHub Issues with 👀 3 Apr 24, 2025
Copy link
Contributor

buenaflor commented Apr 24, 2025

I see, thanks that would be really helpful 🙏

cc @denrase the sentry user interaction widget error looks familiar to the one you fixed a while back ('hasSize': RenderBox was not laid out)

@denrase
Copy link
Collaborator

denrase commented Apr 30, 2025

@buenaflor Yeah, looks like an error we had before. It originates in _SentryUserInteractionWidgetState accoring to the stack trace. I'll check if we can use the same guard.

@stephanie-anderson stephanie-anderson added the dart Pull requests that update Dart code label May 2, 2025 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug dart Pull requests that update Dart code Explore > Replays Replays
Projects
Archived in project
Status: Needs Discussion
Development

Successfully merging a pull request may close this issue.

5 participants