Quad A

Selenium ChromeDriver Error on Docker

Sunday, 31 July 2022
Have you ever encountered this error “Cannot assign requested address (99)”, your ChromeDriver / webdriver can’t read the content, and most importantly, your code is perfectly working in your local but when you’ve deployed it in your docker that’s when the errors popping up?
My current setup is, I’m trying to deploy a console application that uses Selenium Web Driver into a Docker container in my Docker Desktop.
After a long searching for an answer and ready to give up this little project.

I’ve noticed some points that doesn’t make sense in the console output.


Actual error when I deploy my .net console application in docker.


Utilizing the docker bin bash, I noticed that the chrome driver version and the installed Chrome doesn’t match and the version is too far off.


Dockerfile chromedriver installation update - So, I’ve reviewed my dockerfile file and locate the chromedriver installation script and update accordingly like the highlighted one in the image.


On Docker run, I’ve noticed that there is an indicator that the ChromeDriver was started successfully, and things started working out as expected. If someone is interested on my dockerfile, kindly leave a message and I’ll get back to you as soon as possible. Happy coding guys.



You may also like

View this article on its original page