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.

Can't cast NoopNode to ClockNode on Android

See original GitHub issue

I use animation function, which is defined as follows:

const animateTranslation = (
  clock: Animated.Clock,
  position: Animated.Value<number>,
  translation: Animated.Value<number>,
  offset: Animated.Value<number>,
  min: Animated.Value<number>,
  max: Animated.Value<number>,
  gestureState: Animated.Value<State>
) => {
  const snapPoint = new Value(0);
  const myclock = new Clock();
  return cond(clockRunning(myclock), snapPoint, snapPoint);
};

and later use the returned value to animate Animated.View's property:

const taskTranslateY = animateTranslation(clock, position, translationY, offsetY, min, max, state);
...
<Animated.View
  style={{
    flex: 1,
    flexDirection: 'column',
    marginTop: -200,
    transform: [{ translateY: taskTranslateY }]
  }}
>
...
</Animated.View>

And I started getting this error, which I can’t understand or somehow to deal with. Where is a bug? Снимок экрана от 2020-03-21 20-37-25

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:16 (8 by maintainers)

github_iconTop GitHub Comments

9reactions
luogaocommented, Sep 29, 2020

I add a cond block to check whether the clock is defined. and it worked for me

          cond(
              defined(this.clock),
              [
                cond(
                  not(clockRunning(this.clock)),
                  [ set(this.startValue, 1) ],
                  0
                )
              ],
              0
            )

5reactions
0x079commented, Jun 18, 2020

I’m having the same issue, clock is basically unusable on android, Basically anything I do with clock will trigger the same issue. Using 1.7.0

EDIT: For us, it turns out that we were using spring, and within state, we didn’t define velocity. So the error message is a bit misleading. If you run into this problem, I recommend that you double and triple check your state and config for the animation, see if that can fix your problem.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Developers - Can't cast NoopNode to ClockNode on Android -
Hi! I have been unable to upgrade expo to v39 because of an error we were getting when using reanimated ~1.13.0, after some...
Read more >
React-Native-Reanimated error at MainApplication.java
Fixed! All I had to do was install react-native-reanimated and NOT to do the manual steps that the documentation shows.
Read more >
Added The App "Digitales Klassenzimmer" (!6652) · Merge requests ...
Hi @Rudloff I have updated it to use git tags. ... android/app/build.gradle ... node_modules/react-native-background-timer/android/build.gradle ...
Read more >
William Candillon react-native-redash Issues - Giters
Can't use v1 with newest version of react-native-gesture-handler. Updated 8 months ago ... Can't cast NoopNode to ClockNode on Android.
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