# Missing Croct context

Resolve the error about the missing Croct request context.

If a loader or action throws an error like the one below, the SDK could not find the visitor context on the load context it received:

> **Error**
>
> Croct's request context is missing. Did you configure Croct's middleware (React Router) or `createCroctContext` (Remix)?

This happens when the request context was never resolved for the request, so the functions that [fetch content](/reference/sdk/hydrogen/api/functions/fetch-content) and [evaluate expressions](/reference/sdk/hydrogen/api/functions/evaluate) have no visitor to act on.

## Solution

Wire the request context for your setup, as described in the [manual installation guide](/reference/sdk/hydrogen/manual-installation#context):

- On **[React Router 7](https://reactrouter.com)**, register the [middleware](/reference/sdk/hydrogen/api/setup/create-croct-middleware) on your root route.
- On **[Remix](https://remix.run)**, build the context with the [context helper](/reference/sdk/hydrogen/api/setup/create-croct-context) in your [`getLoadContext`](https://shopify.dev/docs/api/hydrogen/latest/utilities/createrequesthandler) wrapper and merge it under the Croct key.

If you already wired it, make sure the loader or action reads the same context argument it receives, and that the middleware is registered on the **root** route so it runs for every request.
