HP9008 (no-root) means a React renderer loaded on the page, but the page never
created a React root before the timeout: hydrateRoot and createRoot were
never called. Nothing was hydrated, so nothing was tested. Usually the app's
entry script stopped early; check the page's console errors and failed
requests.
| Code | HP9008 |
|---|---|
| Name | no-root |
| Default severity | Warning |
| Group | Test run problems |
| What it means | A React renderer was injected but no root was created before the timeout. |
What the HP9008 no root finding means
hydration-proof sees React register with the page, and then waits for a root. If none appears a few seconds after the page finished loading, it reports:
React loaded but never mounted a root.It is a warning. Compare it with its neighbors:
| Code | React loaded | Root created |
|---|---|---|
| HP9002 | no | no |
| HP9008 | yes | no |
| HP9003 | yes | a client root, nothing hydrated |
| HP9001 | yes | yes, hydration did not finish |
Likely causes
- The entry script threw before it called
hydrateRoot; the page usually also has HP2007. - A script chunk with the entry failed to load.
- The entry waits for something before it mounts (a feature flag, an auth check, a config request) that never answers in the test environment.
- React was loaded by a third-party widget on a page that is not a React app.
How to fix it
- Open the route with
--headedand check the console and the network tab. - Fix the error or the failed request that stops the entry.
- If the entry waits for an API, make the API available to the test, or answer
the request with
mocksin the scenario (see scenarios).
npx hydration-proof test --route /dashboard --headed --workers 1