GitHub user dosubot[bot] added a comment to the discussion: Superset Dashboard 
& Chart Screenshot Not Found

<!-- Answer -->
Your diagnosis is correct: the missing `geckodriver` is the root cause of both 
the screenshot/report failures and the “Not found” error when accessing the 
screenshot URL.

Superset requires `geckodriver` (for Firefox) or `chromedriver` (for Chrome) to 
generate screenshots for dashboards and reports. If `geckodriver` is not 
installed or not in the system `PATH`, screenshot generation will fail, and the 
cache will not be populated—leading to the “Not found” error when you try to 
fetch the image via the API. This is confirmed by the error message you 
received and by the [official 
documentation](https://github.com/apache/superset/blob/c09f8f6f7665e503a376926700fa815add6892ca/docs/docs/configuration/alerts-reports.mdx).

**How to fix:**

1. **Install `geckodriver` and Firefox**  
   Make sure both are installed and that `geckodriver` is in your system 
`PATH`. For example, on Debian/Ubuntu:
   ```sh
   sudo apt-get update
   sudo apt-get install firefox-esr
   wget -q 
https://github.com/mozilla/geckodriver/releases/download/v0.34.0/geckodriver-v0.34.0-linux64.tar.gz
   tar -xzf geckodriver-v0.34.0-linux64.tar.gz
   sudo mv geckodriver /usr/local/bin/
   sudo chmod +x /usr/local/bin/geckodriver
   ```
   You can verify installation by running `geckodriver --version` and `firefox 
--headless`.

2. **Check your Superset configuration**  
   In your `superset_config.py`, ensure:
   ```python
   WEBDRIVER_TYPE = "firefox"
   WEBDRIVER_OPTION_ARGS = ["--headless"]
   ```
   If you prefer Chrome, install `chromedriver` and set `WEBDRIVER_TYPE = 
"chrome"`.

3. **Enable required feature flags and cache**  
   Make sure these feature flags are enabled:
   ```python
   FEATURE_FLAGS = {
       "THUMBNAILS": True,
       "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": True,
   }
   ```
   Also, ensure `THUMBNAIL_CACHE_CONFIG` is not set to `NullCache` and is 
properly configured for your environment (e.g., Redis, Memcached).

4. **Restart Superset and Celery workers**  
   After making these changes, restart your Superset services and Celery 
workers to pick up the new configuration.

**Why the “Not found” error happens:**  
When you request a screenshot, Superset triggers a background task (via Celery) 
to generate and cache the image. If the screenshot generation fails (for 
example, due to missing `geckodriver`), the cache is never populated, so the 
API returns a 404 “Not found” when you try to fetch the image. This is by 
design and is confirmed in the [code and 
documentation](https://github.com/apache/superset/blob/c09f8f6f7665e503a376926700fa815add6892ca/superset/dashboards/api.py).

**References:**  
- [Superset Alerts & Reports 
configuration](https://github.com/apache/superset/blob/c09f8f6f7665e503a376926700fa815add6892ca/docs/docs/configuration/alerts-reports.mdx)
- [Relevant code for screenshot caching and 
retrieval](https://github.com/apache/superset/blob/c09f8f6f7665e503a376926700fa815add6892ca/superset/dashboards/api.py)
- [Discussion on similar issues and 
troubleshooting](https://github.com/apache/superset/discussions/31432)

Once you have `geckodriver` installed and your configuration is correct, 
screenshot and report generation should work as expected. If you still see 
issues, check your Celery worker logs for any errors during screenshot 
generation.


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

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/8f8a5cd4-c66f-4099-8707-4db372fd9a5f?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/8f8a5cd4-c66f-4099-8707-4db372fd9a5f?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/8f8a5cd4-c66f-4099-8707-4db372fd9a5f?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/8f8a5cd4-c66f-4099-8707-4db372fd9a5f?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/8f8a5cd4-c66f-4099-8707-4db372fd9a5f?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/8f8a5cd4-c66f-4099-8707-4db372fd9a5f?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/8f8a5cd4-c66f-4099-8707-4db372fd9a5f?feedback_type=other)</sup>&nbsp;&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Sh
 are 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/33660)

GitHub link: 
https://github.com/apache/superset/discussions/33660#discussioncomment-13339497

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