-
Notifications
You must be signed in to change notification settings - Fork 13.2k
[Browser Rendering] Errors doc #28614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: production
Are you sure you want to change the base?
Changes from 10 commits
be4a13c
3d3a33e
7196aca
428a6f4
eb35a3c
f495b83
da66302
5a802cb
e058922
cbcc04c
a6dc998
11e5a6e
8a242eb
dc16dae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| --- | ||
| title: Errors | ||
| pcx_content_type: reference | ||
| sidebar: | ||
| order: 13 | ||
| --- | ||
|
|
||
| import { Plan } from "~/components"; | ||
|
|
||
| <Plan type="workers-all" /> | ||
|
|
||
| This page provides a reference for error codes you may encounter when using Browser Rendering. | ||
|
|
||
|
|
||
| ## Service-level errors | ||
|
|
||
| Service-level errors occur when Browser Rendering cannot fulfill a request due to system availability, authentication, or resource constraints. These errors apply to both the [REST API](/browser-rendering/rest-api/) and [Workers Bindings](/browser-rendering/workers-bindings/). | ||
|
|
||
| | HTTP code | Internal code | Error | Description | Recommended fix | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. general table question. do we purposely have periods in each box?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kathayl Since some of the cells have multiple sentences, those need periods. And if some of them have periods, I think all of them should have periods for consistency. afaik there's no specific rule about it other than consistency. |
||
| | --- | --- | --- | --- | --- | | ||
| | `400` | - | `Bad Request` | The request is malformed or contains invalid parameters. | Refer to the [REST API documentation](/browser-rendering/rest-api/). | | ||
|
||
| | `401` | `10000` | `Authentication failed` | Authentication credentials are invalid or missing. | Verify your API token exists and has `Browser Rendering - Edit` permissions. Refer to [REST API prerequisites](/browser-rendering/rest-api/#before-you-begin). | | ||
| | `408` | - | `Request timed out` | The request exceeded the allowed time limit. | Increase timeout settings. Refer to [REST API timeouts](/browser-rendering/reference/timeouts/). | | ||
| | `413` | - | `Error: request entity too large` | The request body exceeds the maximum allowed size (50 MB for PDF endpoint). | Reduce request payload size by hosting assets externally (such as on [R2](/r2/) or [Images](/images/)) and referencing via URLs instead of embedding them inline. Refer to [PDF endpoint request size limits](/browser-rendering/rest-api/pdf-endpoint/). | | ||
|
||
| | `422` | - | `Unprocessable Entity` | Browser Rendering could not complete the action because of an issue with the target site. | Refer to [422 Unprocessable Entity](/browser-rendering/faq/#error-422-unprocessable-entity). | | ||
| | `429` | - | `Rate limit exceeded.` | You have exceeded the [rate limit](/browser-rendering/limits/#understanding-rate-limits) for your plan. | Refer to [429 Rate limit exceeded](/browser-rendering/limits/#error-429-rate-limit-exceeded). | | ||
| | `429` | - | `Browser time limit exceeded for today` | Daily browser time limit exceeded (Workers Free plan only: 10 minutes per day). | Refer to [429 Browser time limit exceeded](/browser-rendering/limits/#error-429-browser-time-limit-exceeded-for-today). | | ||
ToriLindsay marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| | `500` | `2000` | `Internal Error` | An unexpected issue occurred on the Browser Rendering service. | Retry your request. If the issue persists, check [Cloudflare Status](https://www.cloudflarestatus.com) or [contact Cloudflare Support](/support/contacting-cloudflare-support/). | | ||
| | `503` | - | `No browser available. Please try again in a few minutes.` | Browser Rendering cannot provision a browser instance. | Retry your request after a few minutes. If the issue persists, [contact Cloudflare Support](/support/contacting-cloudflare-support/). | | ||
|
|
||
| ## Chrome network errors | ||
|
|
||
| Chrome network errors occur when the browser encounters issues loading the target website. These errors come directly from Chrome and use the `net::` prefix. | ||
|
|
||
| | Internal code | Error | Description | Recommended fix | | ||
| | --- | --- | --- | --- | | ||
| | `5000` | `net::ERR_CERT_INVALID`, `net::ERR_CERT_COMMON_NAME_INVALID` | Certificate or SSL error. | Verify the target site has a valid SSL certificate with correct hostname. | | ||
| | `5001` | `net::ERR_ADDRESS_UNREACHABLE` | The address is unreachable. | Check if the domain exists or if the site is blocked by firewalls or network policies. | | ||
| | `5002` | `net::ERR_ABORTED` | The network connection was aborted. | Check if the site is blocked by firewalls or network policies. | | ||
| | `5002` | `net::ERR_CONNECTION_TIMED_OUT`, `net::ERR_TIMED_OUT` | The connection timed out. | Verify the target site is responding and not experiencing performance issues. | | ||
| | `5003` | `net::ERR_TOO_MANY_REDIRECTS` | The page has too many redirects. | If you control the site, fix the redirect configuration. | | ||
| | `5004` | `net::ERR_HTTP2_PROTOCOL_ERROR` | HTTP/2 protocol error. | If you control the site, check server HTTP/2 configuration. | | ||
| | `5005` | `net::ERR_NAME_NOT_RESOLVED`, `net::ERR_DNS_TIMED_OUT` | DNS resolution failed. | Verify the domain exists and DNS records are configured correctly. Check for typos in the URL. | | ||
| | `5006` | `net::ERR_CONNECTION_CLOSED`, `net::ERR_CONNECTION_RESET`, `net::ERR_TUNNEL_CONNECTION_FAILED` | The network connection was closed. Can also happen due to DNS resolution failure or bot/WAF blocking. | Verify the target site is operational and not blocking automated requests. Check if the site has WAF or bot protection rules that may be blocking Browser Rendering. Also verify DNS records if the issue persists. | | ||
| | `5007` | `net::ERR_HTTP_RESPONSE_CODE_FAILURE` | HTTP error with empty response body. | If you control the site, check server error page configuration. | | ||
| | `5008` | `net::ERR_CONNECTION_REFUSED` | The server refused the connection. | Verify the web service is running and accessible. | | ||
| | `5009` | `net::` errors | A general network error occurred when attempting to load the page. | Review the specific error message for details. Verify the target site is accessible and network connectivity is stable. | | ||
| | `5010` | `net::ERR_INVALID_URL`, `net::ERR_BLOCKED_BY_ADMINISTRATOR`, `net::ERR_FILE` | The URL is invalid or blocked. | Verify the URL format is correct. Browser Rendering does not support `file://` URLs or URLs blocked by security policies. | | ||
| | `5011` | `net::ERR_EMPTY_RESPONSE` | The server returned an empty response. | If you control the site, check server logs for crashes or configuration issues. | | ||
|
|
||
| ## Browser automation errors | ||
|
|
||
| Browser automation errors occur during browser operations when using [Puppeteer](/browser-rendering/puppeteer/) or [Playwright](/browser-rendering/playwright/). These errors are related to the Chrome DevTools Protocol (CDP). | ||
|
|
||
| | Internal code | Error | Description | Recommended fix | | ||
| | --- | --- | --- | --- | | ||
| | `6000` | `Execution context was destroyed`, `Navigating frame was detached` | The execution context was destroyed, most likely because of a navigation or page reload. | Add [wait conditions](/browser-rendering/reference/timeouts/) or retry logic to handle navigation timing. | | ||
|
||
| | `6001` | `TargetCloseError` | The target closed due to user or site actions, or excessive memory consumption. | Check if the site calls `window.close()` or consumes excessive memory. Refer to [browser close reasons](/browser-rendering/reference/browser-close-reasons/). | | ||
| | `6002` | `TimeoutError`, `Navigation timeout`, `timed out`, `Waiting failed: .* exceeded` | A timeout was reached during a browser operation. | Increase the relevant [timeout settings](/browser-rendering/reference/timeouts/) for your operation (page load, element wait, or action timeout). | | ||
| | `6003` | `Page.captureScreenshot`, `Page.printToPDF`, `Page is too large`, `Unable to capture screenshot` | Failed to capture screenshot or generate PDF. The page may be too large or in an invalid state. | Reduce page size, simplify content, or adjust [screenshot](/browser-rendering/rest-api/screenshot-endpoint/) or [PDF](/browser-rendering/rest-api/pdf-endpoint/) parameters. | | ||
|
||
| | - | `Page crashed!` | The browser instance crashed, often due to memory issues or page complexity. | Reduce page complexity, limit heavy JavaScript, or simplify the page to lower memory consumption. | | ||
|
|
||
| ## Platform errors | ||
|
|
||
| Platform errors occur at the [Workers platform](/workers/) level before Browser Rendering code runs. | ||
|
|
||
| | Error | Description | Recommended fix | | ||
| | --- | --- | --- | | ||
| | `Cannot read properties of undefined (reading 'fetch')` | The [browser binding](/browser-rendering/workers-bindings/#create-a-browser-binding) was not passed to `puppeteer.launch()` or `playwright.chromium.launch()`. | Pass your browser binding to `puppeteer.launch()` or `playwright.chromium.launch()`. | | ||
| | `No such module 'cloudflare:browser'` | Browser Rendering is not enabled on your account. | [Enable Browser Rendering](/browser-rendering/get-started/) by creating a [browser binding](/browser-rendering/workers-bindings/#create-a-browser-binding) in your Worker configuration. | | ||
|
|
||
| ## Related resources | ||
|
|
||
| - [Limits](/browser-rendering/limits/) | ||
| - [Browser close reasons](/browser-rendering/reference/browser-close-reasons/) | ||
| - [Timeouts](/browser-rendering/reference/timeouts/) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| import { DashButton } from "~/components"; | ||
|
|
||
| If you receive a `Error processing the request: Unable to create new browser: code: 429: message: Browser time limit exceeded for today` error, it means you have hit the daily browser limit on the Workers Free plan. [Workers Free plan accounts are limited](/browser-rendering/limits/#workers-free) to 10 minutes of Browser Rendering usage per day. If you exceed that limit, you will see this `429` error until the next UTC day. | ||
|
|
||
| To [increase your limits](/browser-rendering/limits/#workers-paid), upgrade to a Workers Paid plan on the **Workers plans** page of the Cloudflare dashboard: | ||
|
|
||
| <DashButton url="/?to=/:account/workers/plans" /> | ||
|
|
||
| If you recently upgraded but still encounter the 10-minute per day limit, redeploy your Worker to ensure your usage is correctly associated with the new plan. |
Uh oh!
There was an error while loading. Please reload this page.