react-navigation icon indicating copy to clipboard operation
react-navigation copied to clipboard

Animation Warning - Sending onAnimatedValueUpdate with no listeners registered

Open tradebulls opened this issue 6 years ago • 132 comments

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?

tradebulls avatar Mar 20 '20 07:03 tradebulls

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.).

github-actions[bot] avatar Mar 20 '20 10:03 github-actions[bot]

Same problem. That happens when I use TransitionPresets.ScaleFromCenterAndroid. On iOS. Can I use it on iOS?

Bardiamist avatar Mar 25 '20 03:03 Bardiamist

same issue happens when this code is executed...

    navigation.dispatch(
      CommonActions.reset({
        index: 1,
        routes: [{ name: 'SomeRoute' }],
      }),
    )

a-eid avatar Mar 25 '20 19:03 a-eid

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

neelchanda avatar Apr 15 '20 17:04 neelchanda

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.

LaneRamp avatar Apr 16 '20 03:04 LaneRamp

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?

matheusf31 avatar Apr 27 '20 20:04 matheusf31

Same here.

I have used createMaterialTopTabNavigator() and performing a network request inside the first top tab screen.

codyng avatar Apr 30 '20 05:04 codyng

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???

codyng avatar Apr 30 '20 05:04 codyng

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

matheusf31 avatar Apr 30 '20 17:04 matheusf31

hey, any chance for some snack? 😄

osdnk avatar Apr 30 '20 19:04 osdnk

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)

StarryFire avatar May 09 '20 18:05 StarryFire

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.

github-actions[bot] avatar Jun 15 '20 17:06 github-actions[bot]

same problem

hengkx avatar Jun 30 '20 07:06 hengkx

I have the same issue whenever sliding backward in a stack to return to the previous page.

jbromberg avatar Jul 01 '20 18:07 jbromberg

Should we ignore this warning?

aristech avatar Jul 01 '20 19:07 aristech

Same issue here. How should we procede?

colopreda avatar Jul 08 '20 19:07 colopreda

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

unicornRainbows avatar Jul 21 '20 01:07 unicornRainbows

Same issue here.

ankerbachryhl avatar Jul 25 '20 10:07 ankerbachryhl

Same issue.

MannySauce avatar Aug 13 '20 09:08 MannySauce

How to ignore this warning?

Done! import { LogBox } from 'react-native'; LogBox.ignoreLogs(['Sending...']);

crisecheverria avatar Aug 18 '20 08:08 crisecheverria