Skip to content

Latest commit

 

History

History
73 lines (56 loc) · 8.26 KB

File metadata and controls

73 lines (56 loc) · 8.26 KB
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 and 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 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.
408 - Request timed out The request exceeded the allowed time limit. Increase timeout settings. Refer to REST API 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 or Images) and referencing via URLs instead of embedding them inline. Refer to PDF endpoint request size limits.
422 - Unprocessable Entity Browser Rendering could not complete the action because of an issue with the target site. Refer to 422 Unprocessable Entity.
429 - Rate limit exceeded. You have exceeded the rate limit for your plan. Refer to 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.
500 2000 Internal Error An unexpected issue occurred on the Browser Rendering service. Retry your request. If the issue persists, check Cloudflare Status or contact 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.

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 or 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 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.
6002 TimeoutError, Navigation timeout, timed out, Waiting failed: .* exceeded A timeout was reached during a browser operation. Increase the relevant timeout settings 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 or PDF 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 level before Browser Rendering code runs.

Error Description Recommended fix
Cannot read properties of undefined (reading 'fetch') The 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 by creating a browser binding in your Worker configuration.

Related resources