Dashboard thumbnails not visible - Superset 1.0.0

See original GitHub issue

One of the features highlighted in the latest release is to have a concise view of all the favourite dashboards on the home screen . This is accomplished by the dashboard thumbnails , but that doesn’t seem to work .

Expected results

A home screen with dashboard thumbnails like this : https://github.com/apache/superset/tree/master/RELEASING/release-notes-1-0#user-experience

Actual results

image

I have tried setting up the following flags , but that too doesn’t help .

THUMBNAILS = True
THUMBNAIL_SELENIUM_USER = "admin"
THUMBNAIL_CACHE_CONFIG: CacheConfig = {
    "CACHE_TYPE": "null",
    "CACHE_NO_NULL_WARNING": True,
}

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:27 (13 by maintainers)

github_iconTop GitHub Comments

7reactions
abhii-singhcommented, Feb 2, 2021

For anyone who might need , here are the settings that helped me

make sure you pull the latest master branch ( this doesn’t work on the current superset - 1.0.0 ) or use 1.0.1 ( or later) once it is released.

Using Chrome :

Install chrome webdriver:

RUN wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb && \
    apt install -y ./google-chrome-stable_current_amd64.deb && \
    wget https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip && \
    unzip chromedriver_linux64.zip && \
    chmod +x chromedriver && \
    mv chromedriver /usr/bin && \
    rm -f google-chrome-stable_current_amd64.deb chromedriver_linux64.zip

Add following to the config:

FEATURE_FLAGS = { "THUMBNAILS" : True, "LISTVIEWS_DEFAULT_CARD_VIEW" : True}
THUMBNAIL_SELENIUM_USER = "admin"
THUMBNAIL_CACHE_CONFIG: CacheConfig = {
    'CACHE_TYPE': 'redis',
    'CACHE_DEFAULT_TIMEOUT': 24*60*60,
    'CACHE_KEY_PREFIX': 'thumbnail_',
    'CACHE_NO_NULL_WARNING': True,
    'CACHE_REDIS_URL': 'redis://redis:6379/1'
}


WEBDRIVER_TYPE= "chrome"
# for older versions this was  EMAIL_REPORTS_WEBDRIVER = "chrome"
WEBDRIVER_OPTION_ARGS = [
        "--force-device-scale-factor=2.0",
        "--high-dpi-support=2.0",
        "--headless",
        "--disable-gpu",
        "--disable-dev-shm-usage",
        "--no-sandbox",
        "--disable-setuid-sandbox",
        "--disable-extensions",
        ]

Using Firefox :

Install gecko and firefox:

RUN apt-get update && apt-get install -y firefox-esr

ENV GECKODRIVER_VERSION 0.29.0
RUN wget --no-verbose -O /tmp/geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/v$GECKODRIVER_VERSION/geckodriver-v$GECKODRIVER_VERSION-linux64.tar.gz \
  && rm -rf /opt/geckodriver \
  && tar -C /opt -zxf /tmp/geckodriver.tar.gz \
  && rm /tmp/geckodriver.tar.gz \
  && mv /opt/geckodriver /opt/geckodriver-$GECKODRIVER_VERSION \
  && chmod 755 /opt/geckodriver-$GECKODRIVER_VERSION \
  && ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/geckodriver \
  && ln -fs /opt/geckodriver-$GECKODRIVER_VERSION /usr/bin/wires

Add following to the config:

FEATURE_FLAGS = { "THUMBNAILS" : True, "LISTVIEWS_DEFAULT_CARD_VIEW" : True}
THUMBNAIL_SELENIUM_USER = "admin"
THUMBNAIL_CACHE_CONFIG: CacheConfig = {
    'CACHE_TYPE': 'redis',
    'CACHE_DEFAULT_TIMEOUT': 24*60*60,
    'CACHE_KEY_PREFIX': 'thumbnail_',
    'CACHE_NO_NULL_WARNING': True,
    'CACHE_REDIS_URL': 'redis://redis:6379/1'
}


WEBDRIVER_TYPE= "firefox"
# for older versions this was  EMAIL_REPORTS_WEBDRIVER = "firefox"
WEBDRIVER_OPTION_ARGS = [
        "--force-device-scale-factor=2.0",
        "--high-dpi-support=2.0",
        "--headless",
        "--disable-gpu",
        "--disable-dev-shm-usage",
        "--no-sandbox",
        "--disable-setuid-sandbox",
        "--disable-extensions",
        ]

2reactions
vishalsawale9commented, Apr 14, 2021

@singh-ab @iercan

Is this fixed in superset 1.0.1? My superset app version is 1.0.1 & I’m still getting similar errors for pulling thumbnails on superset welcome page.

Logs from container where I’m running superset

Triggering thumbnail compute (chart id: 7) ASYNC
INFO:superset.charts.api:Triggering thumbnail compute (chart id: 7) ASYNC
192.168.35.64 - - [06/Apr/2021:19:34:44 +0000] "GET /api/v1/chart/favorite_status/?q=%21%2815%2C14%2C7%29 HTTP/1.1" 200 81 
Failed at getting from cache: 57b7c1cae9ca67456a4f4b24d2f0d0c7
INFO:superset.utils.screenshots:Failed at getting from cache: 57b7c1cae9ca67456a4f4b24d2f0d0c7
Triggering thumbnail compute (chart id: 15) ASYNC

And celery logs says something arg mismatch as below:

[2021-04-12 17:46:08,657: INFO/ForkPoolWorker-3] Init selenium driver
Failed at generating thumbnail __init__() takes 2 positional arguments but 3 were given
[2021-04-12 17:46:09,068: ERROR/ForkPoolWorker-1] Failed at generating thumbnail __init__() takes 2 positional arguments but 3 were given
Failed at generating thumbnail __init__() takes 2 positional arguments but 3 were given
[2021-04-12 17:46:09,778: ERROR/ForkPoolWorker-4] Failed at generating thumbnail __init__() takes 2 positional arguments but 3 were given
Failed at generating thumbnail __init__() takes 2 positional arguments but 3 were given

Should I pull master or dev image ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dashboard thumbnails not visible - Superset 1.0.0
... on issue #12867: Dashboard thumbnails not visible - Superset 1.0.0 ... superset - 1.0.0 ) or use 1.0.1 ( or later) once...
Read more >
Alerts and Reports - Apache Superset
Users can configure automated alerts and reports to send dashboards or charts to an email recipient or Slack channel. Alerts are sent when...
Read more >
Release Notes for Superset 1.0.0
Superset 1.0 is a huge milestone for Apache Superset. ... Lists of Charts and Dashboards can be shown in a new format using...
Read more >
Superset. Error while sending report by email - Stack Overflow
Sendings reports (dashboards) by email is configured. ... at generating thumbnail 'WebDriver' object has no attribute 'screenshot' Report ...
Read more >
Apache Superset / Preset : Create a table as a dashboard ...
This video shows you workaround how to create a table as a library of your dashboards … Show more. Show more. Show less....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found