You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Selenium::WebDriver::Error::SessionNotCreatedError (Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line)
I also tried removing the buildpack from the heroku webapp, installing it from the command line and restarting the dynos (as commented #3 (comment) but it didn't work)
Thanks!
The text was updated successfully, but these errors were encountered:
The problem I've been having is when/where to set these paths in a Rails app. But just running your code in the rails console does work.
UPDATE: A solution that worked for my case is to do this in a Rails initializer file:
# Use `:debug` instead of `:info` for detailed logs in case of an error.Selenium::WebDriver.logger.level=:warnifRails.env.development?Capybara.default_driver=:seleniumelse# Production# Heroku-specific setup for Selenium + Firefox paths, etc.Capybara.default_driver=:selenium_headlessifFile.exist?(ENV["FIREFOX_BIN"])Selenium::WebDriver::Firefox.path=ENV["FIREFOX_BIN"]Selenium::WebDriver::Firefox::Service.driver_path=ENV["GECKODRIVER_PATH"]endend
The key part being if File.exist?(ENV["FIREFOX_BIN"]). This conditional allows the deploys to work without fail, and also is what's needed when running the Rails application.
Hi! I recently created a new app in Heroku, installed the buildpack, added the ENV variables and it is not working.
I tried different things commented on other issues (I'm using Ruby):
But I'm getting
Selenium::WebDriver::Error::SessionNotCreatedError (Expected browser binary location, but unable to find binary in default location, no 'moz:firefoxOptions.binary' capability provided, and no binary flag set on the command line)
My env variables are:
I also tried removing the buildpack from the heroku webapp, installing it from the command line and restarting the dynos (as commented #3 (comment) but it didn't work)
Thanks!
The text was updated successfully, but these errors were encountered: