问题
Test Environment:
- chrome=73.0.3683.103
- chromedriver version: 73.0.3683.68
- java.version: '1.8.0_151'
- os.name: 'Windows 7'
I am getting following error:
Unable to receive message from renderer
Timed out receiving message from renderer: 19.997 Timed out receiving message from renderer:-0.004
Thank you in advance for any help you may be able to provide.
回答1:
This error message...
Unable to receive message from renderer Timed out receiving message from renderer: 19.997
Timed out receiving message from renderer: -0.004
...implies that the ChromeDriver was unable to initiate/spawn a new Web Browsing Session i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- Your ChromeDriver version is 73.0.3683.68.
- Your Chrome version is 73.0.3683.103.
- Your JDK version is 1.8.0_151 which is pretty old.
So there is a clear mismatch between the ChromeDriver v73.0.3683.68, Chrome v73.0.3683.103 and JDK v8u151.
Solution
Upgrade JDK to recent levels JDK 8u202.
来源:https://stackoverflow.com/questions/55765613/how-to-handle-unable-to-receive-message-from-renderer-in-chrome-driver