Skip to content

Instantly share code, notes, and snippets.

@fcschmidt
Last active June 6, 2018 22:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fcschmidt/1366251a604c566220680d2ea098d43a to your computer and use it in GitHub Desktop.
Save fcschmidt/1366251a604c566220680d2ea098d43a to your computer and use it in GitHub Desktop.
Chrome binary not detected - Solution used! Discussion: https://github.com/heroku/heroku-buildpack-google-chrome/issues/26
CHROMEDRIVER_PATH = "/app/.chromedriver/bin/chromedriver"
chrome_bin = os.environ.get('GOOGLE_CHROME_BIN', "chromedriver")
options = webdriver.ChromeOptions()
options.binary_location = chrome_bin
options.add_argument("--disable-gpu")
options.add_argument("--no-sandbox")
options.add_argument('headless')
options.add_argument('window-size=1200x600')
driver = webdriver.Chrome(executable_path=CHROMEDRIVER_PATH, chrome_options=options)
@fcschmidt
Copy link
Author

Run (headless) Google Chrome on Heroku:
https://github.com/heroku/heroku-buildpack-google-chrome

Installs chromedriver in a Heroku slug:
https://github.com/heroku/heroku-buildpack-chromedriver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment