Skip to content

DevTools: Crashes and warnings when quickly collapsing #16487

@bvaughn

Description

@bvaughn

This is weird. Happens if I select a node deeply and then long-press "left" arrow.

Invalid index 154 specified; store contains 154 items.

Uncaught Invariant Violation: Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.
    at ReactError (file:///Users/gaearon/p/react-devtools-experimental/shells/dev/build/devtools.js:8529:40)

It starts with "invalid index" and then gives me different React invariants or warnings depending on how lucky I am.

Screen Recording 2019-04-25 at 05 58 PM


More weird symptoms:

Screen Shot 2019-04-25 at 6 38 22 PM


Screen Shot 2019-04-25 at 6 41 37 PM


This "fixes" it:

       runWithPriority(UserBlockingPriority, () => dispatch(action));
-      next(() => dispatch({ type: 'UPDATE_INSPECTED_ELEMENT_ID' }));
+      runWithPriority(UserBlockingPriority, () => dispatch({ type: 'UPDATE_INSPECTED_ELEMENT_ID' }));
     },

So I suspect it's a bug with Scheduler.next().


This also looks funky. Note how somewhere in the middle right pane gets "stuck" showing the same cycle of values:

Screen Recording 2019-04-25 at 07 36 PM


React bug: #15512


Originally reported by @gaearon via bvaughn/react-devtools-experimental#228

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions