vercel/next.js · error

NEXT_DEVTOOLS_SIMULATED_ERROR

Error message

NEXT_DEVTOOLS_SIMULATED_ERROR

What it means

This is a deliberate sentinel error, not a bug: the Next.js DevTools segment explorer's ErrorSegmentNode component always throws SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE so developers can preview how the dev overlay and segment tree display thrown errors.

Source

Thrown at packages/next/src/next-devtools/userspace/app/segment-explorer-node.tsx:67

  // Use `useLayoutEffect` to ensure the state is updated during suspense.
  // `useEffect` won't work as the state is preserved during suspense.
  useLayoutEffect(() => {
    dispatcher.segmentExplorerNodeAdd(nodeState)
    return () => {
      dispatcher.segmentExplorerNodeRemove(nodeState)
    }
  }, [nodeState])

  return null
}

function NotFoundSegmentNode(): React.ReactNode {
  notFound()
}

function ErrorSegmentNode(): React.ReactNode {
  throw new Error(SEGMENT_EXPLORER_SIMULATED_ERROR_MESSAGE)
}

const forever = new Promise(() => {})
function LoadingSegmentNode(): React.ReactNode {
  use(forever)
  return null
}

export function SegmentViewStateNode({ page }: { page: string }) {
  const { tree } = useContext(GlobalLayoutRouterContext)
  useLayoutEffect(() => {
    dispatcher.segmentExplorerUpdateRouteState(page, tree)
    return () => {
      dispatcher.segmentExplorerUpdateRouteState('', null)
    }
  }, [page, tree])
  return null
}

View on GitHub (pinned to 0eb3775416)

Solutions

  1. This is a simulated dev-tools test error; ignore it or disable the devtools simulation.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: The devtools segment explorer throws its simulated error.

Common situations: A deliberately thrown error used to test the dev overlay in development tooling.


AI-assisted analysis of vercel/next.js@0eb3775416 (2026-08-19). Data as JSON: /api/errors/7a99c443f034e020. Report an issue: GitHub.