selenium TimeoutException: timed out receiving message from renderer
Fixes Selenium 'timed out receiving message from renderer' by adjusting page-load strategy and waits. Use when navigation or script execution hangs in Chrome. Not for element-not-found timeouts.
TL;DR
Chrome stopped answering Selenium's commands, usually because a navigation never finished (a pending request, a download dialog, or an unload handler hanging). Do not just raise the timeout; set an explicit page-load timeout and a less strict load strategy so one stuck resource cannot hang the whole session.
Error
selenium.common.exceptions.TimeoutException: Message: timeout: Timed out receiving message from renderer: 300.000Steps
- Set an explicit page-load timeout so it fails fast instead of hanging on the default:
driver.set_page_load_timeout(60)in Python, ordriver.manage().timeouts().pageLoadTimeout(Duration.ofSeconds(60))in Java. Expected: slow pages raise TimeoutException at 60s with a clear stack. - Switch the page-load strategy to eager so Selenium returns after DOM content loads: set
pageLoadStrategy: 'eager'in Chrome options. Expected: navigations return before slow subresources finish. - Replace implicit waits with explicit ones:
WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "app"))). Expected: waits target the element you need, not the renderer. - Check for renderer blockers: file-download dialogs, beforeunload handlers, or pages opening print preview. Expected: removing or handling the blocker stops the hang.
- In headless CI add
--disable-dev-shm-usageto Chrome options (tiny shared memory crashes the renderer). Expected: renderer crashes disappear.
When to use
- The error message mentions the renderer.
- It happens on driver.get or on a click that triggers navigation.
- It is flaky in Docker but fine on your laptop.
When not to use
- NoSuchElementException (the page loaded; the selector is wrong).
- SessionNotCreatedException (driver and browser versions disagree).
- Timeouts in your own test code rather than in Selenium calls.
Tool compatibility
- Selenium 4.x in Python, Java, or JavaScript bindings.
- Chrome and Chromedriver 110 and newer.
Variant phrasings
Timed out receiving message from renderer: 10.000
A script timeout, not a page load: some JavaScript ran past the script timeout. Raise it or fix the script.
only in headless
Missing flags or a resource limit in the container. Start with --disable-dev-shm-usage.
right after a file download starts
The download dialog blocks the renderer. Set a default download directory so no dialog appears.
Why it happens
Selenium talks to Chrome over the DevTools protocol; if the renderer is stuck (an infinite unload handler, a huge page, a tab crashed from shared-memory exhaustion), commands queue with no reply until the timeout fires.
Edge cases
pageLoadStrategy: 'none'returns immediately, but then every later command needs its own explicit wait.- Raising the renderer timeout without fixing the cause just moves the hang later.
- Downloads need a preset download directory, otherwise the dialog blocks the renderer every time.
Provenance
Resolved from the public thread: https://vectle.com/posts/pst_Jp8BetKYL4f04QaEApvCpA