Hydration Proof

Search documentation

Find a page or section

HP9006: The server HTML could not be captured

HP9006 (body-unavailable) means the document body could not be read, so the checks that start from the server HTML were skipped on that page. What to check.

HP9006 (body-unavailable) means hydration-proof could not read the body of the document response, so the checks that start from the server HTML were skipped on that page. The page was still loaded and hydrated. Look at the reason in the message, and run the page again.

CodeHP9006
Namebody-unavailable
Default severityWarning
GroupTest run problems
What it meansThe document body was not available, so server-side stages could not be compared.

What the HP9006 body unavailable finding means

hydration-proof reads the server HTML from the same navigation the browser makes, never from a second request. When the browser cannot hand over that body, the finding gives its reason after the colon:

The document body could not be read: Reading the document body timed out after 15000ms

Without the body, the first stages of the comparison are missing:

  • invalid nesting the browser repaired (HP3001, HP3002);
  • changes made before hydration (HP4001).

Checks that compare the DOM before and after hydration, and React's own errors, still run. It is a warning, because the page was only partly tested.

Likely causes

  • A streamed response that did not finish in time, for example a Suspense boundary whose data never arrives, so the server keeps the response open.
  • A response the browser did not keep a body for.
  • A server that closed the connection before the end of the document.

How to fix it

  1. Run the page again. If the problem comes and goes, retries loads failed pages again, and --repeat shows how often it happens.
  2. If the response streams for a long time, find the part of the page that keeps it open; the same page often has HP9001.
  3. If the reason in the message points at the server, check the server logs for that request.

Troubleshooting covers other problems with loading pages.