Skip to content
Merged
83 changes: 37 additions & 46 deletions src/content/docs/browser-rendering/faq.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,53 @@ import { GlossaryTooltip } from "~/components";

Below you will find answers to our most commonly asked questions. If you cannot find the answer you are looking for, refer to the [Discord](https://discord.cloudflare.com) to explore additional resources.

### I see `Cannot read properties of undefined (reading 'fetch')` when using Browser Rendering. How do I fix this?
---

This error occurs because your Puppeteer launch is not receiving the Browser binding or you are not on a Workers Paid plan.
## Getting started & Development

### Does local development support all Browser Rendering features?

Not yet. Local development currently has the following limitation(s):
- Requests larger than 1 MB are not supported.

To resolve: Pass your Browser binding into `puppeteer.launch`.
For full feature access, use `npx wrangler dev --remote`.

### Will Browser Rendering bypass Cloudflare's Bot Protection?

No, Browser Rendering requests are always identified as bots by Cloudflare and do not bypass Bot Protection.

If you are attempting to scan your **own zone** and need Browser Rendering to access areas protected by Cloudflare’s Bot Protection, you can create a [WAF skip rule](/waf/custom-rules/skip/) to bypass the bot protection using a header or a custom user agent.

### Does Browser Rendering rotate IP addresses for outbound requests?

No. Browser Rendering requests originate from Cloudflare's global network and you cannot configure per-request IP rotation. All rendering traffic comes from Cloudflare IP ranges and requests include [automatic headers](/browser-rendering/reference/automatic-request-headers/), such as `cf-biso-request-id` and `cf-biso-devtools` so origin servers can identify them.

### Is there a limit to how many requests a single browser session can handle?

There is no fixed limit on the number of requests per browser session. A single browser can handle multiple requests as long as it stays within available compute and memory limits.

### How can I manage concurrency and session isolation with Browser Rendering?

If you are hitting concurrency [limits](/browser-rendering/platform/limits/#workers-paid), or want to optimize concurrent browser usage with the [Workers Binding method](/browser-rendering/workers-bindings/), here are a few tips:

- Optimize with tabs or shared browsers: Instead of launching a new browser for each task, consider opening multiple tabs or running multiple actions within the same browser instance.
- [Reuse sessions](/browser-rendering/workers-bindings/reuse-sessions/): You can optimize your setup and decrease startup time by reusing sessions instead of launching a new browser every time. If you are concerned about maintaining test isolation (for example, for tests that depend on a clean environment), we recommend using [incognito browser contexts](https://pptr.dev/api/puppeteer.browser.createbrowsercontext), which isolate cookies and cache with other sessions.

If you are still running into concurrency limits you can [request a higher limit](https://forms.gle/CdueDKvb26mTaepa9).

---

## Errors & Troubleshooting

### I see `Cannot read properties of undefined (reading 'fetch')` when using Browser Rendering. How do I fix this?

This error typically occurs because your Puppeteer launch is not receiving the Browser binding. To resolve: Pass your Browser binding into `puppeteer.launch`.

### Why can't I use an XPath selector when using Browser Rendering with Puppeteer?

Currently it is not possible to use Xpath to select elements since this poses a security risk to Workers.

As an alternative try to use a css selector or `page.evaluate` for example:
As an alternative, try to use a css selector or `page.evaluate`. For example:

```ts
const innerHtml = await page.evaluate(() => {
Expand All @@ -45,55 +75,16 @@ const innerHtml = await page.evaluate(() => {

:::note

Keep in mind that `page.evaluate` can only return primitive types like strings, numbers, etc.

Returning an `HTMLElement` will not work.
Keep in mind that `page.evaluate` can only return primitive types like strings, numbers, etc. Returning an `HTMLElement` will not work.

:::

### What are the usage limits for Browser Rendering and how do I estimate my costs?

You can view the complete breakdown of concurrency caps, request rates, timeouts, and REST API quotas on the [limits page](/browser-rendering/platform/limits/).

You can monitor your Browser Rendering usage in the [Cloudflare dashboard](https://dash.cloudflare.com). Go to **Compute (Workers)** > **Browser Rendering**. Then, you can use [the pricing page](/browser-rendering/platform/pricing/) to estimate your costs.

### Does Browser Rendering rotate IP addresses for outbound requests?
### Why is my screenshot blurry?

No. Browser Rendering requests originate from Cloudflares global network, but you cannot configure per-request IP rotation. All rendering traffic comes from Cloudflare IP ranges and requests include special headers [(`cf-biso-request-id`, `cf-biso-devtools`)](/browser-rendering/reference/automatic-request-headers/) so origin servers can identify them.
It may be because you increased the height and width of the viewport. To fix this, increase the value of the `deviceScaleFactor` (default is 1).

### I see `Error processing the request: Unable to create new browser: code: 429: message: Browser time limit exceeded for today`. How do I fix it?

This error indicates you have hit the daily browser-instance limit on the Workers Free plan. [Free-plan accounts are capped at free plan limit is 10 minutes of browser use a day](/browser-rendering/platform/limits/#workers-free) once you exceed those, further creation attempts return a 429 until the next UTC day.

To resolve: [Upgrade to a Workers Paid plan](/workers/platform/pricing/) which allows for more than 10 minutes of usage a day and has higher [limits](/browser-rendering/platform/limits/#workers-paid). If you recently upgraded but still see this error, try redeploying your Worker to ensure your usage is correctly associated with your new plan.

### Does local development support all Browser Rendering features?

Not yet. Local development currently has the following limitation(s):
- Requests larger than 1 MB are not supported.

For full feature access, use `npx wrangler dev --remote`.

### I upgraded from the Workers Free plan, but I'm still hitting the 10-minute per day limit. What should I do?

If you recently upgraded to the Workers Paid plan to increase your Browser Rendering usage limits, but you're still encountering the 10-minute per day cap, try redeploying your Worker. This ensures your usage is correctly associated with your new plan.

### Why is my screenshot blurry?

If your screenshot is blurry, it may be because you increased the height and width of the viewport. To fix this, increase the value of the `deviceScaleFactor` (default is 1).

### How can I manage concurrency and session isolation with Browser Rendering?

If you are hitting concurrency limits, or would like to better manage concurrent browser usage with the [Workers Binding method](/browser-rendering/workers-bindings/), here are a few tips:

- Optimize with tabs or shared browsers: Instead of launching a new browser for each task, consider opening multiple tabs or running multiple actions within the same browser instance.
- [Reuse sessions](/browser-rendering/workers-bindings/reuse-sessions/): You can optimize your setup and decrease startup time by reusing sessions instead of launching a new browser every time. If you are concerned about maintaining test isolation, for example for tests that depend on a clean environment, we recommend using [incognito browser contexts](https://pptr.dev/api/puppeteer.browser.createbrowsercontext), which isolate cookies and cache with other sessions.

If you are still running into concurrency limits you can [request a higher limit](https://forms.gle/CdueDKvb26mTaepa9).

### Is there a limit to how many requests a single browser session can handle?

No, there is not a fixed limit on the number of requests per browser session. A single browser can handle multiple requests as long as it stays within the available compute and memory limits.

### Do failed API calls, such as those that time out, add to billable browser hours?
No. If a request to the Browser Rendering REST API fails with a `waitForTimeout` error, the browser session is not charged.
15 changes: 15 additions & 0 deletions src/content/docs/browser-rendering/platform/limits.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,18 @@ By default, a browser will time out if it does not get any [devtools](https://ch
## Note on concurrency

While the limits above define the maximum number of concurrent browser sessions per account, in practice you may not need to hit these limits. Browser sessions close automatically—by default, after 60 seconds of inactivity or upon task completion—so if each session finishes its work before a new request comes in, the effective concurrency is lower. This means that most workflows do not require very high concurrent browser limits.

## FAQ

### I upgraded from the Workers Free plan, but I'm still hitting the 10-minute per day limit. What should I do?

If you recently upgraded to the [Workers Paid plan](/workers/platform/pricing/) but still encounter the 10-minute per day limit, redeploy your Worker to ensure your usage is correctly associated with the new plan.

### How can I manage concurrency and session isolation with Browser Rendering?

If you are hitting concurrency [limits](/browser-rendering/platform/limits/#workers-paid), or want to optimize concurrent browser usage with the [Workers Binding method](/browser-rendering/workers-bindings/), here are a few tips:

- Optimize with tabs or shared browsers: Instead of launching a new browser for each task, consider opening multiple tabs or running multiple actions within the same browser instance.
- [Reuse sessions](/browser-rendering/workers-bindings/reuse-sessions/): You can optimize your setup and decrease startup time by reusing sessions instead of launching a new browser every time. If you are concerned about maintaining test isolation (for example, for tests that depend on a clean environment) we recommend using [incognito browser contexts](https://pptr.dev/api/puppeteer.browser.createbrowsercontext), which isolate cookies and cache with other sessions.

If you are still running into concurrency limits you can [request a higher limit](https://forms.gle/CdueDKvb26mTaepa9).
11 changes: 10 additions & 1 deletion src/content/docs/browser-rendering/platform/pricing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can monitor your Browser Rendering usage in the [Cloudflare dashboard](https
Cloudflare calculates concurrent browsers as the **monthly average of your daily peak usage**. In other words, we record **the peak number of concurrent browsers each day** and then average those values over the month. This approach reflects your typical traffic and ensures you are not disproportionately charged for brief spikes in browser concurrency.
</Details>

### Examples of Workers Paid pricing
## Examples of Workers Paid pricing
<br/>
#### Example: REST API pricing
If a Workers Paid user uses the REST API for 50 hours during the month, the estimated cost for the month is as follows.
Expand All @@ -47,3 +47,12 @@ For **concurrent browsers**:

For **browser duration** and **concurrent browsers**:
<br/>$3.60 + $10.00 = $13.60

## FAQ

### How do I estimate my Browser Rendering costs?

You can monitor your Browser Rendering usage in the [Cloudflare dashboard](https://dash.cloudflare.com). Go to **Compute (Workers)** > **Browser Rendering**. Then, you can use [the pricing page](/browser-rendering/platform/pricing/) to estimate your costs.

### Do failed API calls, such as those that time out, add to billable browser hours?
No. If a request to the Browser Rendering REST API fails with a `waitForTimeout` error, the browser session is not charged.
Loading