Bug description
Hello,
I have configured sending a report via email in scheduler. The sending is correctly triggered but it fails always with an error (see the screenshot). I use docker installation downloaded form master branch. I use default configuration, did not change anything yet. But it seems to be some problem with browser inside of the container. I tried also to install full firefox-esr inside of container but it did not help. I have not found any solution for this issue on any web source.
Regards,
Luděk
Screenshots/recordings
Superset version
master / latest-dev
Python version
I don't know
Node version
I don't know
Browser
Not applicable
Additional context
No response
Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug report.
- [x] I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Comment From: dosubot[bot]
Hi @cvrdev! I'm Dosu and I’m helping the superset team.
Your error is likely caused by a mismatch or missing configuration for the headless browser inside your Docker worker container. Superset relies on Selenium WebDriver (with Firefox/Chrome) for generating report screenshots, and the default Docker image does not include a browser or driver by default. The AttributeError about 'capabilities' usually means the WebDriver configuration is not matching what Selenium expects, or the browser/driver is missing or misconfigured [source].
How to fix:
-
Install a headless browser and driver in your worker container.
The latest docs recommend using Playwright with Chrome, or you can use Firefox with geckodriver, or Chrome with chromedriver. Only the worker container needs the browser. Example Dockerfile snippets are available in the updated docs [source]. -
Check your
superset_config.py
for the correct WebDriver configuration.
For Firefox, the default config is:python WEBDRIVER_TYPE = "firefox" WEBDRIVER_CONFIGURATION = { "options": {"capabilities": {}, "preferences": {}, "binary_location": ""}, "service": {"log_output": "/dev/null", "service_args": [], "port": 0, "env": {}}, } WEBDRIVER_OPTION_ARGS = ["--headless"]
For Chrome, set:python WEBDRIVER_TYPE = "chrome" WEBDRIVER_OPTION_ARGS = [ "--force-device-scale-factor=2.0", "--high-dpi-support=2.0", "--headless", "--disable-gpu", "--disable-dev-shm-usage", "--no-sandbox", "--disable-setuid-sandbox", "--disable-extensions", ]
-
Verify the browser and driver are installed and accessible.
Enter your worker container and runfirefox --headless
andgeckodriver
(orchromedriver
for Chrome) to confirm they start without errors [source]. -
If using the Docker dev environment, set
ALERT_REPORTS_NOTIFICATION_DRY_RUN = False
in your config to actually send emails, not just simulate them [source]. -
Restart your worker container after making these changes.
If you still see the AttributeError, double-check that your WEBDRIVER_CONFIGURATION
matches the expected structure and that the browser/driver versions are compatible with your Selenium version [source].
More details and example Dockerfiles are in the updated documentation:
https://github.com/apache/superset/pull/34908
Let me know if you need a specific example for your Dockerfile or config!
To reply, just mention @dosu.
How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other