-
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
Open
ToriLindsay
wants to merge
14
commits into
production
Choose a base branch
from
tori/browser-rendering-error-codes
base: production
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
be4a13c
[Browser Rendering] Errors
ToriLindsay 3d3a33e
Notes
ToriLindsay 7196aca
Merge branch 'production' into tori/browser-rendering-error-codes
ToriLindsay 428a6f4
Error content
ToriLindsay eb35a3c
Added remaining error content
ToriLindsay f495b83
Final pass
ToriLindsay da66302
Apply suggestion from @ToriLindsay
ToriLindsay 5a802cb
Apply suggestion from @ToriLindsay
ToriLindsay e058922
Apply suggestion from @ToriLindsay
ToriLindsay cbcc04c
Move to reference and update 429 error
ToriLindsay a6dc998
Merge branch 'production' into tori/browser-rendering-error-codes
ToriLindsay 11e5a6e
Apply suggestions from code review
ToriLindsay 8a242eb
Merge branch 'production' into tori/browser-rendering-error-codes
ToriLindsay dc16dae
Feedback updates
ToriLindsay File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| --- | ||
| title: Errors | ||
| pcx_content_type: reference | ||
| sidebar: | ||
| order: 13 | ||
| --- | ||
|
|
||
|
|
||
| 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 | | ||
| | --- | --- | --- | --- | --- | | ||
| | `400` | - | `Bad Request` | The request is malformed or contains invalid parameters. | Refer to the [REST API documentation](/browser-rendering/rest-api/) for the specific endpoint you are using and check the required parameters. | | ||
| | `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/#convert-custom-html-to-pdf). | | ||
| | `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 (10 minutes a day on the Workers Free plan). | Refer to [429 Browser time limit exceeded](/browser-rendering/limits/#error-429-browser-time-limit-exceeded-for-today). | | ||
| | `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/). | | ||
|
Check warning on line 25 in src/content/docs/browser-rendering/reference/errors.mdx
|
||
| | `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](/workers/observability/errors/) 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/#advanced-usage) or [PDF](/browser-rendering/rest-api/pdf-endpoint/#advanced-usage) 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/) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
src/content/partials/browser-rendering/error-429-browser-time-limit.mdx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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. |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
general table question. do we purposely have periods in each box?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The 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.