'selenium.common.exceptions.SessionNotCreatedException: Message: session not created from timeout: Timed out receiving message from renderer: 600,000

I get following error:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created
from timeout: Timed out receiving message from renderer: 600,000

When executing following code:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.chrome.options import Options

service = Service(r'/usr/lib/chromium-browser/chromedriver')
options = Options()
options.headless = True
driver = webdriver.Chrome(service=service, options=options)

I am running the code on Raspbian GNU/Linux 11 (bullseye) with Selenium 4.1.3, Chrome 98.0.4758.106 and same Chrome Driver Version.

Sometimes the script runs without any errors and sometimes I get this time out.

I hope that someone can help me out. Thank you!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source