Uncaught Error: Unable to find node on an unmounted component. [After update to react 18]
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 28/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- javascript, react
- Domain
- frontend
Research direction
Reproduce the error with React 18 using the linked src/components/Draggable.jsx example, then inspect the DraggableCore lifecycle locations named in the stack trace, especially componentDidMount and componentWillUnmount. Compare the behavior with the reported Version 4.4.5 and define done as no longer throwing when the draggable component mounts and unmounts.
Written by the indexing model from the issue text.
Description
I don't know why it is not working anymore, my code is very simple, but after updating to react 18 stopped working:
code: https://github.com/foxhound87/mobx-react-form-devtools/blob/master/src/components/Draggable.jsx#L11
Version: 4.4.5
these errors are appearing:
Uncaught Error: Unable to find node on an unmounted component.
at findHostInstanceWithWarning (react-dom.development.js:24281:1)
at Object.findDOMNode (react-dom.development.js:24804:1)
at DraggableCore.findDOMNode (DraggableCore.js:389:1)
at DraggableCore.componentDidMount (DraggableCore.js:352:1)
at commitLayoutEffectOnFiber (react-dom.development.js:23305:1)
at commitLayoutMountEffects_complete (react-dom.development.js:24688:1)
at commitLayoutEffects_begin (react-dom.development.js:24674:1)
at commitLayoutEffects (react-dom.development.js:24612:1)
at commitRootImpl (react-dom.development.js:26823:1)
at commitRoot (react-dom.development.js:26682:1)
react-dom.development.js:18687 The above error occurred in the <DraggableCore> component:
at DraggableCore (http://localhost:8888/main.js:75147:5)
at Draggable (http://localhost:8888/main.js:74645:5)
at observerComponent (http://localhost:8888/main.js:40445:73)
at div
at div
at div
at div
at Dock (http://localhost:8888/main.js:49158:5)
at div
at observerComponent (http://localhost:8888/main.js:40445:73)
at UI
at div
at observerComponent (http://localhost:8888/main.js:169213:73)
The above error occurred in the <Draggable> component:
at Draggable (http://localhost:8888/main.js:74645:5)
at observerComponent (http://localhost:8888/main.js:40445:73)
at div
at div
at div
at div
at Dock (http://localhost:8888/main.js:49158:5)
at div
at observerComponent (http://localhost:8888/main.js:40445:73)
at UI
at div
at observerComponent (http://localhost:8888/main.js:169213:73)
react-dom.development.js:24281 Uncaught Error: Unable to find node on an unmounted component.
at findHostInstanceWithWarning (react-dom.development.js:24281:1)
at Object.findDOMNode (react-dom.development.js:24804:1)
at DraggableCore.findDOMNode (DraggableCore.js:389:1)
at DraggableCore.componentWillUnmount (DraggableCore.js:366:1)
at callComponentWillUnmountWithTimer (react-dom.development.js:22852:1)
at safelyCallComponentWillUnmount (react-dom.development.js:22873:1)
at commitDeletionEffectsOnFiber (react-dom.development.js:24129:1)
at recursivelyTraverseDeletionEffects (react-dom.development.js:23989:1)
at commitDeletionEffectsOnFiber (react-dom.development.js:24133:1)
at recursivelyTraverseDeletionEffects (react-dom.development.js:23989:1)
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-grid-layout/react-draggable
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-grid-layout/react-draggable#784 · 4 comments · 2 reactions ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
react-grid-layout/react-draggable#782 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
react-grid-layout/react-draggable#781 · 1 comment · 2 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-grid-layout/react-draggable#780 · 8 comments ·
All issues in react-grid-layout/react-draggable
Similar issues
-
curation good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
amponce/archive-movie-browser#186 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
clerk/javascript#9852 ·
-
bug p1 tools
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
factory-active factory-automatic task-bug-reproduction-cannot-reproduce task-identify-harness-labels-done task-identify-issue-type-done
Difficulty 2/5 1-3 hours Newbie friendliness 84/100