Open Elmatoss opened 3 years ago
Confirm this, i'v also facing this issue :smile_cat:
pop cause this warning to
As i see this isn't just a warning, it cancel the animation immediately when navigate back :cry:
More information: This issue just occur when i debugging with "Debug server host & port for device".
It work just fine if i'm debug with cable
Reconfirm: Occur while debug with cable too. :(( All packages is latest.
Same here. I just upgraded to Expo SDK 41 and now I'm having that pop() issue, as well as randomly no header backgroundColor...
"@react-navigation/drawer": "^5.12.5", "@react-navigation/native": "^5.9.4", "@react-navigation/stack": "^5.14.4"
Thanks for looking into it! :)
Same here, animations not working properly on back navigation with gestureEnabled: true
:(
UPD: Also reproduced on 6th version
We also started seeing this issue in our Android app as soon as we upgraded from React Native 0.64.3 to 0.67.4. In particular the problem seems to occur whenever the user clicks on a button that calls goBack()
and the screen has gestureEnabled: true
.
We've also been able to reproduce the problem with both v5 (main branch) and v6 (nav6 branch) of React Navigation with this minimum reproduction repo: https://github.com/smfeest/react-navigation-issue9051
Good news (I think!). It looks like this warning can be avoided by wrapping the navigation call in requestAnimationFrame
(which incidentally appears to be what the built-in HeaderBackButton
does
Example workaround in my minimum reproduction repo: https://github.com/smfeest/react-navigation-issue9051/commit/a775cd4b91a419afa802c001c42a019250def07c
Current Behavior React-native app with react-navigation as navigator. Currently, when
gesturesEnabled: true
on android and you try to navigate back via button, it either doesn't work, or there is no transition animation and sometimes I get the warningWarning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
Expected Behavior The navigate.back aswell as the gestures should always work flawlessly without breaking the animation or throwing a warning
How to reproduce (i) first clone my small repro at https://github.com/Elmatoss/reactNavigationGesturesEnabledAndroidBug
git clone git@github.com:Elmatoss/reactNavigationGesturesEnabledAndroidBug.git
(ii) get dependenciesyarn
(iii) start metro server and install app on deviceyarn start
andyarn android
(iv)clickNext Screen
andAgain..
if you want to (v)clickBack
in the header vs swipe right to go backYour Environment