Search code examples
apache-superset

Apache Superset : Unable to take screenshot for sending emails


I am able to send CSV files as alerts, but when try to send a chart , I am getting the error

Failed taking a Screenshot message : process unexpectedly closed with status 255

enter image description here

For me, CSV files are sending without any problem, gecko driver version is 0.29, superset installed using docker compose.


Solution

  • There are many ways in which Alerts & Report setup can go wrong. For this I would suggest editing your docker-compose.yml file (or docker-compose-non-dev.yml if you're running in production, not development) to use the image 2.0.0-dev for your worker containers. That will include a functional setup of geckodriver and headless browser (Firefox) which should avoid a lot of the headaches that come from trying to install those yourself.

    If your CSV reports are sending but not reports with images, this suggests a problem with the headless browser from the worker container trying to reach the report to take a screenshot.

    The images you would use are:

    • apache/superset:2.0.0 for your superset container
    • apache/superset:2.0.0-dev for all other containers

    The first change can happen in the superset part of the file:

    image: apache/superset:2.0.0

    The latter can be accomplished by changing this line near the top of the file to:

    x-superset-image: &superset-image apache/superset:2.0.0-dev
    

    Which will use that image for all other containers that aren't overridden as we did for the main superset container.