Description
Same crash as #4363 (our Pressable report), but from Touchable instead. After upgrading to 3.0.2 (also happens on 3.1.0), the app crashes with SIGABRT the first time a screen with a Touchable inside a ScrollView mounts. No interaction needed.
Assertion, in RNGestureHandlerDetectorShadowNode.cpp:
react_native_assert(
!children.empty() &&
"GestureDetector must have at least one child node.");
Touchable renders <NativeDetector><GestureHandlerButton>{children}</GestureHandlerButton></NativeDetector> internally, so the detector's direct child count is always 1 — but the crash still happens, which suggests the empty-children state shows up transiently during a Fabric commit rather than from Touchable's own render output. This rules out "wrong number of children in JSX" as the cause and points more toward a child being detached/replaced mid-relayout before the new one attaches.
I checked and this assertion is still present, unchanged, on current main.
Steps to reproduce
- Put a
Touchable (from react-native-gesture-handler) inside a ScrollView.
- Put that
ScrollView inside a screen managed by react-native-screens (e.g. any React Navigation native-stack or Expo Router screen).
- Launch the app and navigate to that screen — no tap or scroll required.
Reproduction
We don't have a minimal Snack/repo isolated yet — happy to put one together if it would help triage. Reproduces reliably in our Expo Router app under the conditions above.
Crash log
Exception Type: EXC_CRASH (SIGABRT)
Triggered by Thread: com.facebook.react.runtime.JavaScript
abort
__assert_rtn
YogaLayoutableShadowNode::layout (YogaLayoutableShadowNode.cpp:709)
YogaLayoutableShadowNode::layout (YogaLayoutableShadowNode.cpp:732)
RNGestureHandlerDetectorShadowNode::layout (RNGestureHandlerDetectorShadowNode.cpp:73)
... (repeats) ...
ScrollViewShadowNode::layout (ScrollViewShadowNode.cpp:62)
... (repeats) ...
RNSScreenShadowNode::layout (RNSScreenShadowNode.cpp:122)
... (repeats) ...
YogaLayoutableShadowNode::layoutTree (YogaLayoutableShadowNode.cpp:674)
Gesture Handler version
3.0.2 (also reproduces on 3.1.0)
React Native version
0.85.3
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Using Expo Prebuild or an Expo development build
Architecture
New Architecture (Fabric)
Build type
Debug mode
Device
iOS simulator
Acknowledgements
Yes
Description
Same crash as #4363 (our
Pressablereport), but fromTouchableinstead. After upgrading to3.0.2(also happens on3.1.0), the app crashes withSIGABRTthe first time a screen with aTouchableinside aScrollViewmounts. No interaction needed.Assertion, in
RNGestureHandlerDetectorShadowNode.cpp:react_native_assert( !children.empty() && "GestureDetector must have at least one child node.");Touchablerenders<NativeDetector><GestureHandlerButton>{children}</GestureHandlerButton></NativeDetector>internally, so the detector's direct child count is always 1 — but the crash still happens, which suggests the empty-children state shows up transiently during a Fabric commit rather than fromTouchable's own render output. This rules out "wrong number of children in JSX" as the cause and points more toward a child being detached/replaced mid-relayout before the new one attaches.I checked and this assertion is still present, unchanged, on current
main.Steps to reproduce
Touchable(fromreact-native-gesture-handler) inside aScrollView.ScrollViewinside a screen managed byreact-native-screens(e.g. any React Navigation native-stack or Expo Router screen).Reproduction
We don't have a minimal Snack/repo isolated yet — happy to put one together if it would help triage. Reproduces reliably in our Expo Router app under the conditions above.
Crash log
Gesture Handler version
3.0.2 (also reproduces on 3.1.0)
React Native version
0.85.3
Platforms
iOS
JavaScript runtime
Hermes
Workflow
Using Expo Prebuild or an Expo development build
Architecture
New Architecture (Fabric)
Build type
Debug mode
Device
iOS simulator
Acknowledgements
Yes