GitHub user Ramicorrea-Chimi created a discussion: ChunkLoadError when 
generating dashboard screenshot using 
/api/v1/dashboard/{pk}/cache_dashboard_screenshot/

Hi folks,
I'm trying to generate a PDF dashboard export using the REST API from an 
embedded dashboard. This works just fine locally, but in the deployed version, 
the generated PDF output looks like this:

<img width="1600" height="1200" alt="image" 
src="https://github.com/user-attachments/assets/5026b2f0-dec5-4324-bd8d-269763cf0b71";
 />

I'm pretty sure the paths are well specified in my config. 
Logs on superset-worker show that it's caching the screenshot at the desired 
URL, and accessing that same URL from a browser shows the dashboard just as I 
want it. However, the cached screenshot has this ChunkLoadError.

I'm using Playwright and chromium.

```
FROM apache/superset:6.0.0-dev

USER root

RUN . /app/.venv/bin/activate && \
    uv pip install playwright && \
    playwright install-deps && \
    PLAYWRIGHT_BROWSERS_PATH=/usr/local/share/playwright-browsers playwright 
install chromium

COPY ./docker /app/docker

USER superset
```

```FEATURE_FLAGS = {
    "ALERT_REPORTS": True,
    "EMBEDDED_SUPERSET": True,
    "ENABLE_CORS": True,
    "ENABLE_PROXY_FIX": True,
    "ENABLE_TEMPLATE_PROCESSING": True,
    "AVOID_COLORS_COLLISION": False,
    "THUMBNAILS": True,
    "ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS": True,
    "PLAYWRIGHT_REPORTS_AND_THUMBNAILS": True
}


WEBDRIVER_BASEURL = os.getenv("WEBDRIVER_BASEURL")```

The WEBDRIVER_BASEURL points to my deployed superset app.




GitHub link: https://github.com/apache/superset/discussions/37062

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