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.

RN 0.61: Animated.color causes "excessive number of pending callbacks"

See original GitHub issue

Hey guys, how are you?

Just updated react native version to 0.61 (rc) and now my app is crashing on some screens that use color interpolation.

We have a theme based template, so I created a function that parses hex colors using polished:

import Animated from 'react-native-reanimated'
import { parseToRgb } from 'polished'

const interpolateColors = (animation, { inputRange, outputRange }) => {
  const colors = outputRange.map(parseToRgb)

  const r = Animated.interpolate(animation, {
    inputRange,
    outputRange: colors.map(c => c.red),
    extrapolate: Animated.Extrapolate.CLAMP,
  })

  const g = Animated.interpolate(animation, {
    inputRange,
    outputRange: colors.map(c => c.green),
    extrapolate: Animated.Extrapolate.CLAMP,
  })

  const b = Animated.interpolate(animation, {
    inputRange,
    outputRange: colors.map(c => c.blue),
    extrapolate: Animated.Extrapolate.CLAMP,
  })

  return Animated.color(r, g, b)

Any tips on this?

Screen Shot 2019-09-05 at 11 41 22 AM

Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:20
  • Comments:22 (4 by maintainers)

github_iconTop GitHub Comments

8reactions
TheSaviorcommented, Sep 24, 2019

We just landed a PR to core that changes this warning to only fire once the first time it occurs. That might also make this issue less high severity.

8reactions
marcormcommented, Sep 9, 2019

I get the same error in some conditions using react-navigation 5.0.0 (unstable)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excessive number of pending callbacks: 501. Some ...
It seems that the issue was that an async function was being executed in a loop. The loop was firing off lots of...
Read more >
@react-native/normalize-color | Yarn - Package Manager
Use warnOnce for excessive number of callbacks error (0cafa0f5d1 by @janicduplessis); Include transform in OUTER_PROPS (b94438 by @migbot) ...
Read more >
withTiming | React Native Reanimated
Arguments​. toValue [number | string]​. The target value at which the animation should conclude. It can be specified as a color ...
Read more >
Untitled
Thrombin cleavage buffer recipe, Axis bank account number sample! ... Nickel colored chandeliers, Money cat cartoon, Chetan bhagat book review, Sunhee choi, ...
Read more >
Why Are Our Pending Callbacks Disappearing From The ...
Pending callbacks in the 8x8 Contact Center Callback Queue are ... Cause. Cancel Callback After period was set to a shorter time period...
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