---
title: "Fix Minified React error #418 and #185 from the full message and your source line"
description: "A Minified React error is a number that stands for a longer message. Open the react.dev/errors link it prints to read it. We triggered #418 and #185 in Next.js 16 and fixed both."
canonical: "https://logbrew.co/en/errors/minified-react-error"
last_updated: "2026-11-20"
---

# Fix Minified React error #418 and #185 from the full message and your source line

A Minified React error is a number that stands for a longer message. Open the `react.dev/errors` link it prints to read it. We triggered #418 and #185 in Next.js 16 and fixed both.

Tested on November 20, 2026 with Next.js 16.4.6, React 19.2.7, Chrome 157, and @logbrew/next 0.1.18

By [Furkan Erday](https://github.com/furkanerday). Furkan Erday is the founder of LogBrew. He builds LogBrew with Claude Code and Codex every day.

Canonical: https://logbrew.co/en/errors/minified-react-error

## Which React errors an error boundary caught

| Where the error was thrown | Boundary caught it | Real message in the browser |
| --- | --- | --- |
| Render of a client component | Yes | Yes |
| `useEffect` | Yes | Yes |
| `onClick` handler | No | Yes |
| `setTimeout` callback | No | Yes |
| Async handler, after `await` | No | Yes |
| Server Component | Yes | No, `#441` and a digest |

6 errors in 1 Next.js 16.4.6 production build with React 19.2.7.

## Read the full message, then find the line

### Open the link in the message

Production React leaves the message text out of its bundle and prints a number and a link instead. Open the link. The page at `react.dev/errors` shows the full text and fills in each `args[]` value from the URL. The development build, which `next dev` uses, prints the full text instead.

```bash
"use client";
export function RenderedAt() {
  return <p>Rendered at {Date.now()}</p>;
}
```

Output

```text
Error: Minified React error #418; visit https://react.dev/errors/418?args[]=text&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
```

### #418 means the server HTML did not match the first render

The decoder reads #418 as `Hydration failed because the server rendered text didn't match the client`. `args[]=text` means a text node was different, as with `Date.now()` above. `args[]=HTML` means the elements were different. A `<div>` inside a `<p>` gave us `HTML`, because the browser closes the `<p>` before the `<div>`. In both runs React rendered the browser's version, and the page kept working.

```bash
export default function Page() { return <p>Order total <div>12 USD</div></p>; }
```

Output

```text
Error: Minified React error #418; visit https://react.dev/errors/418?args[]=HTML&args[]= for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
```

### #423 did not appear on React 19.2

The decoder reads #423 as `There was an error while hydrating but React was able to recover by instead client rendering the entire root.` We caused 3 mismatches on React 19.2.7, 1 of them inside `<Suspense>`, and React printed #418 each time, never #423. If your logs show #423, look for the same causes as for #418.

### #185 comes from a layout effect that sets state after every render

The decoder reads #185 as `Maximum update depth exceeded`. Our `useLayoutEffect` with no dependency list set state after each render, React stopped the loop with #185, and Next.js replaced the page with `This page couldn’t load`. The same code in `useEffect` printed no error at all. In 2 runs the counter showed 228,936 and 231,224 when we read the page.

```bash
"use client";
import { useLayoutEffect, useState } from "react";

export default function Page() {
  const [count, setCount] = useState(0);
  useLayoutEffect(() => {
    setCount(count + 1);
  });
  return <p>{count}</p>;
}
```

Output

```text
Error: Minified React error #185; visit https://react.dev/errors/185 for the full message or use the non-minified dev environment for full errors and additional helpful warnings.
```

### Map the stack back to your file with the source map

Set `productionBrowserSourceMaps: true` in `next.config` and build again. Turbopack gives each map its own hashed name, so `resolve.mjs` reads the name from the last line of the chunk, then looks up the position with the `SourceMap` class built into Node. We gave it the 1 frame of the #185 stack outside React, `2-5_qr0vv7do_.js:1:254`, and it named `setCount` on line 7 of our page.

```bash
// node resolve.mjs <chunk.js> <line> <column>
import { readFileSync } from "node:fs";
import { SourceMap } from "node:module";
import { dirname, join } from "node:path";

const [chunk, line, column] = process.argv.slice(2);
const mapName = readFileSync(chunk, "utf8").match(/sourceMappingURL=(\S+)\s*$/)[1];
const map = new SourceMap(JSON.parse(readFileSync(join(dirname(chunk), mapName), "utf8")));
const { originalSource, originalLine, originalColumn, name } = map.findEntry(line - 1, column - 1);
console.log(`${name ?? "?"} ${originalSource}:${originalLine + 1}:${originalColumn + 1}`);
```

Output

```text
setCount turbopack:///[project]/app/loop-layout-effect/page.tsx:7:5
```

## Fix the cause, then catch what is left

### Fix #418 by rendering the same output on the server and on first load

Read browser-only values such as `Date.now()`, `window`, or `localStorage` in `useEffect`. It runs only in the browser, after hydration, so the first render matches the server HTML, and #418 was gone in our run. For a `<div>` inside a `<p>`, change 1 of the 2 tags. A `<span>` inside the `<p>` printed no error.

```bash
"use client";
import { useEffect, useState } from "react";

export function RenderedAt() {
  const [renderedAt, setRenderedAt] = useState<number | null>(null);
  useEffect(() => setRenderedAt(Date.now()), []);
  return <p>Rendered at {renderedAt ?? "…"}</p>;
}
```

### Use `suppressHydrationWarning` only for 1 value you cannot make equal

`suppressHydrationWarning` stopped #418 in our run, but the page kept the server text. It showed the time of the build, not the time in the browser. It works only 1 level deep, and React calls it an escape hatch.

```bash
"use client";
export function RenderedAt() {
  return <p suppressHydrationWarning>Rendered at {Date.now()}</p>;
}
```

### Fix #185 by giving the effect a dependency list

With `[]`, the layout effect ran once and the page showed 1, with no error. List the values the effect reads, and set state only when one of them changed.

```bash
"use client";
import { useLayoutEffect, useState } from "react";

export default function Page() {
  const [count, setCount] = useState(0);
  useLayoutEffect(() => {
    setCount(count + 1);
  }, []);
  return <p>{count}</p>;
}
```

### Catch render errors with an error boundary

An error boundary is a class component. `getDerivedStateFromError` switches it to a fallback, and `componentDidCatch` reports the error. Ours caught the `TypeError` from `taps.map` during render and an error thrown in `useEffect`. It missed errors thrown in an `onClick` handler, in a `setTimeout` callback, and after `await` in an async handler. Those reached the window as uncaught errors, so catch them where you throw them.

```bash
"use client";
import { Component, type ReactNode } from "react";

export class ErrorBoundary extends Component<{ children: ReactNode }, { error: Error | null }> {
  state: { error: Error | null } = { error: null };

  static getDerivedStateFromError(error: Error) {
    return { error };
  }

  componentDidCatch(error: Error) {
    console.error("ErrorBoundary caught:", error.message);
  }

  render() {
    if (this.state.error) return <p>This part of the page failed to load.</p>;
    return this.props.children;
  }
}
```

Output

```text
ErrorBoundary caught: Cannot read properties of undefined (reading 'map')
```

### In Next.js, add `error.tsx` and send the error to LogBrew

Next.js wraps each route segment in an error boundary that renders `error.tsx`. Our `error.tsx` caught the same render error, and `captureNextClientError()` from `@logbrew/next` sent it as 1 issue. The demo passes a recording transport. Leave `transport` out, and the client sends to LogBrew with `fetch`.

```bash
// app/next-error.tsx
"use client";
import { useEffect } from "react";
import { captureNextClientError, createLogBrewNextBrowserClient } from "@logbrew/next/client";
import { RecordingTransport } from "@logbrew/sdk";

const transport = RecordingTransport.alwaysAccept();
const logbrew = createLogBrewNextBrowserClient({
  clientKey: process.env.NEXT_PUBLIC_LOGBREW_CLIENT_KEY,
  transport
});

export function ReportError({ error, route }: { error: Error & { digest?: string }; route: string }) {
  useEffect(() => {
    void captureNextClientError(logbrew, error, { routeTemplate: route }).then((response) => {
      console.log(JSON.stringify(response));
      console.log(transport.lastBody());
    });
  }, [error, route]);
  return <p>This page failed to load.</p>;
}

// app/next-boundary/error.tsx
"use client";
import { ReportError } from "../next-error";

export default function Error({ error }: { error: Error & { digest?: string } }) {
  return <ReportError error={error} route="/next-boundary" />;
}
```

Output

```text
{"statusCode":202,"attempts":1,"batches":1}
```

## What we saw when we tested it

We built 1 Next.js 16.4.6 app with React 19.2.7 using `next build` with Turbopack, served it with `next start`, and opened each page in headless Chrome 157. We caused 3 hydration mismatches, 2 update loops, and 6 errors in different places, then ran each fix on the same build.

Every hydration mismatch printed #418, never #423. Only the layout effect loop printed #185. The error boundary caught 3 of the 6 errors, and the browser saw the real message for 5 of them.

The Server Component error is the odd one. The page answered 500, and the browser got `Minified React error #441` with the `digest` `1331393307` instead of our message. The server log printed `Orders database is down` with the same digest, so the digest leads you to the real error.

Output

```text
⨯ Error: Orders database is down
    at b (.next/server/chunks/ssr/[root-of-the-server]__0e6swfn4zoar-._.js:1:1281) {
  digest: '1331393307'
}
```

## Why production React prints numbers instead of messages

The production build of React keeps only the code of each error to send fewer bytes. The texts live in `scripts/error-codes/codes.json` in the React repository, and the decoder page fills in the arguments from the URL. #441 is different. React leaves out a Server Component's message in production builds on purpose, so details from the server never reach the browser.

The stack is minified too. For #418, a source map helps little. Every frame of our #418 stacks mapped into `react-dom-client.production.js`, and none into our code. The `args[]` value and the component you changed last point to the cause faster.

vercel/next.js#50245 shows why the decoded text matters. It reported Minified React errors that appeared only in production, in May 2023. A maintainer wrote that the people in the thread probably had different problems behind the same message, and the issue was closed in August 2024 without a reproduction. The decoded message and the source line tell those cases apart.

## What LogBrew records

`captureNextClientError()` sent 1 issue titled `TypeError` at level `error`, with the message, the mechanism `nextjs.error_boundary`, and `handled: false`. It kept 10 stack frames, each with its file, line, column, and function. The first frame was `19k2sxe-2yvvy.js` at line 1, column 220, which our source map turned into `taps.map` on line 5 of the page.

LogBrew groups repeats by the error type and that first frame, with the key `nextjs.error_boundary:TypeError:` followed by the chunk URL. The issue kept the message text, and its cause chain entry marked the message `redacted`.

For the Server Component error, the issue carried the #441 message and the `errorDigest` `1331393307`, the same value as in the server log. The chain said `stackFramesState: "not_captured"`, because the browser never had the server stack.

## Questions people ask

### What is a Minified React error?

An error from a production build of React. React replaces the message with a number and a link to `react.dev/errors`, and that page shows the full text. The development build prints the full text directly.

### What does Minified React error #418 mean?

It means hydration failed. The HTML from the server did not match the first render in the browser. `args[]=text` points to a text node, and `args[]=HTML` to the elements. `Date.now()`, `typeof window` checks, dates in the user's locale, and a `<div>` inside a `<p>` all cause it.

### How do I fix a hydration error in a Next.js layout?

Find what differs between the server and the browser in that layout, as for any component. In the root layout, a theme script or a browser extension that changes `<html>` or `<body>` before React loads also causes it. `suppressHydrationWarning` on that element hides the error 1 level deep.

### What does Minified React error #185 mean?

It means the maximum update depth was exceeded. A component set state again and again while React applied its updates. In our run, `useLayoutEffect` with no dependency list caused it. Add a dependency list, or set state only when the value changed.

### What does an error boundary not catch?

In our run it missed errors thrown in an `onClick` handler, in a `setTimeout` callback, and after `await`. It caught errors in render, in `useEffect`, and from a Server Component, but the last one arrived as #441 without its message.

### Why do I see a Minified React error on ChatGPT or another website?

The site runs a production build of React, and its code hit an error. Only its developers can fix that code. A browser extension that changes the page before React loads can also cause #418, so try a private window with extensions turned off.

## Catch every React error in production

The LogBrew Next.js SDK sends each error that reaches error.tsx with its stack frames and the server digest, and LogBrew groups repeats into 1 issue. Start on the generous free tier, no card needed.

[Start Free](https://logbrew.co/en)

## Sources

- [React docs, Error decoder](https://react.dev/errors)
- [React docs, Catching rendering errors with an error boundary](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary)
- [React docs, Common props (suppressHydrationWarning)](https://react.dev/reference/react-dom/components/common#common-props)
- [Next.js docs, Text content does not match server-rendered HTML](https://nextjs.org/docs/messages/react-hydration-error)
- [Next.js docs, error.js](https://nextjs.org/docs/app/api-reference/file-conventions/error)
- [Next.js docs, productionBrowserSourceMaps](https://nextjs.org/docs/app/api-reference/config/next-config-js/productionBrowserSourceMaps)
- [vercel/next.js#50245](https://github.com/vercel/next.js/issues/50245)

## More error fixes

- [Fix the script error that hides its message, file, and line](https://logbrew.co/en/errors/script-error)
- [Fix the Failed to fetch error and tell its 3 causes apart](https://logbrew.co/en/errors/failed-to-fetch)
- [Fix java.lang.NullPointerException in Kotlin and Android from its message](https://logbrew.co/en/errors/nullpointerexception)
- [JavaScript errors and JVM exceptions we reproduced, and how to fix each one](https://logbrew.co/en/errors)
