Dockerfile does not install browser and web driver, preventing emailer from working
See original GitHub issueCannot use emailer feature using a container built with contrib/docker/Dockerfile
.
Expected results
Emailing dashboards and charts to work with a container built with the provided Dockerfile.
Actual results
Emailer logs about missing browser and/or driver:
[2019-05-07 14:58:30,786: ERROR/ForkPoolWorker-1] Task email_reports.send[1ee0a6a2-fa7d-47d2-86dc-8bba91da4066] raised unexpected: WebDriverException("'geckodriver' executable needs to be in PATH. ",)
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 76, in start
stdin=PIPE)
File "/usr/local/lib/python3.6/subprocess.py", line 729, in __init__
restore_signals, start_new_session)
File "/usr/local/lib/python3.6/subprocess.py", line 1364, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver': 'geckodriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 382, in trace_task
R = retval = fun(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/celery/app/trace.py", line 641, in __protected_call__
return self.run(*args, **kwargs)
File "/home/superset/superset/tasks/schedules.py", line 392, in schedule_email_report
deliver_dashboard(schedule)
File "/home/superset/superset/tasks/schedules.py", line 219, in deliver_dashboard
driver = create_webdriver()
File "/home/superset/superset/tasks/schedules.py", line 168, in create_webdriver
driver = driver_class(**kwargs)
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
self.service.start()
File "/usr/local/lib/python3.6/site-packages/selenium/webdriver/common/service.py", line 83, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
Screenshots
If applicable, add screenshots to help explain your problem.
How to reproduce the bug
- build a container with contrib/docker/Dockerfile
- set required settings for emailer
- click Manage
- click Dashboard Emails
- make an email schedule (e.g. crontab
5 12 * * *
) , checkSend Test Email
and add your email toTest Email Recipients
andRecipients
- click save
- check worker logs for errors
Environment
- superset version v0.32.0rc2
- python, node and npm versions as in the Dockerfile
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if there are any.
- I have reproduced the issue with at least the latest released version of superset.
- I have checked the issue tracker for the same issue and I haven’t found one similar.
Issue Analytics
- State:
- Created 4 years ago
- Comments:14 (5 by maintainers)
Top Results From Across the Web
Dockerfile does not install browser and web driver, preventing ...
Cannot use emailer feature using a container built with contrib/docker/Dockerfile. Expected results Emailing dashboards and charts to work ...
Read more >Chromedriver executable path not found in Docker Container
The chromedriver.exe file is in the container as I have found it in the CLI. It is in this directory '/usr/local/bin/chromedriver'. python code...
Read more >Quick Start Guide and sign in - Docker Documentation
Once Docker Desktop is installed, the Quick Start Guide launches. It includes a simple exercise to build an example Docker image, run it...
Read more >Python Webscraping in a Docker Container - Medium
I am using: Python; Conda environment; Pip for installing; Docker for building images and containers; Selenium and the chrome browser for web ......
Read more >Troubleshooting - DDEV Docs
On macOS, check to make sure Docker Desktop or Colima are not out of disk space. In Settings (or Preferences) → Resources →...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This issue can be fixed by adding
to the Dockerfile
Does that internal image contain also the webdriver? Emailer is nowadays feature of Superset so probably we should include the webdriver and browser in some distribution for users.
It could be another version or there could be “lite” version for those users that are not using the emailer-feature