react-virtualized
react-virtualized copied to clipboard
WindowScroller Invariant Violation: Unable to find node on an unmounted component.
What is the current behavior?
An Invariant Violation: Unable to find node on an unmounted component.
is randomly triggered by WindowScroller whenever the window resize event is triggered.
This happens on the line
var thisNode = this._child || ReactDOM.findDOMNode(this);
This happens regardless of registerChild prop being assigned or not. Was able to reproduce in a few instances when
- Component unmounts: resize listener is not cleared;
- Component unmounts: resize listener is cleared but before doing so the error is triggered;
- Component mounts + resize event triggered.
Potentially checking against this._isMounted
before running findDOMNode
would prevent issue.
What is the expected behavior?
Do not attempt to call ReactDOM.findDOMNode if this is an unmounted component. Investigate why resize event is not cleared on unmount.
Which versions of React and react-virtualized, and which browser / OS are affected by this issue? Did this work in previous versions of react-virtualized?
Browser | Safari, Chrome and Firefox |
OS | Irrelevant |
React | 16.8.6 |
React DOM | 16.8.6 |
react-virtualized | 9.21.2 |
Able to reproduce with other versions of react-virtualized
so ..any update?
I'm facing similar bug. Anyone has any fix for it?