Closed moxen-dev closed 3 months ago
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
Could you prepare a repository with an app that would allow to easily reproduce the bug? The gist you've provided is sadly not copy-pasteable, and it seems you've already tried the things that first come to my mind.
May be related, same lib versions, app freezes on file permissions modal with:
ReactNative ▶︎ [GESTURE HANDLER] Initialize gesture handler for root view com.facebook.react.views.modal.ReactModalHostView$DialogRootViewGroup{8422507 V.E...... ......ID 0,0-0,0}
I was able reproduce this using RN built-in Modal. When modal closes and Im trying to call a function from a Pressable on a screen, here's my package.json:
"@react-navigation/core": "6.4.8",
"@react-navigation/drawer": "6.6.2",
"@react-navigation/native": "6.1.6",
"@react-navigation/native-stack": "6.1.0",
"@react-navigation/stack": "6.3.16",
"react-native-gesture-handler": "1.10.3",
"react-native-reanimated": "3.1.0",
Here's the code:
// SomeModal.js
<Modal
animationType='none'
supportedOrientations={['portrait']}
transparent
visible
>
<GestureHandlerRootView style={{flex: 1}}>
// Some view here.
</GestureHandlerRootView>
</Modal>
Updating to the lastest RNGestureHandler doesn't seem to fix it.
Is it possible to nest multiple GestureHandlerRootView's? for example:
I have the following.
Here's the code:
// ModalManager.js
<Modal
animationType='none'
supportedOrientations={['portrait']}
transparent
visible
>
<GestureHandlerRootView style={{flex: 1}}>
// More modals here, rendered conditionally.
</GestureHandlerRootView>
</Modal>
// App.js
<SomeProvider>
<AppRouter style={styles.container}/>
<GestureHandlerRootView>
<ModalsManager />
</GestureHandlerRootView>
</SomeProvider>
This works for a while until a few scenarios:
currently im on RNGH 2.10.0.
It would be great for some advice in terms of a workaround or a some insight to why this is happening?
@j-piasecki I've looked at some LogRocket replays of my app sessions, After the modal closes the ReactModalHostView/DialogRootViewGroup persists to be mounted so it gives the illusion of the app freezing, Even though the logcat logs:
[GESTURE HANDLER] Tearing down gesture handler registered for root view com.facebook.react.views.modal.ReactModalHostView$DialogRootViewGroup{bdc8e21 V.E...... .......D 0,0-1080,1215}
Could you point me to the file/function that handles that logic? Or give me some insight to why that would happened?
Hi @moxen-dev and @garyi-inmanage! Could you please provide a copy-pastable reproduction? I've tried to make something similar to first snippet of @garyi-inmanage, but I didn't manage to reproduce this bug.
Side note, I had freezes with 2.12.0
on Android 14, 2.14.0
seems solved that.
Description
Hello everyone,
I am adding a bottom sheet to my app. First I was using Native Base Action Sheet and it was working fine. Then I changed in favor of the Gorhom Bottom Sheet and a but started to happen. After trying to find the root cause, I decided to completely remove the bottom sheet and coding on my self using react native gesture handler and reanimated. The same issue ocurred. So here I am reporting it/asking for help.
The Issue
https://user-images.githubusercontent.com/93292309/226666012-e3706cfc-a5cf-4cd4-8e27-aa5da54898ee.mp4
Sorry for the interface not being in english, it is tailored for another audience. I will try to be as descriptive as possible here though.
When the user joins the live streaming, there is an auction going on of a Foo Fights tee-shirt. You can see that the clock is ticking down. The products button present a BottomSheetModal with 2 products listed and after selecting one of them, the system change the modal content with a form asking inputs about starting price and time limit for buyers. When submitted, the system dismiss the modal and the app freezes.
GestureHandlerRootView
;Other approaches tried that also froze the app
Touchables
provided by either BottomSheet and RNGH;<NativeViewGestureHandler disallowInterruption>
;Animated.Text
to try to avoid conflicts;Package.json
Between some libs, I believe these are the relevant ones to present here:
"react-native-reanimated/plugin"
is the last plugin listed on thebabel.config.js
;Steps to reproduce
I guess the video demonstrate what is happening.
Snack or a link to a repository
https://gist.github.com/moxen-dev/8808a943931f755dbd406a67e0d9a316
Gesture Handler version
2.9.0
React Native version
0.71.3
Platforms
Android
JavaScript runtime
Hermes
Workflow
Expo bare workflow
Architecture
Paper (Old Architecture)
Build type
Release mode
Device
Real device
Device model
XIAOMI Redmi Note 11
Acknowledgements
Yes