From dfe4fdd0c02ca8972983255cc89e81cce5159a06 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Thu, 8 May 2025 15:46:05 +0300 Subject: [PATCH 1/8] Fixed FAQs to match style guide --- src/content/docs/browser-rendering/faq.mdx | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/content/docs/browser-rendering/faq.mdx b/src/content/docs/browser-rendering/faq.mdx index 61c284f80fb..28f48e52292 100644 --- a/src/content/docs/browser-rendering/faq.mdx +++ b/src/content/docs/browser-rendering/faq.mdx @@ -12,19 +12,29 @@ 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. -##### Uncaught (in response) TypeError: Cannot read properties of undefined (reading 'fetch') +### I see `Cannot read properties of undefined (reading 'fetch')` when using Browser Rendering. How do I fix this? -Make sure that you are passing your Browser binding to the `puppeteer.launch` api and that you have [Workers Paid plan](/workers/platform/pricing/). +This error occurs because your Puppeteer launch is not receiving the Browser binding or you are not on a Workers Paid plan. To resolve: -##### Will browser rendering bypass Cloudflare's Bot Protection? +1. Pass your Browser binding into `puppeteer.launch`, for example: + +``` +import browser from '@cloudflare/workers-browser-rendering'; +const browserInstance = await puppeteer.launch({ + browserWSEndpoint: browser.endpoint, + // other options +}); +``` + +2. Ensure your account is on a [Workers Paid plan](https://developers.cloudflare.com/workers/platform/pricing/) so that Browser Rendering is enabled. + +### 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. Additionally, Browser Rendering respects the robots.txt protocol, ensuring that any disallowed paths specified for user agents are not accessed during rendering. 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. -## Puppeteer - -##### Code generation from strings disallowed for this context while using an Xpath selector +### Why can't I use an XPath selector when using Browser Rendering with Puppeteer? Currently it's not possible to use Xpath to select elements since this poses a security risk to Workers. From 46d7b70381a5bfebda2e31ea23dd2775922cb7fd Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Thu, 8 May 2025 16:01:17 +0300 Subject: [PATCH 2/8] new FAQ questions --- src/content/docs/browser-rendering/faq.mdx | 31 +++++++++++++++------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/src/content/docs/browser-rendering/faq.mdx b/src/content/docs/browser-rendering/faq.mdx index 28f48e52292..580e1e42a5c 100644 --- a/src/content/docs/browser-rendering/faq.mdx +++ b/src/content/docs/browser-rendering/faq.mdx @@ -18,17 +18,9 @@ This error occurs because your Puppeteer launch is not receiving the Browser bin 1. Pass your Browser binding into `puppeteer.launch`, for example: -``` -import browser from '@cloudflare/workers-browser-rendering'; -const browserInstance = await puppeteer.launch({ - browserWSEndpoint: browser.endpoint, - // other options -}); -``` +2. Ensure your account is on a [Workers Paid plan](https:/workers/platform/pricing/) so that Browser Rendering is enabled. -2. Ensure your account is on a [Workers Paid plan](https://developers.cloudflare.com/workers/platform/pricing/) so that Browser Rendering is enabled. - -### Will browser rendering bypass Cloudflare's Bot Protection? +### 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. Additionally, Browser Rendering respects the robots.txt protocol, ensuring that any disallowed paths specified for user agents are not accessed during rendering. @@ -60,3 +52,22 @@ Keep in mind that `page.evaluate` can only return primitive types like strings, Returning an `HTMLElement` will not work. ::: + +### What are the usage limits and pricing tiers for Cloudflare Browser Rendering and how do I estimate my costs? + +#### Usage Limits + +| Plan | Concurrent Browsers | New Instances/min | Browser Timeout | REST API Calls/min | +| :------- | :------------------ | :---------------- | :-------------- | :----------------- | +| **Free** | 3 per account | 3 per minute | 60 s | 6 per minute | +| **Paid** | 10 per account | 10 per minute | 60 s | 60 per minute | + +By default, idle browser sessions close after 60 seconds of inactivity. You can adjust this with the [`keep_alive` option](/browser-rendering/platform/puppeteer/#keep-alive). + +#### Pricing + +Browser Rendering is currently free up to the limits above until billing begins. Pricing will be announced in advance. + +### Does Browser Rendering rotate IP addresses for outbound requests? + +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. From 4da917cc9b3cc479d0e03e0ac6fc8edd9969cb31 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Thu, 8 May 2025 14:03:04 +0100 Subject: [PATCH 3/8] Update faq.mdx --- src/content/docs/browser-rendering/faq.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/docs/browser-rendering/faq.mdx b/src/content/docs/browser-rendering/faq.mdx index 580e1e42a5c..7dc7a618c19 100644 --- a/src/content/docs/browser-rendering/faq.mdx +++ b/src/content/docs/browser-rendering/faq.mdx @@ -18,7 +18,7 @@ This error occurs because your Puppeteer launch is not receiving the Browser bin 1. Pass your Browser binding into `puppeteer.launch`, for example: -2. Ensure your account is on a [Workers Paid plan](https:/workers/platform/pricing/) so that Browser Rendering is enabled. +2. Ensure your account is on a [Workers Paid plan](/workers/platform/pricing/) so that Browser Rendering is enabled. ### Will Browser Rendering bypass Cloudflare's Bot Protection? From 7cf403824891dd7cccdf0625440bd03ff498bcba Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Thu, 8 May 2025 16:16:14 +0300 Subject: [PATCH 4/8] one more question --- src/content/docs/browser-rendering/faq.mdx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/content/docs/browser-rendering/faq.mdx b/src/content/docs/browser-rendering/faq.mdx index 7dc7a618c19..41ec3d8bd5f 100644 --- a/src/content/docs/browser-rendering/faq.mdx +++ b/src/content/docs/browser-rendering/faq.mdx @@ -71,3 +71,11 @@ Browser Rendering is currently free up to the limits above until billing begins. ### Does Browser Rendering rotate IP addresses for outbound requests? 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. + +### 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 2 new browser instances per minute and 2 concurrent browsers; once you exceed those, further creation attempts return a 429 until the next UTC day. To resolve: + +1. [Upgrade to a Workers Paid plan](/workers/platform/pricing/) - Paid accounts raise these limits to 10 concurrent browsers and 10 new instances per minute. +2. Request a higher limit - If you need elevated quotas before billing begins, complete the [Limit Increase Request Form](/browser-rendering/platform/limits/#workers-paid). +3. [Optimize session reuse](/browser-rendering/platform/puppeteer/#keep-alive) - Reconnect to existing browser sessions rather than launching new ones to stay within your limits. From 6c0cac04145fc586fdceaee31232301c0374a8f8 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Fri, 9 May 2025 15:06:53 +0300 Subject: [PATCH 5/8] minor edits --- src/content/docs/browser-rendering/faq.mdx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/content/docs/browser-rendering/faq.mdx b/src/content/docs/browser-rendering/faq.mdx index 41ec3d8bd5f..4f32ab4b611 100644 --- a/src/content/docs/browser-rendering/faq.mdx +++ b/src/content/docs/browser-rendering/faq.mdx @@ -55,12 +55,7 @@ Returning an `HTMLElement` will not work. ### What are the usage limits and pricing tiers for Cloudflare Browser Rendering and how do I estimate my costs? -#### Usage Limits - -| Plan | Concurrent Browsers | New Instances/min | Browser Timeout | REST API Calls/min | -| :------- | :------------------ | :---------------- | :-------------- | :----------------- | -| **Free** | 3 per account | 3 per minute | 60 s | 6 per minute | -| **Paid** | 10 per account | 10 per minute | 60 s | 60 per minute | +You can view the complete breakdown of concurrency caps, request rates, timeouts, and REST API quotas on the [limits page](/browser-rendering/platform/limits/). By default, idle browser sessions close after 60 seconds of inactivity. You can adjust this with the [`keep_alive` option](/browser-rendering/platform/puppeteer/#keep-alive). @@ -74,7 +69,7 @@ No. Browser Rendering requests originate from Cloudflares global network, but yo ### 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 2 new browser instances per minute and 2 concurrent browsers; once you exceed those, further creation attempts return a 429 until the next UTC day. To resolve: +This error indicates you have hit the daily browser-instance limit on the Workers Free plan. [Free-plan accounts are capped at 2 new browser instances per minute and 2 concurrent browsers;](/browser-rendering/platform/limits/#workers-free) once you exceed those, further creation attempts return a 429 until the next UTC day. To resolve: 1. [Upgrade to a Workers Paid plan](/workers/platform/pricing/) - Paid accounts raise these limits to 10 concurrent browsers and 10 new instances per minute. 2. Request a higher limit - If you need elevated quotas before billing begins, complete the [Limit Increase Request Form](/browser-rendering/platform/limits/#workers-paid). From 75d3f7352e091a5c82932c44d6196c2df876ceff Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Fri, 9 May 2025 19:52:54 +0300 Subject: [PATCH 6/8] edits --- src/content/docs/browser-rendering/faq.mdx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/content/docs/browser-rendering/faq.mdx b/src/content/docs/browser-rendering/faq.mdx index 4f32ab4b611..c6366bfc3d5 100644 --- a/src/content/docs/browser-rendering/faq.mdx +++ b/src/content/docs/browser-rendering/faq.mdx @@ -18,8 +18,6 @@ This error occurs because your Puppeteer launch is not receiving the Browser bin 1. Pass your Browser binding into `puppeteer.launch`, for example: -2. Ensure your account is on a [Workers Paid plan](/workers/platform/pricing/) so that Browser Rendering is enabled. - ### 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. Additionally, Browser Rendering respects the robots.txt protocol, ensuring that any disallowed paths specified for user agents are not accessed during rendering. @@ -71,6 +69,4 @@ No. Browser Rendering requests originate from Cloudflares global network, but yo This error indicates you have hit the daily browser-instance limit on the Workers Free plan. [Free-plan accounts are capped at 2 new browser instances per minute and 2 concurrent browsers;](/browser-rendering/platform/limits/#workers-free) once you exceed those, further creation attempts return a 429 until the next UTC day. To resolve: -1. [Upgrade to a Workers Paid plan](/workers/platform/pricing/) - Paid accounts raise these limits to 10 concurrent browsers and 10 new instances per minute. -2. Request a higher limit - If you need elevated quotas before billing begins, complete the [Limit Increase Request Form](/browser-rendering/platform/limits/#workers-paid). -3. [Optimize session reuse](/browser-rendering/platform/puppeteer/#keep-alive) - Reconnect to existing browser sessions rather than launching new ones to stay within your limits. +1. [Upgrade to a Workers Paid plan](/workers/platform/pricing/) - Paid accounts raise these limits to [10 concurrent browsers and 10 new instances per minute](https://developers.cloudflare.com/browser-rendering/platform/limits/#workers-paid). From 1106fbe869af51f531aa0a8da2a0d0cd7b086bf3 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Mon, 12 May 2025 16:43:56 +0100 Subject: [PATCH 7/8] Update faq.mdx --- src/content/docs/browser-rendering/faq.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/content/docs/browser-rendering/faq.mdx b/src/content/docs/browser-rendering/faq.mdx index c6366bfc3d5..bc9f72504d0 100644 --- a/src/content/docs/browser-rendering/faq.mdx +++ b/src/content/docs/browser-rendering/faq.mdx @@ -67,6 +67,6 @@ No. Browser Rendering requests originate from Cloudflares global network, but yo ### 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 2 new browser instances per minute and 2 concurrent browsers;](/browser-rendering/platform/limits/#workers-free) once you exceed those, further creation attempts return a 429 until the next UTC day. To resolve: +This error indicates you have hit the daily browser-instance limit on the Workers Free plan. [Free-plan accounts are capped at 2 new browser instances per minute and 2 concurrent browsers;](/browser-rendering/platform/limits/#workers-free) once you exceed those, further creation attempts return a 429 until the next UTC day. -1. [Upgrade to a Workers Paid plan](/workers/platform/pricing/) - Paid accounts raise these limits to [10 concurrent browsers and 10 new instances per minute](https://developers.cloudflare.com/browser-rendering/platform/limits/#workers-paid). +To resolve:[Upgrade to a Workers Paid plan](/workers/platform/pricing/) - Paid accounts raise these limits to [10 concurrent browsers and 10 new instances per minute](https://developers.cloudflare.com/browser-rendering/platform/limits/#workers-paid). From a6c78c83bfbd3bf5fefc6dc47d80cfe6ef61fe14 Mon Sep 17 00:00:00 2001 From: daisyfaithauma Date: Mon, 12 May 2025 16:54:02 +0100 Subject: [PATCH 8/8] minor edits --- src/content/docs/browser-rendering/faq.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/content/docs/browser-rendering/faq.mdx b/src/content/docs/browser-rendering/faq.mdx index bc9f72504d0..c564f142b3d 100644 --- a/src/content/docs/browser-rendering/faq.mdx +++ b/src/content/docs/browser-rendering/faq.mdx @@ -14,9 +14,9 @@ Below you will find answers to our most commonly asked questions. If you cannot ### 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. To resolve: +This error occurs because your Puppeteer launch is not receiving the Browser binding or you are not on a Workers Paid plan. -1. Pass your Browser binding into `puppeteer.launch`, for example: +To resolve: Pass your Browser binding into `puppeteer.launch`. ### Will Browser Rendering bypass Cloudflare's Bot Protection? @@ -67,6 +67,6 @@ No. Browser Rendering requests originate from Cloudflares global network, but yo ### 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 2 new browser instances per minute and 2 concurrent browsers;](/browser-rendering/platform/limits/#workers-free) once you exceed those, further creation attempts return a 429 until the next UTC day. +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/) - Paid accounts raise these limits to [10 concurrent browsers and 10 new instances per minute](https://developers.cloudflare.com/browser-rendering/platform/limits/#workers-paid). +To resolve:[Upgrade to a Workers Paid plan](/workers/platform/pricing/) - Paid accounts raise these limits to [10 concurrent browsers and 10 new instances per minute](/browser-rendering/platform/limits/#workers-paid).