bullet_train icon indicating copy to clipboard operation
bullet_train copied to clipboard

System tests on macOS: “chromedriver” cannot be opened

Open pascallaliberte opened this issue 2 years ago • 4 comments

Ran rails test:system and got the following error on macOS

“chromedriver” cannot be opened because the developer cannot be verified.
CleanShot 2022-06-13 at 16 02 48@2x

pascallaliberte avatar Jun 13 '22 20:06 pascallaliberte

I then clicked "Move to Trash" and now I get this when running rails test:system.

Selenium::WebDriver::Error::WebDriverError: Unable to find chromedriver. Please download the server from
https://chromedriver.storage.googleapis.com/index.html and place it somewhere on your PATH.
More info at https://github.com/SeleniumHQ/selenium/wiki/ChromeDriver.

pascallaliberte avatar Jun 13 '22 20:06 pascallaliberte

Tried:

gem uninstall webdrivers
bundle install

No change

pascallaliberte avatar Jun 13 '22 20:06 pascallaliberte

@pascallaliberte I had the same issue with Linux, I followed these steps to get the tests working again:

> wget -N http://chromedriver.storage.googleapis.com/101.0.4951.41/chromedriver_linux64.zip -P ~/Downloads
> unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads
> sudo mv -f ~/Downloads/chromedriver /usr/local/share/
> sudo chmod +x /usr/local/share/chromedriver

gazayas avatar Jun 13 '22 23:06 gazayas

Also see #235

pascallaliberte avatar Jun 15 '22 03:06 pascallaliberte

@gazayas @pascallaliberte Is this still an issue that we should deal with in some way? I haven't run into this particular flavor of error with chromedriver, though I did run into something kinda similar in https://github.com/bullet-train-co/bullet_train/issues/818, which we fixed in https://github.com/bullet-train-co/bullet_train/pull/819.

jagthedrummer avatar Aug 25 '23 18:08 jagthedrummer

@jagthedrummer I got the system tests to pass while using a live browser on MacOSX by setting the following two values specifically to :selenium_chrome

https://github.com/bullet-train-co/bullet_train/blob/c09d2ddb5a5a3b9554c659296cd44a6fd3ae93cc/test/application_system_test_case.rb#L26-L27

gazayas avatar Aug 28 '23 11:08 gazayas

Cool, sounds like this is fixed.

jagthedrummer avatar Aug 28 '23 15:08 jagthedrummer