facebook/react · error · Error

156

156

Error message

Unknown unit of work tag (${workInProgress.tag}). This error is likely caused by a bug in React. Please file an issue.

What it means

completeWork dispatches on workInProgress.tag via a switch over every known fiber tag; if the tag matches none of the cases (the Throw case only returns in legacy mode), this error is thrown. It signals a fiber whose tag is unknown or corrupted — an internal React contract violation.

Source

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

          ) {
            workInProgress.flags |= ViewTransitionStaticParent;
          } else {
            workInProgress.flags &= ~ViewTransitionStaticParent;
          }
        }
        bubbleProperties(workInProgress);
      }
      return null;
    }
    case Throw: {
      if (!disableLegacyMode) {
        // Only Legacy Mode completes an errored node.
        return null;
      }
    }
  }

  throw new Error(
    `Unknown unit of work tag (${workInProgress.tag}). This error is likely caused by a bug in ` +
      'React. Please file an issue.',
  );
}

export {completeWork};

View on GitHub (pinned to eafeac097b)

Solutions

  1. Dedupe and align React packages: `npm ls react react-dom react-reconciler` and pin a single version.
  2. Upgrade (or pin, if a canary regression) to a version where the tag set is consistent across packages.
  3. If versions are clean, file an issue with the numeric tag value and stack trace.
Defensive patterns

Strategy: try-catch

Validate before calling

// Fail fast at boot on duplicated React copies before any render
import React from 'react';
import ReactDOM from 'react-dom';
if (React.version !== ReactDOM.version) {
  throw new Error(`react ${React.version} vs react-dom ${ReactDOM.version}`);
}

Prevention

When it happens

Trigger: A fiber reaches completeWork with a tag value outside the known set: memory/state corruption, a fiber created by a different (mismatched) react-reconciler version, or an internal regression introducing a tag this build doesn't handle.

Common situations: Multiple copies or mismatched versions of react / react-reconciler / renderer in one bundle; forks or custom renderers built against a different reconciler; rare regressions on canary channels.

Related errors


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