question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error on AnimatedValue.js file when it tries to call flush

See original GitHub issue

The AnimatedValue.js throws an error on line 58 when node.__getChildren().forEach(findAnimatedStyles); is called on _flush function sometimes.

React Native version: 0.58.3

Steps To Reproduce

1 - create variable with Animated.Value 2 - update the value

Describe what you expected to happen: Animations work properly.

Snack, code example, or link to a repository:

The error happens in node_modules/react-native/Libraries/Animated/src/nodes/AnimatedValue.js in findAnimatedStyles at line 58:28:

function _flush(rootNode: AnimatedValue): void {
  const animatedStyles = new Set();
  function findAnimatedStyles(node) {
    /* $FlowFixMe(>=0.68.0 site=react_native_fb) This comment suppresses an
     * error found when Flow v0.68 was deployed. To see the error delete this
     * comment and run Flow. */
    if (typeof node.update === 'function') {
      animatedStyles.add(node);
    } else {
      node.__getChildren().forEach(findAnimatedStyles);
    }
  }
  findAnimatedStyles(rootNode);
  /* $FlowFixMe */
  animatedStyles.forEach(animatedStyle => animatedStyle.update());
}

Throws TypeError: s.__getChildren().forEach is not a function. (In 's.__getChildren().forEach(t)', 's.__getChildren().forEach' is undefined)

Error screenshot:

Screen Shot 2019-06-10 at 09 21 26

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:2
  • Comments:7

github_iconTop GitHub Comments

3reactions
radikcommented, Sep 12, 2019

I have the same issue. I could not say exactly how to reproduce it. I got an issue report from Crashlytics. Some of my users faced it. Android 7 Phone Samsung Galaxy S7 edge

0reactions
stale[bot]commented, Apr 14, 2020

Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information.

Read more comments on GitHub >

github_iconTop Results From Across the Web

React native: error with animated value on progress bar
In my react native app I want to have a progressbar animated values, problem is when component is mounted the bar is full...
Read more >
Animated.Value
Using a new mechanism (e.g. starting a new animation, or calling setValue ) will stop any previous ones. Typically initialized with new Animated...
Read more >
1070745 - Implement play and pause on AnimationPlayer
If an animation is paused by calling pause(), then we change ... appendChild(gElem); Now that this lives in a .js file, isolated from...
Read more >
How to make your React Native app respond gracefully ...
To do so you'll use an animated value to manage the height of the image, which you'll adjust when the keyboard is opened....
Read more >
Scripting API: AssetDatabase
ReleaseCachedFileHandles, Calling this function will release file handles ... asset or meta files safely thus avoiding potential file sharing IO errors.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found