# Browser limits and errors

## Limits

- Browser Definitions and actions require the Cloudflare preset.
- A Browser action waits 30 seconds by default. Timeout fields in the action input raise this to at most 6 minutes plus 30 seconds of grace.
- The Kitesurf engine has no idle timeout and no live handoff.
- Handoff refs expire after 60 seconds by default. Change it with `policy.handoffTtl` on `createBrowser()` or `ttl` on `session.handoff()`.

## Errors

### BROWSER_UNAVAILABLE

The build does not turn on Browser, so a Browser Definition or action cannot run. `runBrowserAction()` returns it in a `500` response. `runBrowser()` and Definitions throw it. `error.details` has the `preset`, the `reason`, and the `fix`. On Cloudflare, set `browser: true` in `vitehub()`. Other presets have no Browser provider, so check `isBrowserAvailable()` first. See [Builds without Browser](https://vitehub.dev/docs/browser/hosts#builds-without-browser).

## Production checks

Run browser automation only from trusted server code. A session can see logged-in pages, cookies, screenshots, network responses, and private UI.

> [!WARNING]
> When a request gives the URL, checking only the first URL is not enough. Check the protocol, host, and resolved address of every request, including redirects and subresources, or limit network access at the provider. Treat the page as untrusted input.

Do not log provider session ids, CDP endpoints, cookies, authorization headers, or raw handoff refs. Screenshots and downloads are user data: apply your artifact storage, retention, and approval rules.

Inspect the generated `wrangler.json` before you deploy, and test the deployed Worker. A good build proves imports and generated output, not that the provider works. Run `vitehub inspect definitions` to list Browser Definitions.

<!-- vitehub-docs:section-links -->
## In this section

- [Overview](https://vitehub.dev/raw/docs/browser.md)
- [Get started](https://vitehub.dev/raw/docs/browser/get-started.md)
- [Configure](https://vitehub.dev/raw/docs/browser/configure.md)
- [Server API](https://vitehub.dev/raw/docs/browser/server-api.md)
- [Agent capability](https://vitehub.dev/raw/docs/browser/agent-capability.md)
- [Hosts](https://vitehub.dev/raw/docs/browser/hosts.md)
- [Limits and errors](https://vitehub.dev/raw/docs/browser/limits-and-errors.md) (this page)

Next: [BROWSER_R0008](https://vitehub.dev/raw/docs/browser/diagnostics/browser_r0008.md)

All pages: [llms.txt](https://vitehub.dev/llms.txt)
