'connection Aborted.', Connectionreseterror(104, 'connection Reset By Peer') Using Selenium With Chromedriver And Chrome Through Python
The code below is executed in a loop, where 10-15 local .html files are opened and an image of each is saved as a .png. Ubuntu Server 16.04 ChromeDriver 2.41.578700 Google Ch
Solution 1:
This error message...
('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
...implies that the ChromeDriver was unable to communicate with the WebBrowser i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- You are using chromedriver=2.41
- Release Notes of chromedriver=2.41 clearly mentions the following :
Supports Chrome v67-69
- You are using chrome=74.0
- Release Notes of ChromeDriver v74.x clearly mentions the following :
Supports Chrome v74
So there is a clear mismatch between ChromeDriver v2.41 and the Chrome Browser v74.0
Solution
- Upgrade ChromeDriver to current ChromeDriver v74.0.3729.6 level.
- Keep Chrome version at Chrome v74 levels. (as per ChromeDriver v74.0.3729.6 release notes)
- Always invoke
driver.quit()
withintearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully.
You can find a detailed discussion in Selenium & Heroku: urllib3.exceptions.ProtocolError: ('Connection aborted.', ConnectionResetError(104, 'Connection reset by peer'))
Solution 2:
This most probably because you are using an older version of chrome driver for new Chrome version.
Download the latest chrome driver for your Chrome from here
Post a Comment for "'connection Aborted.', Connectionreseterror(104, 'connection Reset By Peer') Using Selenium With Chromedriver And Chrome Through Python"