facebook/react · error · Error

166

166

Error message

We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.

What it means

completeWork() for HostSingleton fibers (DOM singletons such as html, head, body) needs props to create or adopt the instance on a fresh mount. When newProps is falsy, the fiber must already own an instance - that is the abort-work reuse path. A fiber with neither props nor a stateNode cannot be completed and throws.

Source

Thrown at packages/react-reconciler/src/ReactFiberCompleteWork.js:1327

          // $FlowFixMe[constant-condition]
          if (supportsMutation) {
            const oldProps = current.memoizedProps;
            if (oldProps !== newProps) {
              markUpdate(workInProgress);
            }
          } else {
            updateHostComponent(
              current,
              workInProgress,
              type,
              newProps,
              renderLanes,
            );
          }
        } else {
          if (!newProps) {
            if (workInProgress.stateNode === null) {
              throw new Error(
                'We must have new props for new mounts. This error is likely ' +
                  'caused by a bug in React. Please file an issue.',
              );
            }

            // This can happen when we abort work.
            bubbleProperties(workInProgress);
            if (enableViewTransition) {
              // Host Components act as their own View Transitions which doesn't run enter/exit animations.
              // We clear any ViewTransitionStatic flag bubbled from inner View Transitions.
              workInProgress.subtreeFlags &= ~ViewTransitionStatic;
            }
            return null;
          }

          const currentHostContext = getHostContext();
          const wasHydrated = popHydrationState(workInProgress);
          let instance: Instance;

View on GitHub (pinned to eafeac097b)

Solutions

  1. Update React - abort-reuse bugs around host singletons are fixed in canary cycles
  2. Avoid unmounting and remounting the document-level tree mid-transition
  3. Reproduce with StrictMode off to see whether double-invocation is involved, and report it
  4. File an issue if it persists on the latest build
Defensive patterns

Strategy: try-catch

Try / catch

Render-phase invariant: an ErrorBoundary may catch it, but the fiber state is corrupt - log via onUncaughtError and remount the root rather than retrying the same tree.

Prevention

When it happens

Trigger: An interrupted render (startTransition, Suspense abort) leaves a HostSingleton fiber without props and without an instance, and work later resumes on it - an internal bug in the abort/reuse logic; also hydration where the singleton instance was never resolved.

Common situations: Canary React rendering document-level singletons; concurrent renders aborted mid-flight; StrictMode double-invocation on canary builds.

Related errors


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