You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/browser-rendering/faq.mdx
+16-6Lines changed: 16 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,19 +12,29 @@ import { GlossaryTooltip } from "~/components";
12
12
13
13
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.
14
14
15
-
##### Uncaught (in response) TypeError: Cannot read properties of undefined (reading 'fetch')
15
+
###I see `Cannot read properties of undefined (reading 'fetch')` when using Browser Rendering. How do I fix this?
16
16
17
-
Make sure that you are passing your Browser binding to the `puppeteer.launch` api and that you have [Workers Paid plan](/workers/platform/pricing/).
17
+
This error occurs because your Puppeteer launch is not receiving the Browser binding or you are not on a Workers Paid plan. To resolve:
18
18
19
-
##### Will browser rendering bypass Cloudflare's Bot Protection?
19
+
1. Pass your Browser binding into `puppeteer.launch`, for example:
20
+
21
+
```
22
+
import browser from '@cloudflare/workers-browser-rendering';
23
+
const browserInstance = await puppeteer.launch({
24
+
browserWSEndpoint: browser.endpoint,
25
+
// other options
26
+
});
27
+
```
28
+
29
+
2. Ensure your account is on a [Workers Paid plan](https://developers.cloudflare.com/workers/platform/pricing/) so that Browser Rendering is enabled.
30
+
31
+
### Will browser rendering bypass Cloudflare's Bot Protection?
20
32
21
33
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.
22
34
23
35
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.
24
36
25
-
## Puppeteer
26
-
27
-
##### Code generation from strings disallowed for this context while using an Xpath selector
37
+
### Why can't I use an XPath selector when using Browser Rendering with Puppeteer?
28
38
29
39
Currently it's not possible to use Xpath to select elements since this poses a security risk to Workers.
0 commit comments