GitHub user dosubot[bot] added a comment to the discussion: Superset Issue with 
Alerts

<!-- Answer -->
The issue where scheduled Superset reports only capture part of the dashboard 
(while manual downloads work) is usually due to how the screenshot viewport is 
set for scheduled reports. Here’s what you can try:

- The screenshot size for scheduled reports is controlled by the viewport 
settings and can be overridden per report using custom_width and custom_height. 
Even though you set SCREENSHOT_VIEWPORT_HEIGHT to 6000, the actual screenshot 
height used for each report defaults to the WEBDRIVER_WINDOW["dashboard"] 
height unless you explicitly set custom_height for the report. You can set this 
in the report schedule UI or via the API to match or exceed your dashboard's 
full height. The width is also capped by 
ALERT_REPORTS_MAX_CUSTOM_SCREENSHOT_WIDTH (default 2400px) — make sure your 
custom_width does not exceed this limit, or it will be reduced automatically 
([source](https://github.com/apache/superset/blob/master/superset/commands/report/execute.py)).

- If your dashboard uses tabs, scheduled reports in Superset 6.0.0 may not 
capture all tabs by default. Enabling the feature flag ALERT_REPORT_TABS (add 
"ALERT_REPORT_TABS": True to your FEATURE_FLAGS) will allow each tab to be 
included as a separate page in the PDF 
([source](https://github.com/apache/superset/issues/36794), 
[source](https://github.com/apache/superset/pull/30694)). Note: Full support 
for this was merged after 6.0.0, so if you need this feature, consider 
upgrading Superset.

- Sometimes, charts or dashboard elements load slowly and are missed by the 
screenshot. Try increasing SCREENSHOT_LOAD_WAIT and SCREENSHOT_LOCATE_WAIT 
(e.g., to 100 and 600 seconds) to give the page more time to fully render 
before the screenshot is taken 
([source](https://github.com/apache/superset/discussions/31432)).

- Some users report more reliable screenshots with WEBDRIVER_TYPE set to 
"firefox" instead of "chrome" 
([source](https://github.com/apache/superset/discussions/35780)).

- If you want to force a fresh screenshot (not from cache), set 
force_screenshot to true in the report schedule 
([source](https://github.com/apache/superset/blob/master/superset/reports/models.py)).

Try setting custom_height and custom_width for your scheduled report to match 
your dashboard’s full dimensions, enable ALERT_REPORT_TABS if you have tabs, 
and increase the wait times. If you still see issues, check the Celery worker 
logs for errors or timeouts during screenshot generation.


<!-- Dosu Comment Footer -->
*To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/1f7e03f8-022a-43c6-baa3-ee7027129da2?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/1f7e03f8-022a-43c6-baa3-ee7027129da2?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/1f7e03f8-022a-43c6-baa3-ee7027129da2?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/1f7e03f8-022a-43c6-baa3-ee7027129da2?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/1f7e03f8-022a-43c6-baa3-ee7027129da2?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/1f7e03f8-022a-43c6-baa3-ee7027129da2?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/1f7e03f8-022a-43c6-baa3-ee7027129da2?feedback_type=other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=The%20issue%20where%20scheduled%20Superset%20reports%20only%20capture%20part%20of%20the%20dashboard%20%28while%20manual%20downloads%20work%29%20is%20usually%20due%20to%20how%20the%20screenshot%20viewport%20is%20set%20for%20scheduled%20reports.%20Here%E2%80%99s%20what%20you%20can%20try%3A%0A%0A-%20The%20screenshot%20size%20for%20scheduled%20reports%20is%20controlled%20by%20the%20viewport%20settings%20and%20can%20be%20overridden%20per%20report%20using%20custom_width%20and%20custom_height.%20Even%20though%20you%20set%20SCREENSHOT_VIEWPORT_HEIGHT%20to%206000%2C%20the%20actual%20screenshot%20height%20used%20for%20each%20report%20defaults%20to%20the%20WEBDRIVER_WINDOW%5B%22dashboard%22%5D%20height%20unless%20you%20explicitly%20set%20custom_height%20for%20th
 
e%20report.%20You%20can%20set%20this%20in%20the%20report%20schedule%20UI%20or%20via%20the%20API%20to%20match%20or%20exceed%20your%20dashboard%27s%20full%20height.%20The%20width%20is%20also%20capped%20by%20ALERT_REPORTS_MAX_CUSTOM_SCREENSHOT_WIDTH%20%28default%202400px%29%C2%A0%E2%80%94%C2%A0make%20sure%20your%20custom_width%20does%20not%20exceed%20this%20limit%2C%20or%20it%20will%20be%20reduced%20automatically%C2%A0%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset/commands/report/execute.py%29%29.%0A%0A-%20If%20your%20dashboard%20uses%20tabs%2C%20scheduled%20reports%20in%20Superset%206.0.0%20may%20not%20capture%20all%20tabs%20by%20default.%20Enabling%20the%20feature%20flag%20ALERT_REPORT_TABS%20%28add%20%22ALERT_REPORT_TABS%22%3A%20True%20to%20your%20FEATURE_FLAGS%29%20will%20allow%20each%20tab%20to%20be%20included%20as%20a%20separate%20page%20in%20the%20PDF%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/issues/36794%29%2C%20%5Bsource%5D%28https%3
 
A//github.com/apache/superset/pull/30694%29%29.%20Note%3A%20Full%20support%20for%20this%20was%20merged%20after%206.0.0%2C%20so%20if%20you%20need%20this%20feature%2C%20consider%20upgrading%20Superset.%0A%0A-%20Sometimes%2C%20charts%20or%20dashboard%20elements%20load%20slowly%20and%20are%20missed%20by%20the%20screenshot.%20Try%20increasing%20SCREENSHOT_LOAD_WAIT%20and%20SCREENSHOT_LOCATE_WAIT%20%28e.g.%2C%20to%20100%20and%20600%20seconds%29%20to%20give%20the%20page%20more%20time%20to%20fully%20render%20before%20the%20screenshot%20is%20taken%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/31432%29%29.%0A%0A-%20Some%20users%20report%20more%20reliable%20screenshots%20with%20WEBDRIVER_TYPE%20set%20to%20%22firefox%22%20instead%20of%20%22chrome%22%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/discussions/35780%29%29.%0A%0A-%20If%20you%20want%20to%20force%20a%20fresh%20screenshot%20%28not%20from%20cache%29%2C%20set%20force_screenshot%20to%20true%20in%20the%20r
 
eport%20schedule%20%28%5Bsource%5D%28https%3A//github.com/apache/superset/blob/master/superset/reports/models.py%29%29.%0A%0ATry%20setting%20custom_height%20and%20custom_width%20for%20your%20scheduled%20report%20to%20match%20your%20dashboard%E2%80%99s%20full%20dimensions%2C%20enable%20ALERT_REPORT_TABS%20if%20you%20have%20tabs%2C%20and%20increase%20the%20wait%20times.%20If%20you%20still%20see%20issues%2C%20check%20the%20Celery%20worker%20logs%20for%20errors%20or%20timeouts%20during%20screenshot%20generation.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/37549)

GitHub link: 
https://github.com/apache/superset/discussions/37549#discussioncomment-15639461

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to