Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i am trying to host my selenium firefox automation project on heroku and its giving me same error , please tell what should i do?? #1979

Closed
KillerGoyal opened this issue Jan 15, 2022 · 2 comments

Comments

@KillerGoyal
Copy link

KillerGoyal commented Jan 15, 2022

System

Testcase

import os
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary
from selenium.webdriver.firefox.service import Service

def load_driver():
options = webdriver.FirefoxOptions()

# enable trace level for debugging 
options.log.level = "trace"

options.add_argument("-remote-debugging-port=9224")
options.add_argument("-headless")
options.add_argument("-disable-gpu")
options.add_argument("-no-sandbox")
serv = Service(os.environ.get('GECKODRIVER_PATH'))
binary = os.environ.get('FIREFOX_BIN')
options.binary_location = binary
firefox_driver = webdriver.Firefox(service=serv,options=options)

return firefox_driver

def start():
driver = load_driver()
driver.get("https://www.google.com/")
print(driver.title)
driver.close()

if name == "main":
start()

Stacktrace

2022-01-15T15:00:48.336875+00:00 app[worker.1]: Traceback (most recent call last):
2022-01-15T15:00:48.336896+00:00 app[worker.1]: File "/app/main.py", line 31, in
2022-01-15T15:00:48.337031+00:00 app[worker.1]: start()
2022-01-15T15:00:48.337041+00:00 app[worker.1]: File "/app/main.py", line 25, in start
2022-01-15T15:00:48.337106+00:00 app[worker.1]: driver = load_driver()
2022-01-15T15:00:48.337115+00:00 app[worker.1]: File "/app/main.py", line 20, in load_driver
2022-01-15T15:00:48.337174+00:00 app[worker.1]: firefox_driver = webdriver.Firefox(service=serv,options=options)
2022-01-15T15:00:48.337184+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/selenium/webdriver/firefox/webdriver.py", line 174, in init
2022-01-15T15:00:48.337279+00:00 app[worker.1]: self.service.start()
2022-01-15T15:00:48.337287+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 98, in start
2022-01-15T15:00:48.337361+00:00 app[worker.1]: self.assert_process_still_running()
2022-01-15T15:00:48.337369+00:00 app[worker.1]: File "/app/.heroku/python/lib/python3.9/site-packages/selenium/webdriver/common/service.py", line 110, in assert_process_still_running
2022-01-15T15:00:48.337441+00:00 app[worker.1]: raise WebDriverException(
2022-01-15T15:00:48.337483+00:00 app[worker.1]: selenium.common.exceptions.WebDriverException: Message: Service /app/vendor/geckodriver/geckodriver unexpectedly exited. Status code was: 64

Trace-level log

@KillerGoyal KillerGoyal changed the title i am trying to host my selenium firefox automation project on heroku and its giving me same error can u please tell what should i do?? i am using this buildpack ---> https://github.com/pyronlaboratory/heroku-integrated-firefox-geckodriver i am trying to host my selenium firefox automation project on heroku and its giving me same error , please tell what should i do?? Jan 15, 2022
@whimboo
Copy link
Collaborator

whimboo commented Jan 17, 2022

What's the version of Selenium that you are using? I wonder if this is a dupe of issue #1959.

@whimboo
Copy link
Collaborator

whimboo commented Feb 2, 2022

No feedback from reporter. Going to close the issue but happy to reopen once the requested information has been provided.

@whimboo whimboo closed this as completed Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants