traggo / server

self-hosted tag-based time tracking
https://traggo.net
GNU General Public License v3.0
1.21k stars 58 forks source link

Maximum update depth exceeded when scrolling down #183

Closed Minnowo closed 1 month ago

Minnowo commented 1 month ago

Describe the bug Scrolling far down on the list page crashes the page.

To Reproduce Steps to reproduce the behavior:

  1. Go to Tag page
  2. Scroll down as far as possible
  3. Page turns white and there is error in the console

Expected behavior Scrolling works endlessly

Screenshots image

Additional context

Errors in the console:

Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
    React 3
    DatedTimeSpans DoneTrackers.tsx:133
    React 6
    unstable_runWithPriority scheduler.development.js:704
    React 4
    unstable_runWithPriority scheduler.development.js:704
    React 6
    handleScroll react-infinite.js:471
    infiniteHandleScroll react-infinite.js:405
react-dom.development.js:25668
The above error occurred in the <DatedTimeSpans> component:
    in DatedTimeSpans (at DoneTrackers.tsx:111)
    in div (created by Infinite)
    in div (created by Infinite)
    in Infinite (at DoneTrackers.tsx:96)
    in div (at DoneTrackers.tsx:95)
    in DoneTrackers (at DailyPage.tsx:14)
    in div (at DailyPage.tsx:11)
    in DailyPage (created by Context.Consumer)
    in Route (at Router.tsx:42)
    in main (at Page.tsx:302)
    in div (at Page.tsx:209)
    in Page (at Router.tsx:39)
    in Switch (at Router.tsx:35)
    in Router (at Root.tsx:23)
    in Router (created by HashRouter)
    in HashRouter (at Root.tsx:22)
    in SnackbarProvider (at SnackbarProvider.tsx:23)
    in SnackbarProvider (at Root.tsx:21)
    in MuiPickersUtilsProvider (at Root.tsx:20)
    in ThemeProvider (at ThemeProvider.tsx:136)
    in ThemeProvider (at Root.tsx:19)
    in BootUserSettings (at Root.tsx:18)
    in ApolloProvider (at ApolloProvider.tsx:13)
    in ApolloProvider (at ApolloProvider.tsx:12)
    in ApolloProvider (at Root.tsx:17)
    in Root (at src/index.tsx:8)

Consider adding an error boundary to your tree to customize error handling behavior.
Visit https://fb.me/react-error-boundaries to learn more about error boundaries. index.js:1437
    e index.js:1437
    React 12
    unstable_runWithPriority scheduler.development.js:704
    React 5
    unstable_runWithPriority scheduler.development.js:704
    React 6
    handleScroll react-infinite.js:471
    infiniteHandleScroll react-infinite.js:405
Uncaught Error: Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.
    React 3
    DatedTimeSpans DoneTrackers.tsx:133
    React 6
    unstable_runWithPriority scheduler.development.js:704
    React 4
    unstable_runWithPriority scheduler.development.js:704
    React 6
    handleScroll react-infinite.js:471
    infiniteHandleScroll react-infinite.js:405
react-dom.development.js:25668
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 Infinite (at DoneTrackers.tsx:96)
    in div (at DoneTrackers.tsx:95)
    in DoneTrackers (at DailyPage.tsx:14)
    in div (at DailyPage.tsx:11)
    in DailyPage (created by Context.Consumer)
    in Route (at Router.tsx:42)
    in main (at Page.tsx:302)
    in div (at Page.tsx:209)
    in Page (at Router.tsx:39)
    in Switch (at Router.tsx:35)
    in Router (at Root.tsx:23)
    in Router (created by HashRouter)
    in HashRouter (at Root.tsx:22)
    in SnackbarProvider (at SnackbarProvider.tsx:23)
    in SnackbarProvider (at Root.tsx:21)
    in MuiPickersUtilsProvider (at Root.tsx:20)
    in ThemeProvider (at ThemeProvider.tsx:136)
    in ThemeProvider (at Root.tsx:19)
    in BootUserSettings (at Root.tsx:18)
    in ApolloProvider (at ApolloProvider.tsx:13)
    in ApolloProvider (at ApolloProvider.tsx:12)
    in ApolloProvider (at Root.tsx:17)
    in Root (at src/index.tsx:8) index.js:1437