groupon / Selenium-Grid-Extras

Simplify the management of the Selenium Grid Nodes and stabilize said nodes by cleaning up the test environment after the build has been completed
BSD 3-Clause "New" or "Revised" License
537 stars 210 forks source link

Grid extras doesn't download geckodriver 0.19.0 #368

Open ghost opened 6 years ago

ghost commented 6 years ago

Chunk from selenium_grid_extras_config.json

"geckodriver": {
      "version": "0.19.0"
    },

When I start grid extar it states that it downloads gekodriver 0.19.0 but in fact it doesn't As the result, when I run tests I get the following

 Unable to create new service: GeckoDriverService
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T16:15:40.131Z'
System info: host: 'CORPJENKINS10', ip: '172.17.42.251', os.name: 'Windows Server 2012 R2', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_144'
Driver info: driver.version: unknown
Command duration or timeout: 2.61 seconds
ghost commented 6 years ago

Maybe that' because grid extras was not strated as admin

zsucic commented 6 years ago

Actually, if you run the grid and try to open localhost:3000/download_geckodriver you'll notice that it tries to download a file that doesn't exist, i.e. { "exit_code": 1, "out": [], "error": [ "java.io.FileNotFoundException: https://github.com/mozilla/geckodriver/releases/download/v0.19.0/geckodriver-v0.19.0-linuxnull.tar.gz" ], "source_url": [ "https://github.com/mozilla/geckodriver/releases/download/v0.19.0/geckodriver-v0.19.0-linuxnull.tar.gz" ], "file_full_path": [ "/tmp/webdriver/geckodriver/geckodriver_0.19.0.tar.gz" ], "file": [ "geckodriver_0.19.0.tar.gz" ] }

The real path is e.g. for 64bit linux: https://github.com/mozilla/geckodriver/releases/download/v0.19.0/geckodriver-v0.19.0-linux64.tar.gz

You can also download such file manually and place it in the /tmp/webdriver/geckodriver/ folder and unpack it there. But note I think that since 0.19 requires selenium 3.5 and seems that SGE doesn't work with selenium 3.5 it'll fail even if it's there.

EDIT: I just figured out the problem, in your selenium_grid_extras.json file, you'll find the necessary section for the "geckodriver" which probably looks like this:

    "geckodriver": {
      "version": "0.19.0"
    },

if you extend it with "bit":"64", i.e.

   "geckodriver": {
      "bit": "64",
      "version": "0.19.0"
    },

it should successfully download it on the next run.

hon2a commented 6 years ago

I've had geckodriver version 0.19.0 installed just fine without the bit config for some reason, but I got the same issue when trying to update to 0.19.1. Adding "bit": "32" to the config fixed the problem for me.