-
-
Notifications
You must be signed in to change notification settings - Fork 39
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
App freeze on android #24
Comments
any news? |
react-native-reanimated and use portal => problem |
@hodangnamtien I have to the same problem |
Same problem. After two times make portal visible, android app become freeze |
I am facing the same problem. Any news with fix to this? @gorhom |
The same issue on my end. Would be grateful for some updates about this issue from you. @gorhom |
Could the underlying cause be similar to this (solved) issue on They're doing a similar thing to this library (using context for pure-JS portal/modal-like behaviour without using React Native's Looks like their issue turned out to be something to do with timing when elements inside the portal/pseudo-modal contained reanimated-powered enter/exit animations. (off-topic - I don't know why there has been three comments on this issue in the last 20 minutes, mine is completely coincidental 😅) |
Any reproducible sample code to work on ? |
I am using Applying provider in App.tsx
Using Portal with BottomSheet. This
Issue appears only on Android. iOS works fine. |
I tried a few combinations of So this is more subtle than "react-native-reanimated and use portal => problem". More example cases would help. @miihauu There's a lot of possible causes in that example; dozens of animations within BottomSheet alone, plus the navigator. Does the issue still occur with that bottom-sheet / portal setup without the navigator? E.g. if you temporarily simplify it to this: const App = () => {
return (
<PortalProvider>
<View>/* Some pressable that brings up the bottom sheet */</View>
<Sheet />
</PortalProvider>
)} |
@AlanSl Thank you for your involvment. I've figured out that app is not exactly freezing, but the bottom sheet is not reacting for dragging it down when it is wrapped in Thanks and still looking for solution for that. |
Ok, I have found a solution. I wrapped my Portal provider with
and my BottomSheet component looks like this:
From my side is closed. Thanks for help. |
i just encountered this issue again. I think it might be due to "exiting" animation of an Animated.View. The structure i have is something like this
so maybe Animated.View tries to play its exiting animation but Portal does something upon unmount that breaks it all? But again it works fine on iOS... |
@lightrow I commented this "exiting" code then fine but without animated. when re-comment and after first-time call exiting => I don't see any bottom sheets. How can we fix it? And Seem I see a run function with 'worklet' maybe this bottomsheet also die |
I'm currently using the react-native-portal and BottomSheet component from @gorhom/bottom-sheet. I realize that if I use this code, the app will freeze:
If I comment out the appearsOnIndex and disappearsOnIndex props, the app will work properly but there will be no backdrop. And one more thing. I have this code in the MainActivity - onCreate function @gorhom Can you please take a look |
portal package on ios works fine,but on android app freeze.
i use react-navigation and react-native-reanimated
The text was updated successfully, but these errors were encountered: