Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please report: Excessive number of pending callbacks: 501 #2171

Closed
jorgeestebancl12 opened this issue Feb 25, 2023 · 13 comments
Closed

Please report: Excessive number of pending callbacks: 501 #2171

jorgeestebancl12 opened this issue Feb 25, 2023 · 13 comments

Comments

@jorgeestebancl12
Copy link

Hello, I hope you are very well, I am receiving a warning in a specific case.

Screenshot 2023-02-25 at 11 43 40 AM

I am creating an agenda that consumes the data from a useEffect and some useState variables which are:

const [data, setData] = useState<any>({});
const [marked, setMarked] = useState({});

When I do this at first it works correctly, but when I want to add the theme property and assign values to it, it starts giving the warning, if I remove the theme property it continues to work fine, any idea what it could be? thank you.

<Agenda
          items={data}
          selected={selected}
          markedDates={marked}
          theme={themeCalendar}
          onDayPress={(day) => {
              setSelected(day.dateString);
          }}
          renderEmptyData={() => <View style={[styles.contentEmptyList, { backgroundColor: theme.colors.background }]}>
              <TextComponent>No hay reservaciones para este dia</TextComponent>
          </View>}
          minDate={daysjs().format('YYYY-MM-DD')}
          maxDate={daysjs().add(1, "month").format('YYYY-MM-DD')}
          renderItem={(item: any) => {
              return <View style={[styles.content, { backgroundColor: theme.colors.card }]}>
                  <TextComponent variant="titleSmall">{item.name}</TextComponent>
                  <TextComponent>Inicia {daysjs(item.start_at).format("H:mm")}</TextComponent>
                  <TextComponent>Termina {daysjs(item.end_at).format("H:mm")}</TextComponent>
              </View>;
          }}
      />

the theme property I'm sending is just this:

const themeCalendar: Theme = {
        backgroundColor: theme.colors.card,
        calendarBackground: theme.colors.card,
        textSectionTitleColor: theme.colors.text,
        textSectionTitleDisabledColor: theme.colors.border,
        selectedDayBackgroundColor: theme.colors.primary,
        selectedDayTextColor: theme.colors.card,
        todayTextColor: theme.colors.primary,
        dayTextColor: theme.colors.text,
        textDisabledColor: theme.colors.border,
        dotColor: theme.colors.primary,
        selectedDotColor: theme.colors.card,
        arrowColor: theme.colors.primary,
        disabledArrowColor: theme.colors.border,
        monthTextColor: theme.colors.text,
        indicatorColor: theme.colors.text,
    }

I also attached the full warning:

Please report: Excessive number of pending callbacks: 501. Some pending callbacks that might have leaked by never being called from native code: {"5148":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5150":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5152":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5154":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5156":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5158":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5160":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5422":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5424":{},"5426":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5433":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5435":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5442":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5449":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5456":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5463":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5470":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5477":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5484":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5491":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5498":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5505":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5512":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5519":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5526":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5533":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5540":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5547":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5554":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5561":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5568":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5575":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5582":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5589":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5596":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5603":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5610":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5617":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5624":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5631":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5638":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5645":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5652":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5659":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5666":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5673":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5680":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5687":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5694":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"5701":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"...(truncated keys)...":451}

If anyone has an idea of how to solve it, I would appreciate it, thank you very much.

@paschenko
Copy link

have same problem

@shashanksoul
Copy link

getting same warning on RN 70

@jonnigg
Copy link

jonnigg commented Mar 13, 2023

getting same warning 70.5.

@marijorc
Copy link

marijorc commented Mar 13, 2023

Just wanted to let you know what worked for me, I replaced onDayPress with onDayChange

@jonnigg
Copy link

jonnigg commented Mar 14, 2023

Just wanted to let you know what worked for me, I replaced onDayPress with onDayChange

I looked at this as a solution as well however, onDayChange does not fire when a day press event is fired. So, if you use onDayChange there is no way to fire off an action when you press a day (especially if you are using showOnlySelectedDayItems)

@shashanksoul
Copy link

There is a bug with TouchableOpacity rn 70.5. Can update to rn 71 to get rid of this warning or try to use below patch.
facebook/react-native#34376 (comment)

@jonnigg
Copy link

jonnigg commented Mar 15, 2023

There is a bug with TouchableOpacity rn 70.5. Can update to rn 71 to get rid of this warning or try to use below patch. facebook/react-native#34376 (comment)

Wanted to mention that I upgraded to rn 71 and the issue is still present.

@aniqueali
Copy link

The same is happening to my code. The bug appeared after I updated my expo SDK from 45 to 48.
Anyone found a solution for it?

@jorgeestebancl12
Copy link
Author

Update the version of React Native with:

"react-native": "0.71.4",
"react-native-calendars": "^1.1293.0",

And I changed the onDayPress method to onDayChange and it worked for me.

@KrisLau
Copy link

KrisLau commented Apr 27, 2023

I'm still facing this too. The onDayChange works but onDayChange is not an actual props for the ExpandableCalendar so it's equivalent to not passing a method at all. It's probably related to facebook/react-native#34442 which means TouchableOpacity is in this package and needs to be swapped

@koheitakumi
Copy link

koheitakumi commented May 7, 2023

Me too.

RN69.9
react-native-calendar: 1.1295.0

When onDayPress, the following warning is displayed.

 WARN  Please report: Excessive number of pending callbacks: 501. Some pending callbacks that might have leaked by never being called from native code: {"13297":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13300":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13303":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13306":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13309":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13316":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13323":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13330":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13337":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13344":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13351":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13358":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13365":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13372":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13379":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13386":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13393":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13400":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13407":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13414":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13421":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13428":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13435":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13442":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13449":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13456":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13463":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13470":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13477":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13484":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13491":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13498":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13505":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13512":{},"13519":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13526":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13529":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13532":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13535":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13538":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13541":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13544":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13547":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13550":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13553":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13556":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13559":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13562":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13565":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"13568":{"module":"NativeAnimatedModule","method":"startAnimatingNode"},"...(truncated keys)...":451}
TouchableOpacity@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.myService:66453:36
TouchableOpacity
BasicDay@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.myService:393109:22
Day@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.myService:392486:21
RCTView
View
RCTView
View
RCTView
View
RCTView
View
RCTView
View
Calendar@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.myService:390184:28
CalendarListItem@http://localhost:8081/index.bundle?platform=ios&dev=true&minify=false&modulesOnly=false&runModule=true&app=com.myService:395044:21
RCTView
View

Is facebook/react-native#34442 helpful?

@KrisLau
Copy link

KrisLau commented May 10, 2023

@jorgeestebancl12 Why was this closed? this is still an issue in the latest version with the AgendaList especially. I believe that the issue could be resolved by:

  • swapping out the FlatList and SectionList usages in the package with FlashList
  • replacing TouchableOpacity with Pressable or upgrading react-native to the latest version (where the TouchableOpacity has a fix for these issues)

@KrisLau KrisLau mentioned this issue May 22, 2023
@stesvis
Copy link

stesvis commented Jul 16, 2023

I am also still getting this issue, what's the ultimate solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants