How to handle SessionNotCreatedException: Message: session not created exception from disconnected: Unable to receive message from renderer?

Viewed 1714

OS : UBUNTU 20.04 LTS Google chrome -Version 86.0.4240.183 (Official Build) (64-bit) conda: 4.9.1 Selenium: 3.141.0

from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--disable-infobars')
options.add_argument('--disable-dev-shm-usage')
options.add_argument('--no-sandbox')
options.add_argument('--remote-debugging-port=9222')
    driver =webdriver.Chrome(executable_path='/home/blank/Downloads/useless/chromedriver_linux64 (3)/chromedriver',options=options)`

It was working a day before i dont know whats the problem .

SessionNotCreatedException: Message: session not created exception from disconnected: Unable to receive message from renderer (Session info: chrome=86.0.4240.183) (Driver info: chromedriver=2.24.417424 (c5c5ea873213ee72e3d0929b47482681555340c3),platform=Linux 5.4.0-52-generic x86_64)

1 Answers

This mean your chrome driver is unable to initiate/spawn a new Chrome Browser. It might happen due to many reason so i not 100% sure but this is things i usually do:

  1. Re-check chrome driver, jdk and selenium version, make sure it compatibility with Chrome Browser on your computer

  2. Ensure that /etc/hosts on your system contains the following entry (if using mac or linux):

127.0.0.1 localhost.localdomain localhost #or 127.0.0.1 localhost loopback

  1. Turn off antivirus (some can affect chrome driver)

  2. clear all data and reboot system.

Related