-
Notifications
You must be signed in to change notification settings - Fork 3
Description
Describe the bug
Floating-UI (formerly Popper.js) is triggering infinite loops and crashing the frontend intermittently.
While profiling re-renders (#1829), we found that having multiple pool rows on the screen (i.e., more than two Reward tooltips) can trigger the crash. It occurs after navigating the UI for some time, likely as an unstable state builds up.
A related issue in Radix UI (built on Floating-UI) was reported but never fixed:
(radix-ui/primitives#2717 (comment))
It includes a reproducible example:
https://codesandbox.io/p/sandbox/maximum-update-depth-exceeded-crash-forked-slxmkz
Refreshing the sandbox browser triggers the following error:
Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but with no dependency array.

Since we were originally using radix-ui, we migrated to a vanilla Floating-UI implementation in #1822. However the crash was still happening.
While building a repro sandbox for the Floating-UI implementation, does not crash. 😵💫
https://codesandbox.io/p/sandbox/maximum-update-depth-exceeded-crash-forked-4qx4zq
Next Steps
We need to refine our repro sandbox by incrementally adding structures from our app until the crash is reproducible. This should help pinpoint the underlying cause.