Animation Warning - Sending onAnimatedValueUpdate with no listeners registered
Hi,
I have multiple stacks in my main navigator and one of them is Bottom Tab Navigator. As we don't have switchNavigator in version 5, we are using reset to clear the previous stack and navigate to a screen.
However, in this case we get a warning "Sending onAnimatedValueUpdate with no listeners registered". If we set the options animationEnabled: false, the warning is gone but we want the animation to be enabled.
Can anyone help?
Hey! Thanks for opening the issue. Can you provide more information about the issue? Please fill the issue template when opening the issue without deleting any section. We need all the information we can to be able to help. Make sure to at least provide - Current behaviour, Expected behaviour, A way to reproduce the issue with minimal code (link to snack.expo.io) or a repo on GitHub, and the information about your environment (such as the platform of the device, exact versions of all the packages mentioned in the template etc.).
Same problem. That happens when I use TransitionPresets.ScaleFromCenterAndroid. On iOS. Can I use it on iOS?
same issue happens when this code is executed...
navigation.dispatch(
CommonActions.reset({
index: 1,
routes: [{ name: 'SomeRoute' }],
}),
)
Same issue here. In Stack.Navigator, I have a conditional returning a set of screens based on the validity of the user's session token.
For example:
<Stack.Navigator>
{state.token == null
? ( <>AUTH STACK SCREENS</> )
: ( <>MAIN STACK SCREENS</> )
}
</Stack.Navigator>
When the token is cleared on logout, the app returns to the auth screens (login, sign up, etc.) as expected but with the error Sending 'onAnimatedValueUpdate' with no listeners registered
I see the warning for the exact same reason as https://github.com/react-navigation/react-navigation/issues/7839#issuecomment-614166939. I think this is just a harmless artifact of an asynchronous callback that's triggered before but received after the navigator component is unmounted. If not, would be good to hear what problems this will cause in the long run.
I have same issue, just in IOS.
I have tab navigation with stack navigation. If I set the options animationEnabled: false in stack navigation options, the warning is gone but I want the animation to be enabled.
Can anyone help?
Same here.
I have used createMaterialTopTabNavigator() and performing a network request inside the first top tab screen.
I need to delay a bit to request the HTTP GET to bypass the warning. I think the inner code of react navigation didn't capture the onAnimatedValueUpdate event???
I have same issue, just in IOS.
I have tab navigation with stack navigation. If I set the options animationEnabled: false in stack navigation options, the warning is gone but I want the animation to be enabled.
Can anyone help?
Another thing, this happen when i set unmountOnBlur: true, in the tab navigator
hey, any chance for some snack? 😄
This happened to me too when i navigate from one stack to another stack, both of which have TopTabNavigators inside them which fire api calls via actions in redux saga and display a loader inside them until the data is loaded in redux store. There also happens to be a memory leak, i am not sure if this is related to this issue
Warning: 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.
in SceneView (created by Pager)
in RCTView (at createAnimatedComponent.js:233)
in AnimatedComponent(Component) (created by PanGestureHandler)
in PanGestureHandler (created by Pager)
in Pager (created by TabView)
in RCTView (created by TabView)
in TabView (at MaterialTopTabView.tsx:48)
in MaterialTopTabView (at createMaterialTopTabNavigator.tsx:41)
in MaterialTopTabNavigator (at TopTabNavigator/index.js:14)
in TopTabNavigator (at LeadDetails/index.js:100)
in RCTView (at Container/index.js:23)
in RCTView (at Container/index.js:12)
in Container (at LeadDetails/index.js:99)
in LeadDetailsScreen (at withLoader/index.js:48)
Hey! Thanks for opening the issue. Can you provide a minimal repro which demonstrates the issue? Posting a snippet of your code in the issue is useful, but it's not usually straightforward to run. A repro will help us debug the issue faster. Please try to keep the repro as small as possible. The easiest way to provide a repro is on snack.expo.io. If it's not possible to repro it on snack.expo.io, then you can also provide the repro in a GitHub repository.
same problem
I have the same issue whenever sliding backward in a stack to return to the previous page.
Should we ignore this warning?
Same issue here. How should we procede?
Same issue.. I guess its just a warning so in release build won't be a problem. App doesn't get affected as far as I can tell so all good.
Think this is where a PR would be appreciated. :)
<3
Same issue here.
Same issue.
How to ignore this warning?
Done!
import { LogBox } from 'react-native';
LogBox.ignoreLogs(['Sending...']);