Bug description

I have superset deployed on openshift, and it works fine for the most part, except for sending alerts and reports. Whenever I schedule either an alert or a report, I get an error that says "Failed to take a screenshot Message: Failed to decode response from marionette". Now I tried running a simple python script just to check that the pod is able to send emails, and it is, which leads me to believe that the problem lies solely on the fact that selenium can't take the screenshot and I can't figure out why. I've searched the error quite a bit and went over our settings a few times to check if missed anything or there was something lacking in the configurations, but I didn't see anything out of the ordinary. Any help is appreciated!

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.10

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • [ ] I have searched Superset docs and Slack and didn't find a solution to my problem.
  • [ ] I have searched the GitHub issue tracker and didn't find a similar bug report.
  • [ ] 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 @Dens1002! I'm Dosu and I’m helping the superset team.

The error you're seeing ("Failed to decode response from marionette") suggests a problem with Selenium's communication with Firefox/GeckoDriver, which is the default browser for Superset screenshots. In containerized environments like OpenShift, this often happens due to missing dependencies, incorrect browser arguments, or security restrictions.

Here are some steps that have helped others resolve similar issues:

  • Switch to Chrome/Chromium for screenshots by setting WEBDRIVER_TYPE = "chrome" in your superset_config.py, and ensure you have a local ChromeDriver installed in your container. This avoids issues with Firefox/GeckoDriver and marionette errors source.
  • Set recommended Chrome options: WEBDRIVER_OPTION_ARGS = ["--headless", "--disable-gpu", "--disable-dev-shm-usage", "--no-sandbox", "--disable-setuid-sandbox", "--disable-extensions"]. These flags are crucial for running Chrome in containers, especially with OpenShift's security constraints source.
  • Use the WEBDRIVER_CONFIGURATION dictionary to specify the path to your local ChromeDriver and suppress logs: python WEBDRIVER_CONFIGURATION = { "service": { "executable_path": "/usr/local/bin/chromedriver", "log_path": "/dev/null", "service_args": [], "port": 0, "env": {}, }, "options": { "capabilities": {}, "preferences": {}, "binary_location": "", }, } This prevents Superset from trying to download ChromeDriver from the internet, which can fail in restricted environments source.
  • Increase screenshot timeouts if your pages are slow to load: set SCREENSHOT_LOCATE_WAIT = 30 and SCREENSHOT_LOAD_WAIT = 60 in superset_config.py source.
  • Make sure your container image includes all necessary browser dependencies (fonts, shared memory, etc.), and that Chrome/Chromium and ChromeDriver are installed and executable inside the pod.

If you continue to have issues with Selenium, you can try enabling the Playwright backend for screenshots by setting the PLAYWRIGHT_REPORTS_AND_THUMBNAILS feature flag to True and installing the playwright Python package. Playwright is often more robust in containerized environments source.

Let me know if you need more details on any of these steps!

To reply, just mention @dosu.


How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other  Chat with Dosu Join Discord Share on X

Comment From: sadpandajoe

@Dens1002 agree with Dosu, if you can move off of selenium for screenshots, I would probably do that. Playwright seems to be better with things like Deck.gl if they are in your dashboard.