facebook/react · error · Error

Unsupported instance kind

Error message

Unsupported instance kind

What it means

react-devtools-shared's Fiber backend resolves an element ID to a DevToolsInstance and inspectElementRaw() only knows how to inspect two kinds: VIRTUAL_INSTANCE (Flight/server-graph virtual nodes) and FIBER_INSTANCE (real Fibers). Anything else - today FILTERED_FIBER_INSTANCE (elements hidden by component filters) or a kind introduced by a newer backend - falls through the exhaustive check and throws. It is an internal invariant meaning the backend was asked to inspect an instance kind it deliberately does not support.

Source

Thrown at packages/react-devtools-shared/src/backend/fiber/renderer.js:6039

  }

  function inspectElementRaw(id: number): InspectedElement | null {
    const devtoolsInstance = idToDevToolsInstanceMap.get(id);
    if (devtoolsInstance === undefined) {
      console.warn(`Could not find DevToolsInstance with id "${id}"`);
      return null;
    }
    if (devtoolsInstance.kind === VIRTUAL_INSTANCE) {
      return inspectVirtualInstanceRaw(devtoolsInstance);
    }
    if (devtoolsInstance.kind === FIBER_INSTANCE) {
      const isRoot = devtoolsInstance.parent === null;
      return isRoot
        ? inspectRootsRaw(devtoolsInstance.id)
        : inspectFiberInstanceRaw(devtoolsInstance);
    }
    devtoolsInstance as FilteredFiberInstance; // assert exhaustive
    throw new Error('Unsupported instance kind');
  }

  function inspectFiberInstanceRaw(
    fiberInstance: FiberInstance,
  ): InspectedElement | null {
    const fiber = fiberInstance.data;
    if (fiber == null) {
      return null;
    }

    const {
      stateNode,
      key,
      memoizedProps,
      memoizedState,
      dependencies,
      tag,
      type,

View on GitHub (pinned to eafeac097b)

Solutions

  1. Clear the current selection and re-select a visible (unfiltered) element, or reload the page with DevTools open so stale selections are dropped.
  2. Make sure the DevTools extension and any embedded react-devtools-shared package are the same version (the DevToolsInstance kind set must match on both sides).
  3. If you embed devtools-shared, mirror the kind checks at renderer.js:6029-6037 - only call inspectElementRaw for FIBER_INSTANCE/VIRTUAL_INSTANCE ids.
  4. If it reproduces with matched versions and no filters, file a React DevTools issue with the filter config and steps.

Example fix

// before (custom frontend, sends inspect for any stored id)
bridge.send('inspectElement', {id: selectedID, rendererID});

// after (only inspect ids the backend still reports as visible elements)
const element = store.getElementByID(selectedID);
if (element != null && !isFilteredOut(element)) {
  bridge.send('inspectElement', {id: selectedID, rendererID});
}
Defensive patterns

Strategy: type-guard

Validate before calling

// before sending 'inspectElement' over the bridge, confirm the id is still a visible element
const element = store.getElementByID(id);
if (element == null || store.isFilteredOut(element)) {
  console.warn('Skipping inspect for filtered/gone element', id);
} else {
  bridge.send('inspectElement', {id, rendererID});
}

Type guard

function isInspectableInstance(instance) {
  return (
    instance != null &&
    (instance.kind === 'FIBER_INSTANCE' || instance.kind === 'VIRTUAL_INSTANCE')
  );
}

Prevention

When it happens

Trigger: A bridge 'inspectElement' request (selecting an element in the Components tree, hovering a highlight, re-inspecting a persisted selection) where idToDevToolsInstanceMap.get(id).kind is FILTERED_FIBER_INSTANCE - e.g. the selection predates applying hide-filters or the Activity filter - or a version-skewed frontend/backend where the kind enum has new members.

Common situations: Enabling 'hide components matching' filters while an element stays selected; restoring a persisted selection across a reload with different filter settings; mixing the DevTools browser extension with an embedded react-devtools-shared build of a different version.

Related errors


AI-assisted analysis of facebook/react@eafeac097b (2026-08-21). Data as JSON: /api/errors/4975c9354f5d7f32. Report an issue: GitHub.