Skip to content

CI failing in autocomplete tests with "Finder specifies a widget that would not receive pointer events." #1289

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
chrisbobbe opened this issue Jan 17, 2025 · 1 comment · Fixed by #1290
Assignees

Comments

@chrisbobbe
Copy link
Collaborator

chrisbobbe commented Jan 17, 2025

CI is failing with this test failure:

00:21 +1751 ~166: /Users/chrisbobbe/dev/zulip-flutter/test/widgets/autocomplete_test.dart: TopicAutocomplete text selection is reset on choosing an option
══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
The following assertion was thrown running a test:
Finder specifies a widget that would not receive pointer events.
A call to tap() with finder "Found 1 widget with text "some topic": [
  Text("some topic", dependencies: [DefaultSelectionStyle, DefaultTextStyle, MediaQuery]),
]" derived an Offset (Offset(400.0, 484.0)) that would not hit test on the specified widget.
Maybe the widget is actually off-screen, or another widget is obscuring it, or the widget cannot
receive pointer events.
The finder corresponds to this RenderBox: RenderParagraph#2bd19 relayoutBoundary=up24(creator: RichText ← Text ← Padding ← Listener ← RawGestureDetector ← GestureDetector ← Semantics ← DefaultSelectionStyle ← Builder ← MouseRegion ← Semantics ← _FocusInheritedScope ← ⋯, parentData: offset=Offset(16.0, 8.0) (can use size), constraints: BoxConstraints(w=736.0, 0.0<=h<=Infinity), size: Size(736.0, 20.0), textAlign: start, textDirection: ltr, softWrap: wrapping at box width, overflow: clip, locale: en, maxLines: unlimited)
The hit test result at that offset is: HitTestResult(RenderEditable#8d1e5@Offset(384.0, 20.0),
_RenderSizeChangedWithCallback#69182@Offset(384.0, 20.0),
RenderSemanticsAnnotations#2c1d7@Offset(384.0, 20.0), RenderLeaderLayer#c01d0@Offset(384.0, 20.0),
RenderIgnorePointer#a7fdc@Offset(384.0, 20.0), RenderSemanticsAnnotations#bb095@Offset(384.0, 20.0),
RenderPointerListener#23002@Offset(384.0, 20.0), RenderPointerListener#f94cb@Offset(384.0, 20.0),
RenderMouseRegion#36561@Offset(384.0, 20.0), RenderTapRegion#0668a@Offset(384.0, 20.0),
_RenderCompositionCallback#c7f37@Offset(384.0, 20.0), RenderRepaintBoundary#d60f4@Offset(384.0,
20.0), _RenderDecoration#9edf7@Offset(384.0, 20.0), RenderPointerListener#dc621@Offset(384.0, 20.0),
RenderSemanticsAnnotations#9100f@Offset(384.0, 20.0), RenderIgnorePointer#a9951@Offset(384.0, 20.0),
RenderTapRegion#59981@Offset(384.0, 20.0), RenderMouseRegion#b09e2@Offset(384.0, 20.0),
RenderPadding#1c599@Offset(384.0, 30.0), RenderDecoratedBox#226f9@Offset(384.0, 30.0),
RenderLeaderLayer#988f5@Offset(384.0, 30.0), RenderSemanticsAnnotations#4e7d4@Offset(384.0, 30.0),
RenderTapRegion#64502@Offset(384.0, 30.0), _RenderLayoutSurrogateProxyBox#a8cbf@Offset(384.0, 30.0),
_RenderLayoutBuilder#46d79@Offset(384.0, 30.0), RenderFlex#7f798@Offset(384.0, 30.0),
RenderPadding#88ffc@Offset(392.0, 30.0), RenderFlex#70c4b@Offset(392.0, 30.0),
RenderPadding#1047a@Offset(400.0, 30.0), RenderFlex#f84b6@Offset(400.0, 30.0),
_RenderInkFeatures#f39ea@Offset(400.0, 30.0), RenderPhysicalModel#b97f6@Offset(400.0, 30.0),
RenderPadding#5469c@Offset(400.0, 31.0), RenderDecoratedBox#01f41@Offset(400.0, 31.0),
RenderConstrainedBox#d7156@Offset(400.0, 31.0), RenderFlex#52c8e@Offset(400.0, 424.0),
RenderPositionedBox#c341e@Offset(400.0, 424.0), RenderCustomMultiChildLayoutBox#6348e@Offset(400.0,
484.0), _RenderInkFeatures#1fc31@Offset(400.0, 484.0), RenderPhysicalModel#75f88@Offset(400.0,
484.0), RenderSemanticsAnnotations#ee610@Offset(400.0, 484.0),
RenderRepaintBoundary#623e2@Offset(400.0, 484.0), RenderIgnorePointer#ed400@Offset(400.0, 484.0),
_RenderSnapshotWidget#c6e12@Offset(400.0, 484.0), _RenderSnapshotWidget#dc247@Offset(400.0, 484.0),
_RenderSnapshotWidget#c7c59@Offset(400.0, 484.0), _RenderSnapshotWidget#3a3c3@Offset(400.0, 484.0),
RenderRepaintBoundary#e751b@Offset(400.0, 484.0), RenderSemanticsAnnotations#bfa1a@Offset(400.0,
484.0), RenderOffstage#83bb7@Offset(400.0, 484.0), RenderSemanticsAnnotations#d4b3f@Offset(400.0,
484.0), _RenderTheater#64caf@Offset(400.0, 484.0), RenderAbsorbPointer#e4729@Offset(400.0, 484.0),
RenderPointerListener#f0a2d@Offset(400.0, 484.0), RenderSemanticsAnnotations#e638b@Offset(400.0,
484.0), RenderCustomPaint#dac63@Offset(400.0, 484.0), RenderSemanticsAnnotations#c0b77@Offset(400.0,
484.0), RenderSemanticsAnnotations#b114e@Offset(400.0, 484.0),
RenderTapRegionSurface#c0116@Offset(400.0, 484.0), RenderSemanticsAnnotations#e1393@Offset(400.0,
484.0), RenderSemanticsAnnotations#98622@Offset(400.0, 484.0),
RenderSemanticsAnnotations#6e817@Offset(400.0, 484.0),
HitTestEntry<HitTestTarget>#0c033(_ReusableRenderView#5e431),
HitTestEntry<HitTestTarget>#ab8f1(<AutomatedTestWidgetsFlutterBinding>))
If you expected this target not to be able to receive pointer events, pass "warnIfMissed: false" to
"tap()".
To make this error into a non-fatal warning, set WidgetController.hitTestWarningShouldBeFatal to
false.

When the exception was thrown, this was the stack:
#0      WidgetController._getElementPoint (package:flutter_test/src/controller.dart:2045:11)
#1      WidgetController.getCenter (package:flutter_test/src/controller.dart:1861:12)
#2      WidgetController.tap (package:flutter_test/src/controller.dart:1041:7)
#3      main.<anonymous closure>.<anonymous closure> (file:///Users/chrisbobbe/dev/zulip-flutter/test/widgets/autocomplete_test.dart:338:20)
<asynchronous suspension>
#4      testWidgets.<anonymous closure>.<anonymous closure> (package:flutter_test/src/widget_tester.dart:193:15)
<asynchronous suspension>
#5      TestWidgetsFlutterBinding._runTestBody (package:flutter_test/src/binding.dart:1064:5)
<asynchronous suspension>
<asynchronous suspension>
(elided one frame from package:stack_trace)

The test description was:
  text selection is reset on choosing an option
════════════════════════════════════════════════════════════════════════════════════════════════════
00:21 +1752 ~166 -1: /Users/chrisbobbe/dev/zulip-flutter/test/widgets/autocomplete_test.dart: TopicAutocomplete text selection is reset on choosing an option [E]
  Test failed. See exception logs above.
  The test description was: text selection is reset on choosing an option

The failure is in a test we added recently: 'text selection is reset on choosing an option', and the fix will be the same as in 0bfa79d: add a tester.pump() to accommodate a new delay in upstream RawAutocomplete.

We merged this test in the short window between the revert and reland of that RawAutocomplete change, so our CI didn't catch this failure before merge.

@PIG208
Copy link
Member

PIG208 commented Jan 17, 2025

CZO conversation for other reports of this.

rajveermalviya pushed a commit to rajveermalviya/zulip-flutter that referenced this issue Jan 21, 2025
rajveermalviya pushed a commit to rajveermalviya/zulip-flutter that referenced this issue Jan 21, 2025
yashrajpu pushed a commit to yashrajpu/zulip-flutter that referenced this issue Jan 22, 2025
E-m-i-n-e-n-c-e pushed a commit to E-m-i-n-e-n-c-e/zulip-flutter that referenced this issue Jan 23, 2025
@gnprice gnprice added this to the M5-a: Server 10 milestone Feb 5, 2025
rishichirchi pushed a commit to rishichirchi/zulip-flutter that referenced this issue Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants