Issue 1:
Describe what you were doing when the bug occurred:

I was profiling unmounting of 30k+ records and this error occurred in dev tools

Please do not remove the text below this line

DevTools version: 4.8.2-fed4ae024

Call stack: at updateTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17854:21)

at getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:17697:24)

at ProfilingCache.getCommitTree (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:18265:14)

at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31718:33)

at vh (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11067:7)

at fi (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:11733:7)

at ck (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:14430:86)

at bk (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13779:11)

at ak (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13768:5)

at Sj (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:13750:7)

Component stack: at CommitFlamegraphAutoSizer (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:31701:48)

at div

at div

at div

at SettingsModalContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:26139:23)

at Profiler_Profiler (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33363:48)

at ErrorBoundary (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27172:5)

at PortaledContent (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:27303:32)

at div

at div

at ProfilerContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:30463:23)

at TreeContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:22538:23)

at SettingsContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:23040:27)

at ModalDialogContextController (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:28328:23)

at DevTools_DevTools (chrome-extension://fmkadmapgofadopljbjfkapdkoienihi/build/main.js:33797:21)

Issue 2:
Do you want to request a feature or report a bug?

bug

What is the current behavior?

after updating 16.8.6>16.9.0 root functional component throws exception "Invariant Violation: Invalid hook call".

In fact, exception was caused by loading multiple versions of react-dom in child components.

The exception text is misleading, would be great to crash earlier (eg at the import stage) with appropriate message

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have dependencies other than React. Paste the link to your JSFiddle (https://jsfiddle.net/Luktwrdm/) or CodeSandbox (https://codesandbox.io/s/new) example below:

Add multiple versions of react-dom as deps from multiple referenced npm packages; not easily reproduceable w/fiddle

What is the expected behavior?

Error on import, not on render, ideally including version numbers

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

react-dom 16.9.0+16.8.4 in this case; all browsers