{"id":13452,"date":"2020-08-31T09:14:52","date_gmt":"2020-08-31T13:14:52","guid":{"rendered":"https:\/\/qxf2.com\/blog\/?p=13452"},"modified":"2020-08-31T09:14:52","modified_gmt":"2020-08-31T13:14:52","slug":"chrome-not-reachable-error-when-running-selenium-python-test-via-jenkins","status":"publish","type":"post","link":"https:\/\/qxf2.com\/blog\/chrome-not-reachable-error-when-running-selenium-python-test-via-jenkins\/","title":{"rendered":"Chrome not reachable error when running Selenium Python test via Jenkins"},"content":{"rendered":"<p>Recently when I tried to run my Selenium test on the Chrome browser via Jenkins on the\u00a0ubuntu machine, I hit with &#8220;Chrome not reachable&#8221; error whereas\u00a0when 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.<\/p>\n<h3>Problem:<\/h3>\n<p>When I run the Qxf2 Page object model&#8217;s\u00a0test against\u00a0the chrome browser, I hit chrome not reachable\u00a0error. The configured the Jenkins job could not interact with the installed Chrome browser in\u00a0the Ubuntu.<a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_chrome_not_reachable.png\" data-rel=\"lightbox-image-0\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-13472\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_chrome_not_reachable-1024x594.png\" alt=\"settings\" width=\"1024\" height=\"594\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_chrome_not_reachable-1024x594.png 1024w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_chrome_not_reachable-300x174.png 300w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_chrome_not_reachable-768x446.png 768w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_chrome_not_reachable.png 1370w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/p>\n<hr \/>\n<h3>Solution:<\/h3>\n<p>Initially, I suspected the error is because of the below issues:<br \/>\n1. Chrome browser and driver version conflicts in Ubuntu.<br \/>\nRemoved the existing chrome browser and driver on my ubuntu machine, and re-installed the compatible chrome browser and driver. However, the issue was persisting.<br \/>\n2. Xvfb installation and setting display size on Ubuntu.<br \/>\nUninstalled 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.<\/p>\n<p>After hard research and colleagues help, I could fix the error. In Jenkins configuration, navigate to Build Environment-&gt;Xvfb settings a few changes need to be made so that the test would run well with a chrome browser on ubuntu.<a href=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_Xvfb_settings.png\" data-rel=\"lightbox-image-1\" data-rl_title=\"\" data-rl_caption=\"\" title=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-13473 size-large\" src=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_Xvfb_settings-1024x619.png\" alt=\"Setting\" width=\"1024\" height=\"619\" srcset=\"https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_Xvfb_settings-1024x619.png 1024w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_Xvfb_settings-300x181.png 300w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_Xvfb_settings-768x464.png 768w, https:\/\/qxf2.com\/blog\/wp-content\/uploads\/2020\/08\/Jenkins_Xvfb_settings.png 1243w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><br \/>\nI hope this would help if you are struggling with chrome not reachable error via Jenkins.<\/p>\n<hr \/>\n","protected":false},"excerpt":{"rendered":"<p>Recently when I tried to run my Selenium test on the Chrome browser via Jenkins on the\u00a0ubuntu machine, I hit with &#8220;Chrome not reachable&#8221; error whereas\u00a0when 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. Problem: When I [&hellip;]<\/p>\n","protected":false},"author":18,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[51,30,61,1],"tags":[],"class_list":["post-13452","post","type-post","status-publish","format-standard","hentry","category-jenkins","category-selenium","category-testing","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/13452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/users\/18"}],"replies":[{"embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/comments?post=13452"}],"version-history":[{"count":8,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/13452\/revisions"}],"predecessor-version":[{"id":13619,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/posts\/13452\/revisions\/13619"}],"wp:attachment":[{"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/media?parent=13452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/categories?post=13452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/qxf2.com\/blog\/wp-json\/wp\/v2\/tags?post=13452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}