Bug description

I have the alerts and reports features enabled for my superset instance, but I get the error message that my cookie domain is invalid and therefore superset fails to take a screenshot, which causes neither the alerts or reports to work. I did try setting the SESSION_COOKIE_DOMAIN parameter in the superset_config.py file (I made sure that it is the same address as my superset instance) but I still get the same error message

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

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]

This error usually happens when the domain configured for cookies doesn't exactly match the domain Selenium uses to access Superset for screenshots. Make sure your WEBDRIVER_BASEURL in superset_config.py matches the exact domain, port, and protocol you use to access Superset (for example, if you use http://localhost:8088, set WEBDRIVER_BASEURL = "http://localhost:8088/"). Avoid mixing localhost and 127.0.0.1, and keep the same domain everywhere—this includes your browser, Superset config, and Selenium settings. More details are in this discussion.

If you're still seeing screenshot failures, try configuring Chrome/Chromium with these options: --headless, --disable-gpu, --disable-dev-shm-usage, --no-sandbox, --disable-setuid-sandbox, and --disable-extensions. Also, increasing SCREENSHOT_LOCATE_WAIT to 30 and SCREENSHOT_LOAD_WAIT to 60 seconds can help (reference).

If Selenium keeps giving you trouble, consider switching to Playwright by setting PLAYWRIGHT_REPORTS_AND_THUMBNAILS = True and installing the playwright Python package. Playwright is more robust, especially in containerized environments and with dashboards using Deck.gl (reference).

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: rusackas

Agree with the bot, and I think we'll be looking to consolidate on PLAYWRIGHT_REPORTS_AND_THUMBNAILS going forward, so I'm curious if that winds up working for you.