You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "dosubot[bot] (via GitHub)" <gi...@apache.org> on 2026/04/02 16:29:13 UTC

Re: [I] Empty png in report [superset]

dosubot[bot] commented on issue #39070:
URL: https://github.com/apache/superset/issues/39070#issuecomment-4179030992

   <!-- Answer -->
   This is a recognized pain point — Superset's report validation checks whether the screenshot *capture* returned bytes, but it does **not** verify that the image actually contains meaningful content [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/report/execute.py). A blank/white PNG is still a valid image file, so it passes all checks and gets sent with a green status. That's why you see no errors.
   
   **Why legacy charts make this worse:** Legacy charts have a unique code path where they may lack a saved query context, triggering a fallback screenshot to generate it. This extra step introduces additional failure points that can result in a blank render without raising an error [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/report/execute.py).
   
   **Things to try:**
   
   1. **Replace the legacy bar chart** with the modern ECharts bar chart — this is the most reliable fix if a legacy viz type is the root cause.
   
   2. **Increase screenshot timeout values** in your `superset_config.py`, since charts may not finish rendering before the screenshot is taken:
   
      ```python
      SCREENSHOT_SELENIUM_HEADSTART = 5
      SCREENSHOT_LOCATE_WAIT = 20
      SCREENSHOT_LOAD_WAIT = 120
      SCREENSHOT_SELENIUM_ANIMATION_WAIT = 10
      ```
   
   3. **Enable tiled screenshots** if your dashboard is large or has many charts — this addresses a known issue where Chromium unmounts/redraws elements mid-capture on tall pages [[2]](https://github.com/apache/superset/pull/34561):
   
      ```python
      SCREENSHOT_TILED_ENABLED = True
      SCREENSHOT_TILED_CHART_THRESHOLD = 15
      SCREENSHOT_TILED_HEIGHT_THRESHOLD = 4000
      ```
   
   4. **Try Playwright** instead of Selenium, which may be more reliable for screenshot capture:
   
      ```python
      FEATURE_FLAGS = {
          "PLAYWRIGHT_REPORTS_AND_THUMBNAILS": True
      }
      ```
   
   5. **Check your logs for this warning:** `"No query context found, taking a screenshot to generate it"` — it indicates a legacy chart is hitting the fallback path [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/report/execute.py).
   
   As for your core question about *why the report doesn't fail with an error* — this is essentially a gap in Superset's validation. There are related issues tracking this: [#25187](https://github.com/apache/superset/issues/25187) and [#14351](https://github.com/apache/superset/issues/14351). Content-aware validation (detecting blank images before sending) hasn't been implemented yet.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response#message_id=bb63fcbf-7dc7-4d1b-90f7-08985c7920c4&feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer#message_id=bb63fcbf-7dc7-4d1b-90f7-08985c7920c4&feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources#message_id=bb63fcbf-7dc7-4d1b-90f7-08985c7920c4&feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose#message_id=bb63fcbf-7dc7-4d1b-90f7-08985c7920c4&feedback_type=too_verbose) | [Hallucination](https://
 app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination#message_id=bb63fcbf-7dc7-4d1b-90f7-08985c7920c4&feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report#message_id=bb63fcbf-7dc7-4d1b-90f7-08985c7920c4&feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other#message_id=bb63fcbf-7dc7-4d1b-90f7-08985c7920c4&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&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge)&nbsp;[![Open in Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=This%20is%20a%20recognized%20pain%20point%20%E2%80%94%20Superset%27s%20report%20validation%20checks%20whether%20the%20screenshot%20%2Acapture%2A%20returned%20bytes%2C%20but%20it%20does%20%2A%2Anot%2A%2A%20verify%20that%20the%20image%20actually%20contains%20meaningful%20content%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/report/execute.py%29.%20A%20blank/white%20PNG%20is%20still%20a%20valid%20image%20file%2C%20so%20it%20passes%20all%20checks%20and%20gets%20sent%20with%20a%20green%20status.%20That%27s%20why%20you%20see%20no%20errors.%0A%0A%2A%2AWhy%20legacy%20charts%20make%20this%20worse%3A%2A%2A%20Leg
 acy%20charts%20have%20a%20unique%20code%20path%20where%20they%20may%20lack%20a%20saved%20query%20context%2C%20triggering%20a%20fallback%20screenshot%20to%20generate%20it.%20This%20extra%20step%20introduces%20additional%20failure%20points%20that%20can%20result%20in%20a%20blank%20render%20without%20raising%20an%20error%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/report/execute.py%29.%0A%0A%2A%2AThings%20to%20try%3A%2A%2A%0A%0A1.%20%2A%2AReplace%20the%20legacy%20bar%20chart%2A%2A%20with%20the%20modern%20ECharts%20bar%20chart%20%E2%80%94%20this%20is%20the%20most%20reliable%20fix%20if%20a%20legacy%20viz%20type%20is%20the%20root%20cause.%0A%0A2.%20%2A%2AIncrease%20screenshot%20timeout%20values%2A%2A%20in%20your%20%60superset_config.py%60%2C%20since%20charts%20may%20not%20finish%20rendering%20before%20the%20screenshot%20is%20taken%3A%0A%0A%20%20%20%60%60%60python%0A%20%20%20SCREENSHOT_SELENIUM_HEADSTART%20%3D%205%0A
 %20%20%20SCREENSHOT_LOCATE_WAIT%20%3D%2020%0A%20%20%20SCREENSHOT_LOAD_WAIT%20%3D%20120%0A%20%20%20SCREENSHOT_SELENIUM_ANIMATION_WAIT%20%3D%2010%0A%20%20%20%60%60%60%0A%0A3.%20%2A%2AEnable%20tiled%20screenshots%2A%2A%20if%20your%20dashboard%20is%20large%20or%20has%20many%20charts%20%E2%80%94%20this%20addresses%20a%20known%20issue%20where%20Chromium%20unmounts/redraws%20elements%20mid-capture%20on%20tall%20pages%20%5B%5B2%5D%5D%28https%3A//github.com/apache/superset/pull/34561%29%3A%0A%0A%20%20%20%60%60%60python%0A%20%20%20SCREENSHOT_TILED_ENABLED%20%3D%20True%0A%20%20%20SCREENSHOT_TILED_CHART_THRESHOLD%20%3D%2015%0A%20%20%20SCREENSHOT_TILED_HEIGHT_THRESHOLD%20%3D%204000%0A%20%20%20%60%60%60%0A%0A4.%20%2A%2ATry%20Playwright%2A%2A%20instead%20of%20Selenium%2C%20which%20may%20be%20more%20reliable%20for%20screenshot%20capture%3A%0A%0A%20%20%20%60%60%60python%0A%20%20%20FEATURE_FLAGS%20%3D%20%7B%0A%20%20%20%20%20%20%20%22PLAYWRIGHT_REPORTS_AND_THUMBNAILS%22%3A%20True%0A%20%20%20%7D%0A%20%
 20%20%60%60%60%0A%0A5.%20%2A%2ACheck%20your%20logs%20for%20this%20warning%3A%2A%2A%20%60%22No%20query%20context%20found%2C%20taking%20a%20screenshot%20to%20generate%20it%22%60%20%E2%80%94%20it%20indicates%20a%20legacy%20chart%20is%20hitting%20the%20fallback%20path%20%5B%5B1%5D%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/commands/report/execute.py%29.%0A%0AAs%20for%20your%20core%20question%20about%20%2Awhy%20the%20report%20doesn%27t%20fail%20with%20an%20error%2A%20%E2%80%94%20this%20is%20essentially%20a%20gap%20in%20Superset%27s%20validation.%20There%20are%20related%20issues%20tracking%20this%3A%20%5B%2325187%5D%28https%3A//github.com/apache/superset/issues/25187%29%20and%20%5B%2314351%5D%28https%3A//github.com/apache/superset/issues/14351%29.%20Content-aware%20validation%20%28detecting%20blank%20images%20before%20sending%29%20hasn%27t%20been%20implemented%20yet.)&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=
 discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord)&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/issues/39070)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org