Repository navigation
Dashboard Thumbnails couldn't show at the Dashboard page, but in Home and Chart pages shows them correctly #30287
Copy link
Copy link
Closed
Labels
dashboardNamespace | Anything related to the DashboardNamespace | Anything related to the Dashboardglobal:errorRelated to global errors affecting the platformRelated to global errors affecting the platforminfra:cachingInfra setup and configuration related to cachingInfra setup and configuration related to caching
Description
Bug description
When I visiting Home and Charts page, I can see thumbnails correctly, but when I visit Dashboard page I can't see thumbnails. I configured S3 caching for thumbnails like below in superset_config.py:
def init_thumbnail_cache(app, config, cache_args, cache_options) -> S3Cache:
return S3Cache("superset-result-backend-cache", 'thumbnails/')
THUMBNAIL_CACHE_CONFIG = {'CACHE_TYPE': 'superset_config.init_thumbnail_cache'}
THUMBNAIL_SELENIUM_USER = get_env("THUMBNAIL_SELENIUM_USER", default="Admin")
THUMBNAIL_EXECUTE_AS = [ExecutorType.SELENIUM]At the behind, I am seeing logs like below:
2024-09-16 14:45:23,017:WARNING:superset.common.utils.query_cache_manager:force_cached (QueryContext): value not found for key 9e7535a0f4d4bd1307c7e630a3756c0e
2024-09-16 14:48:42,882:INFO:superset.utils.screenshots:Attempting to get from cache: aa065c951be3dedba518d13eac81976d
2024-09-16 14:48:42,893:INFO:superset.utils.screenshots:Attempting to get from cache: 318a398cd116f164114f22aca987c5e9
2024-09-16 14:48:43,262:INFO:superset.utils.screenshots:Attempting to get from cache: 96feaa217625a1c02d3c42b62841287b
/home/superset/superset/venv/lib/python3.11/site-packages/_distutils_hack/__init__.py:31: UserWarning: Setuptools is replacing distutils. Support for replacing an already imported distutils is deprecated. In the future, this condition will fail. Register concerns at https://github.com/pypa/setuptools/issues/new?template=distutils-deprecation.yml
warnings.warn(
2024-09-16 14:48:44,990:ERROR:superset.utils.json:JSON is not valid Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/home/superset/superset/venv/lib/python3.11/site-packages/superset/utils/json.py", line 244, in loads
return simplejson.loads(
^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/__init__.py", line 514, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/decoder.py", line 386, in decode
obj, end = self.raw_decode(s)
^^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/decoder.py", line 416, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2024-09-16 14:48:45,108:ERROR:superset.utils.json:JSON is not valid Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/home/superset/superset/venv/lib/python3.11/site-packages/superset/utils/json.py", line 244, in loads
return simplejson.loads(
^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/__init__.py", line 514, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/decoder.py", line 386, in decode
obj, end = self.raw_decode(s)
^^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/decoder.py", line 416, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
2024-09-16 14:48:45,244:ERROR:superset.utils.json:JSON is not valid Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "/home/superset/superset/venv/lib/python3.11/site-packages/superset/utils/json.py", line 244, in loads
return simplejson.loads(
^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/__init__.py", line 514, in loads
return _default_decoder.decode(s)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/decoder.py", line 386, in decode
obj, end = self.raw_decode(s)
^^^^^^^^^^^^^^^^^^
File "/home/superset/superset/venv/lib/python3.11/site-packages/simplejson/decoder.py", line 416, in raw_decode
return self.scan_once(s, idx=_w(s, idx).end())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
How to reproduce the bug
- Go to Dashboard page
- Check thumbnails on page
Screenshots/recordings
Superset version
master / latest-dev
Python version
3.11
Node version
16
Browser
Chrome
Additional context
I am using Apache Superset 4.1.0rc2 version :)
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.
Reactions are currently unavailable
Metadata
Metadata
Labels
dashboardNamespace | Anything related to the DashboardNamespace | Anything related to the Dashboardglobal:errorRelated to global errors affecting the platformRelated to global errors affecting the platforminfra:cachingInfra setup and configuration related to cachingInfra setup and configuration related to caching
Type
Projects
- StatusShow more project fieldsCherried


Activity
dosubot commentedon Sep 16, 2024
@mpolatcan Hello! I'm here to help you with any bugs, questions, or contributions.
I found some similar issues that might help you:
[Question] Are dashboard thumbnails generated periodically? (Closed)
[chart] "Unexpected error" in Dashboard thumbnails (Superset 1.0.1) (Closed)
Why does only the thumbnail function in the chart work? The dashboard does not appear. (Closed)
Regarding your specific issue, the problem might be related to the caching logic for the Dashboard thumbnails. Ensure that the
cache_dashboard_thumbnailfunction is being triggered correctly and that thethumbnail_cacheis properly configured and accessible. Check the logs for any warnings or errors related to the caching process, as indicated by the logging statements in the code:If the cache is not set, the function will refuse to compute the thumbnail, which could explain why the thumbnails are not appearing on the Dashboard page [4].
Additionally, there are specific differences in how the Home, Chart, and Dashboard pages handle thumbnail caching and retrieval. The
DashboardScreenshotclass has specific configurations for handling thumbnails, including different default window and thumbnail sizes, URL modifications, and cache key parameters [5][6][7][4][8].Ensure that your S3 cache is correctly configured and accessible, and verify that the
cache_dashboard_thumbnailfunction is being called as expected.To continue talking to Dosu, mention @dosu.
rusackas commentedon Sep 16, 2024
Assigning to @geido , but also CC-ing @yousoph / @kasiazjc - not sure how long this has gone unreported, but that makes me wonder about the utility/discoverability of the thumbnail views.
iercan commentedon Jan 17, 2025
We are facing the same issue on 4.1.1 despite using Redis cache.
ryepezb1 commentedon Jan 22, 2025
Alguien pudo solucionar el problema??? sigo sin poder solucionarlo
JustGui commentedon Mar 13, 2025
Using version 5.0.0rc1 with Redis for cache, Firefox & Playwright to generate screenshots, we also can see the screenshots in tabs Home & Charts but nothing on the tab Dashboards
Looking at the network console I can see that the thumbnails are just not called by the interface on the tab Dashboards, when they are called for the tabs Home & Charts
pang-wu commentedon Mar 24, 2025
+1 here, on 5.0.0rc1 thumbnails are just not called by the interface on the tab Dashboards
pellepelle3 commentedon Apr 17, 2025
+1
romankevich commentedon May 6, 2025
+1
4.1.2
rad-pat commentedon May 16, 2025
This seems to have been since #28609.
Adding the
thumbnail_urlinto the list of columns retrieved seems to fix the issue in my local build, though I don't understand the PR comment wrtthumbnail_url@dpgasparrad-pat commentedon May 16, 2025
OK, I get it now. Calculating the digest can take some time for lots of dashboards. Anyway it somehow seems that, since that change, a request is made to each dashboard by id to get the thumbnail_url, but the
setThumbnailUrldoesn't appear to request the thumbnail blob.