Recently when I tried to run my Selenium test on the Chrome browser via Jenkins on the ubuntu machine, I hit with “Chrome not reachable” error whereas when I tried to run directly on the ubuntu machine without triggering the test from Jenkins, it executed with no errors. The same Jenkins job was running fine with the Firefox browser.
When I run the Qxf2 Page object model’s test against the chrome browser, I hit chrome not reachable error. The configured the Jenkins job could not interact with the installed Chrome browser in the Ubuntu.
Initially, I suspected the error is because of the below issues:
1. Chrome browser and driver version conflicts in Ubuntu.
Removed the existing chrome browser and driver on my ubuntu machine, and re-installed the compatible chrome browser and driver. However, the issue was persisting.
2. Xvfb installation and setting display size on Ubuntu.
Uninstalled the Xvfb on the ubuntu machine and re-installed the Xvfb and set the display size. Even after doing these changes, the issue was persisting.
After hard research and colleagues help, I could fix the error. In Jenkins configuration, navigate to Build Environment->Xvfb settings a few changes need to be made so that the test would run well with a chrome browser on ubuntu.
I hope this would help if you are struggling with chrome not reachable error via Jenkins.