Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard thumbnails not visible - Superset 1.0.0 #12867

Closed
abhii-singh opened this issue Feb 1, 2021 · 27 comments
Closed

Dashboard thumbnails not visible - Superset 1.0.0 #12867

abhii-singh opened this issue Feb 1, 2021 · 27 comments
Labels
install:config Installation - Configuration settings .pinned Draws attention viz:thumbnail

Comments

@abhii-singh
Copy link

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,
}
@abhii-singh abhii-singh added the #bug Bug report label Feb 1, 2021
@dpgaspar
Copy link
Member

dpgaspar commented Feb 1, 2021

@singh-ab have you setup celery? if yes, can you share your celery config and logs?

@dpgaspar dpgaspar added install:config Installation - Configuration settings and removed #bug Bug report labels Feb 1, 2021
@iercan
Copy link
Contributor

iercan commented Feb 1, 2021

@singh-ab You need to configure celery and proper webdriver. Also not that there was en error regarding thumbnails and fixed in 1.0.1. see #12760

I'm using chrome webdriver. This is how I installed

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

And added these lines to my config.

WEBDRIVER_TYPE= "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",
        ]

You can check here to see how to configure celery
https://superset.apache.org/docs/installation/cache

@abhii-singh
Copy link
Author

@dpgaspar : I tried the usual docker-compose up

Here is the log from superset_worker:

Skipping local overrides
Starting Celery worker...
INFO:superset.utils.logging_configurator:logging was configured successfully
/usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
  "Flask-Caching: CACHE_TYPE is set to null, "
/usr/local/lib/python3.7/site-packages/celery/platforms.py:801: RuntimeWarning: You're running the worker with superuser privileges: this is
absolutely not recommended!

Please specify a different user using the --uid option.

User information: uid=0 euid=0 gid=0 egid=0

  uid=uid, euid=euid, gid=gid, egid=egid,
[2021-02-01 14:31:59,717: INFO/MainProcess] Connected to redis://redis:6379/0
[2021-02-01 14:31:59,756: INFO/MainProcess] mingle: searching for neighbors
[2021-02-01 14:32:00,786: INFO/MainProcess] mingle: all alone
[2021-02-01 14:32:00,806: INFO/MainProcess] celery@50c37f5a2ad2 ready.

Here is the log from superset_app :

Skipping local overrides
Starting web app...
 * Serving Flask app "superset.app:create_app()" (lazy loading)
 * Environment: development
 * Debug mode: on
 * Running on http://0.0.0.0:8088/ (Press CTRL+C to quit)
 * Restarting with stat
INFO:superset.utils.logging_configurator:logging was configured successfully
 * Debugger is active!
 * Debugger PIN: 238-197-157
INFO:superset.utils.logging_configurator:logging was configured successfully
/usr/local/lib/python3.7/site-packages/flask_caching/__init__.py:192: UserWarning: Flask-Caching: CACHE_TYPE is set to null, caching is effectively disabled.
  "Flask-Caching: CACHE_TYPE is set to null, "
192.168.208.1 - - [01/Feb/2021 14:42:47] "GET / HTTP/1.1" 302 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:47] "GET / HTTP/1.1" 302 -
DEBUG:superset.stats_logger:[stats_logger] (incr) welcome
192.168.208.1 - - [01/Feb/2021 14:42:47] "GET /superset/welcome HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:47] "GET /superset/welcome HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:47] "GET /static/assets/thumbnail.b3d5cef5.chunk.js HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:47] "GET /static/assets/thumbnail.b3d5cef5.chunk.js HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:48] "GET /static/assets/4.b3d5cef5.chunk.js HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:48] "GET /static/assets/4.b3d5cef5.chunk.js HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:48] "GET /static/assets/3.b3d5cef5.chunk.js HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:48] "GET /static/assets/3.b3d5cef5.chunk.js HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:48] "GET /static/assets/crudViews.b3d5cef5.entry.js HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:48] "GET /static/assets/crudViews.b3d5cef5.entry.js HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:48] "GET /static/assets/mathjs.b3d5cef5.chunk.js HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:48] "GET /static/assets/mathjs.b3d5cef5.chunk.js HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:49] "GET /static/assets/theme.b3d5cef5.entry.js HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:49] "GET /static/assets/theme.b3d5cef5.entry.js HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:49] "GET /static/assets/vendors.b3d5cef5.chunk.js HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:49] "GET /static/assets/vendors.b3d5cef5.chunk.js HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) welcome
192.168.208.1 - - [01/Feb/2021 14:42:50] "GET /superset/welcome HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:50] "GET /superset/welcome HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) recent_activity
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /superset/recent_activity/1/?limit=6 HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /superset/recent_activity/1/?limit=6 HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) SavedQueryRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) SavedQueryRestApi.get_list.time | 160.52659999695607
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/saved_query/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/saved_query/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.get_list.time | 322.13330001104623
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.get_list.time | 295.6807999871671
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/dashboard/?q=(filters:!((col:changed_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/dashboard/?q=(filters:!((col:changed_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/chart/?q=(filters:!((col:changed_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.get_list.success
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/chart/?q=(filters:!((col:changed_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.get_list.time | 263.58439997420646
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.get_list.time | 348.90519999316894
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/dashboard/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/dashboard/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/chart/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/chart/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.get_list.time | 76.92270001280122
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.get_list.time | 113.88749998877756
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/chart/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/chart/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/dashboard/2/thumbnail/c9dae48ee192ba930f1bf5abbdfd2ffc/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:52] "GET /api/v1/dashboard/2/thumbnail/c9dae48ee192ba930f1bf5abbdfd2ffc/ HTTP/1.1" 404 -
192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/72/thumbnail/ef60d0fe5ec0f34875bea138e096601a/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/72/thumbnail/ef60d0fe5ec0f34875bea138e096601a/ HTTP/1.1" 404 -
192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/71/thumbnail/443edfa02dc5e1b835e623b428fc5071/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/71/thumbnail/443edfa02dc5e1b835e623b428fc5071/ HTTP/1.1" 404 -
192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/70/thumbnail/cca95388580b3de0a239a38ea049d123/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/70/thumbnail/cca95388580b3de0a239a38ea049d123/ HTTP/1.1" 404 -
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.info.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.info.time | 13.654099981067702
DEBUG:superset.stats_logger:[stats_logger] (incr) SavedQueryRestApi.info.success
DEBUG:superset.stats_logger:[stats_logger] (timing) SavedQueryRestApi.info.time | 21.71289999387227
192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/saved_query/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/saved_query/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.favorite_status.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.favorite_status.time | 38.65820000646636
192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/dashboard/favorite_status/?q=%21%282%29 HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/dashboard/favorite_status/?q=%21%282%29 HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.info.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.info.time | 44.77269999915734
192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/dashboard/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/dashboard/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.favorite_status.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.favorite_status.time | 27.773900015745312
192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/favorite_status/?q=%21%2872%2C71%2C70%29 HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:53] "GET /api/v1/chart/favorite_status/?q=%21%2872%2C71%2C70%29 HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:42:55] "GET /dashboard/list/ HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:55] "GET /dashboard/list/ HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.related.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.related.time | 27.68659999128431
192.168.208.1 - - [01/Feb/2021 14:42:57] "GET /api/v1/dashboard/related/owners?q=() HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:57] "GET /api/v1/dashboard/related/owners?q=() HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.related.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.related.time | 34.16979999747127
192.168.208.1 - - [01/Feb/2021 14:42:57] "GET /api/v1/dashboard/related/created_by?q=() HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:57] "GET /api/v1/dashboard/related/created_by?q=() HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.info.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.info.time | 41.817699995590374
192.168.208.1 - - [01/Feb/2021 14:42:57] "GET /api/v1/dashboard/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:57] "GET /api/v1/dashboard/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.get_list.time | 167.60139999678358
192.168.208.1 - - [01/Feb/2021 14:42:57] "GET /api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:25) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:57] "GET /api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:25) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.favorite_status.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.favorite_status.time | 12.505599996075034
192.168.208.1 - - [01/Feb/2021 14:42:58] "GET /api/v1/dashboard/favorite_status/?q=%21%2811%2C10%2C9%2C8%2C7%2C6%2C5%2C4%2C3%2C2%2C1%29 HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:42:58] "GET /api/v1/dashboard/favorite_status/?q=%21%2811%2C10%2C9%2C8%2C7%2C6%2C5%2C4%2C3%2C2%2C1%29 HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) favstar
192.168.208.1 - - [01/Feb/2021 14:43:00] "GET /superset/favstar/Dashboard/11/select/ HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:00] "GET /superset/favstar/Dashboard/11/select/ HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) favstar
192.168.208.1 - - [01/Feb/2021 14:43:02] "GET /superset/favstar/Dashboard/9/select/ HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:02] "GET /superset/favstar/Dashboard/9/select/ HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:43:04] "GET / HTTP/1.1" 302 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:04] "GET / HTTP/1.1" 302 -
DEBUG:superset.stats_logger:[stats_logger] (incr) welcome
192.168.208.1 - - [01/Feb/2021 14:43:04] "GET /superset/welcome HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:04] "GET /superset/welcome HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) recent_activity
192.168.208.1 - - [01/Feb/2021 14:43:04] "GET /superset/recent_activity/1/?limit=6 HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:04] "GET /superset/recent_activity/1/?limit=6 HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.get_list.time | 300.62809999799356
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.get_list.success
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/?q=(filters:!((col:changed_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.get_list.time | 351.38169999117963
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/?q=(filters:!((col:changed_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/?q=(filters:!((col:changed_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/?q=(filters:!((col:changed_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.get_list.time | 381.0327000101097
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.get_list.time | 400.02579998690635
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) SavedQueryRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) SavedQueryRestApi.get_list.time | 357.0880999905057
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/saved_query/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/saved_query/?q=(filters:!((col:created_by,opr:rel_o_m,value:%271%27)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.get_list.time | 67.48009999864735
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.get_list.time | 117.36219999147579
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/?q=(order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/2/thumbnail/c9dae48ee192ba930f1bf5abbdfd2ffc/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/2/thumbnail/c9dae48ee192ba930f1bf5abbdfd2ffc/ HTTP/1.1" 404 -
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/72/thumbnail/ef60d0fe5ec0f34875bea138e096601a/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/72/thumbnail/ef60d0fe5ec0f34875bea138e096601a/ HTTP/1.1" 404 -
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/71/thumbnail/443edfa02dc5e1b835e623b428fc5071/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/71/thumbnail/443edfa02dc5e1b835e623b428fc5071/ HTTP/1.1" 404 -
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/70/thumbnail/cca95388580b3de0a239a38ea049d123/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/70/thumbnail/cca95388580b3de0a239a38ea049d123/ HTTP/1.1" 404 -
DEBUG:superset.stats_logger:[stats_logger] (incr) SavedQueryRestApi.info.success
DEBUG:superset.stats_logger:[stats_logger] (timing) SavedQueryRestApi.info.time | 27.36670000012964
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/saved_query/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/saved_query/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.favorite_status.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.favorite_status.time | 43.03339999751188
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/favorite_status/?q=%21%282%29 HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/favorite_status/?q=%21%282%29 HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.info.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.info.time | 27.895099978195503
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.info.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.info.time | 67.32380000175908
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/dashboard/_info?q=(keys:!(permissions)) HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) ChartRestApi.favorite_status.success
DEBUG:superset.stats_logger:[stats_logger] (timing) ChartRestApi.favorite_status.time | 42.36959997797385
192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/favorite_status/?q=%21%2872%2C71%2C70%29 HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:05] "GET /api/v1/chart/favorite_status/?q=%21%2872%2C71%2C70%29 HTTP/1.1" 200 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.get_list.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.get_list.time | 39.10569997970015
192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/?q=(filters:!((col:id,opr:dashboard_is_favorite,value:!t)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/?q=(filters:!((col:id,opr:dashboard_is_favorite,value:!t)),order_column:changed_on_delta_humanized,order_direction:desc,page:0,page_size:3) HTTP/1.1" 200 -
192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/9/thumbnail/57362cc36c0ec9ca64aa8edab4c4f55f/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/9/thumbnail/57362cc36c0ec9ca64aa8edab4c4f55f/ HTTP/1.1" 404 -
192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/11/thumbnail/8bf19312837ae18e830c70cde2e1eec3/ HTTP/1.1" 404 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/11/thumbnail/8bf19312837ae18e830c70cde2e1eec3/ HTTP/1.1" 404 -
192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/favorite_status?q=%21%2811%2C9%29 HTTP/1.1" 308 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/favorite_status?q=%21%2811%2C9%29 HTTP/1.1" 308 -
DEBUG:superset.stats_logger:[stats_logger] (incr) DashboardRestApi.favorite_status.success
DEBUG:superset.stats_logger:[stats_logger] (timing) DashboardRestApi.favorite_status.time | 6.736199982697144
192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/favorite_status/?q=%21%2811%2C9%29 HTTP/1.1" 200 -
INFO:werkzeug:192.168.208.1 - - [01/Feb/2021 14:43:06] "GET /api/v1/dashboard/favorite_status/?q=%21%2811%2C9%29 HTTP/1.1" 200

@abhii-singh
Copy link
Author

@iercan : thanks ! let me give this a try and get back

@rmgpinto
Copy link
Contributor

rmgpinto commented Feb 1, 2021

I have on config:

def auth_driver(driver, user):
    pass


WEBDRIVER_AUTH_FUNC = auth_driver

And followed your steps and get on superset-worker:

Failed at generating thumbnail 'NoneType' object has no attribute 'set_window_size'

@abhii-singh
Copy link
Author

@iercan : I tried using chrome webdriver and the recommended settings . still the same error .

Note: I am still on superset - 1.0.0

@rmgpinto : could you share part of your dockerfile and the superset config. I don't seem to get any error in my celery worker regarding this

@rmgpinto
Copy link
Contributor

rmgpinto commented Feb 2, 2021

I am using the helm charts on this repo.

@iercan
Copy link
Contributor

iercan commented Feb 2, 2021

@singh-ab Can you check worker logs while thumbnails creation process started? Logs you send doesn't show any relevant error.

@rmgpinto You don't need to define WEBDRIVER_AUTH_FUNC. That is just an example in documentation to show how you should define it. Maybe that causes error.

@rmgpinto
Copy link
Contributor

rmgpinto commented Feb 2, 2021

@iercan I use OAUTH to authenticate, isn't the function defined in WEBDRIVER_AUTH_FUNC used to override the authentication from superset?

@iercan
Copy link
Contributor

iercan commented Feb 2, 2021

@iercan I use OAUTH to authenticate, isn't the function defined in WEBDRIVER_AUTH_FUNC used to override the authentication from superset?

It is optional. I'm also using OAUTH and didn't need to define.

@rmgpinto
Copy link
Contributor

rmgpinto commented Feb 2, 2021

Thanks @iercan, it worked.

@abhii-singh
Copy link
Author

@iercan : Looking at the worker logs when generating the thumbnails gives me similar error like the one you raised - #12726

As you pointed out it is fixed in 1.0.1 , but I can't seem to find a relevant docker image for the same on - https://hub.docker.com/r/apache/superset/tags?page=1&ordering=last_updated .

@dpgaspar
Copy link
Member

dpgaspar commented Feb 2, 2021

@singh-ab note that 1.0.1 is not out yet, but master tag should include that fix

@abhii-singh
Copy link
Author

abhii-singh commented Feb 2, 2021

@dpgaspar : thanks !

post pulling master the logs at-least show that the thumbnails are being generated . But still that doesn't help

Screenshot :
Dashboard page :

image

Welcome page:

image

Logs :

INFO:superset.viz:Cache key: 11eb5ff9e39cdd6459a3d788ae163481
SELECT DATE(ds) AS __timestamp, name AS name, sum(num) AS `Births`
FROM birth_names INNER JOIN (SELECT name AS name__, sum(num) AS mme_inner__
FROM birth_names
WHERE ds >= STR_TO_DATE('1921-02-02 00:00:00.000000', '%Y-%m-%d %H:%i:%s.%f') AND ds < STR_TO_DATE('2021-02-02 15:12:25.000000', '%Y-%m-%d %H:%i:%s.%f') GROUP BY name ORDER BY mme_inner__ DESC
 LIMIT 25) AS anon_1 ON name = name__
WHERE ds >= STR_TO_DATE('1921-02-02 00:00:00.000000', '%Y-%m-%d %H:%i:%s.%f') AND ds < STR_TO_DATE('2021-02-02 15:12:25.000000', '%Y-%m-%d %H:%i:%s.%f') GROUP BY name, DATE(ds)
 LIMIT 50000
INFO:superset.connectors.sqla.models:SELECT DATE(ds) AS __timestamp, name AS name, sum(num) AS `Births`
FROM birth_names INNER JOIN (SELECT name AS name__, sum(num) AS mme_inner__
FROM birth_names
WHERE ds >= STR_TO_DATE('1921-02-02 00:00:00.000000', '%Y-%m-%d %H:%i:%s.%f') AND ds < STR_TO_DATE('2021-02-02 15:12:25.000000', '%Y-%m-%d %H:%i:%s.%f') GROUP BY name ORDER BY mme_inner__ DESC
 LIMIT 25) AS anon_1 ON name = name__
WHERE ds >= STR_TO_DATE('1921-02-02 00:00:00.000000', '%Y-%m-%d %H:%i:%s.%f') AND ds < STR_TO_DATE('2021-02-02 15:12:25.000000', '%Y-%m-%d %H:%i:%s.%f') GROUP BY name, DATE(ds)
 LIMIT 50000
Taking a PNG screenshot or url http://localhost:8088/superset/dashboard/7/
[2021-02-02 15:12:25,636: INFO/MainProcess] Taking a PNG screenshot or url http://localhost:8088/superset/dashboard/7/
Taking a PNG screenshot or url http://localhost:8088/superset/dashboard/6/
[2021-02-02 15:12:26,126: INFO/MainProcess] Taking a PNG screenshot or url http://localhost:8088/superset/dashboard/6/
Caching thumbnail: b1b272c7edcbd48f7a88914cb9ee5c83
[2021-02-02 15:12:26,440: INFO/MainProcess] Caching thumbnail: b1b272c7edcbd48f7a88914cb9ee5c83
Done caching thumbnail
[2021-02-02 15:12:26,453: INFO/MainProcess] Done caching thumbnail
Caching thumbnail: c1a73f710926936f5b6f771ef12b6ca5
[2021-02-02 15:12:26,950: INFO/MainProcess] Caching thumbnail: c1a73f710926936f5b6f771ef12b6ca5
Done caching thumbnail
[2021-02-02 15:12:26,950: INFO/MainProcess] Done caching thumbnail
Taking a PNG screenshot or url http://localhost:8088/superset/dashboard/2/
[2021-02-02 15:12:27,848: INFO/MainProcess] Taking a PNG screenshot or url http://localhost:8088/superset/dashboard/2/
Taking a PNG screenshot or url http://localhost:8088/superset/slice/57/?standalone=true
[2021-02-02 15:12:27,971: INFO/MainProcess] Taking a PNG screenshot or url http://localhost:8088/superset/slice/57/?standalone=true
Caching thumbnail: 32710e46c737359435c1291fff0ec7d7
[2021-02-02 15:12:28,186: INFO/MainProcess] Caching thumbnail: 32710e46c737359435c1291fff0ec7d7
Done caching thumbnail
[2021-02-02 15:12:28,187: INFO/MainProcess] Done caching thumbnail
Caching thumbnail: 09649fd7b0995c84b86abd5721ba69b8
[2021-02-02 15:12:29,283: INFO/MainProcess] Caching thumbnail: 09649fd7b0995c84b86abd5721ba69b8
Done caching thumbnail
[2021-02-02 15:12:29,284: INFO/MainProcess] Done caching thumbnail

@iercan
Copy link
Contributor

iercan commented Feb 2, 2021

Logs looks fine. You will see thumbnails second time you visit same page.

@abhii-singh
Copy link
Author

still same when I try to visit the dashboard/welcome page again !

@iercan
Copy link
Contributor

iercan commented Feb 2, 2021

Did you provide a cache service?

For example

THUMBNAIL_CACHE_CONFIG: CacheConfig = {
    'CACHE_TYPE': 'redis',
    'CACHE_DEFAULT_TIMEOUT': 24*60*60*7,
    'CACHE_KEY_PREFIX': 'thumbnail_',
    'CACHE_REDIS_URL': 'redis://redis:6379/1'
}

@abhii-singh
Copy link
Author

indeed it was due to selecting CACHE_TYPE : null . Using the above config helped fix the issue. Thanks !

@abhii-singh
Copy link
Author

abhii-singh commented 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",
        ]

@Kingflyinger
Copy link

thanks,the same question

@vishalsawale9
Copy link

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

@nimisha1921
Copy link

nimisha1921 commented Jun 10, 2021

@singh-ab @iercan
I am facing a similar issue, dashboard thumbnail is not generated. Although my chart thumbnail working fine.
Error:

Failed at resizing thumbnail name 'Image' is not defined

Superset 1.0.1
Config:

DEFAULT_FEATURE_FLAGS = {
    'ENABLE_TEMPLATE_PROCESSING': True,
    'DASHBOARD_NATIVE_FILTERS': True,
    'LISTVIEWS_DEFAULT_CARD_VIEW': True,
    'ENABLE_REACT_CRUD_VIEWS': True,
    'ALERT_REPORTS': True,
    'THUMBNAILS': True
}
REDIS_HOST = "127.0.0.1"
REDIS_PORT = "6379"

THUMBNAIL_SELENIUM_USER = "admin"
THUMBNAIL_CACHE_CONFIG: CacheConfig = {
    'CACHE_TYPE': 'redis',
    'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24 * 30,
    'CACHE_KEY_PREFIX': 'superset_thumbnail',
    'CACHE_REDIS_URL': 'redis://%s:%s/0' % (REDIS_HOST, REDIS_PORT),
    "CACHE_NO_NULL_WARNING": True,
}

In celery worker, I am getting an error log like this...

Caching dashboard: http://127.0.0.1:8088/superset/dashboard/3/
Caching dashboard: http://127.0.0.1:8088/superset/dashboard/2/
[2021-06-10 20:08:31,291: INFO/ForkPoolWorker-2] Caching dashboard: http://127.0.0.1:8088/superset/dashboard/3/
[2021-06-10 20:08:31,291: INFO/ForkPoolWorker-3] Caching dashboard: http://127.0.0.1:8088/superset/dashboard/2/
Processing url for thumbnail: d94a2a95ca2786f26e238d8ec80e3b06
Processing url for thumbnail: 8e3f5e7e07954984ffde03b1c0b7b299
[2021-06-10 20:08:31,316: INFO/ForkPoolWorker-2] Processing url for thumbnail: d94a2a95ca2786f26e238d8ec80e3b06
Init selenium driver
[2021-06-10 20:08:31,316: INFO/ForkPoolWorker-3] Processing url for thumbnail: 8e3f5e7e07954984ffde03b1c0b7b299
Init selenium driver
[2021-06-10 20:08:31,317: INFO/ForkPoolWorker-2] Init selenium driver
[2021-06-10 20:08:31,317: INFO/ForkPoolWorker-3] Init selenium driver
Taking a PNG screenshot or url http://127.0.0.1:8088/superset/dashboard/3/
[2021-06-10 20:08:39,030: INFO/ForkPoolWorker-2] Taking a PNG screenshot or url http://127.0.0.1:8088/superset/dashboard/3/
Taking a PNG screenshot or url http://127.0.0.1:8088/superset/dashboard/2/
[2021-06-10 20:08:39,109: INFO/ForkPoolWorker-3] Taking a PNG screenshot or url http://127.0.0.1:8088/superset/dashboard/2/
Failed at resizing thumbnail name 'Image' is not defined
[2021-06-10 20:08:39,294: ERROR/ForkPoolWorker-2] Failed at resizing thumbnail name 'Image' is not defined
Failed at resizing thumbnail name 'Image' is not defined
[2021-06-10 20:08:39,383: ERROR/ForkPoolWorker-3] Failed at resizing thumbnail name 'Image' is not defined

@iercan
Copy link
Contributor

iercan commented Jun 10, 2021

@nimisha1921 I suggest you upgrade to 1.1

@nimisha1921
Copy link

@iercan upgrade to superset 1.1.0, did DB upgrade and superset init. No help, still facing the same issue.

@wchaofan
Copy link

@iercan upgrade to superset 1.1.0, did DB upgrade and superset init. No help, still facing the same issue.
the same question。my superset is 1.1.0

@diegoauad
Copy link
Contributor

In my case, it seems that pillow wasn't properly installed and the worker was unable to resize the screenshots:

celery[7177]: INFO:superset.utils.screenshots:No PIL installation found
[INFO/ForkPoolWorker-3] Taking a PNG screenshot or url http://0.0.0.0:8080/superset/dashboard/9/
celery[7355]: Failed at resizing thumbnail name 'Image' is not defined

Dashboard screenshots need to be downsized, charts don't (that's why they work). I fixed it by reinstalling pillow and restarting the worker.

@KarthikGM05
Copy link

KarthikGM05 commented Aug 8, 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",
        ]

Tried both, but for some reason when I check superset-worker logs, I get "chromedriver"/"geckodriver" executable needs to be in PATH. When go inside the container with
kubectl exec -n <NAMESPACE> --stdin --tty <POD_NAME> -- /bin/sh
I don't see chrome/gecko driver installed at all!

P.S: Superset Version: 1.2.0 and even though the Dockerfile contains gecko installation by default, I still can't find it in the container.

Edit:
Found out that drivers are not being installed because,

The following packages have unmet dependencies:
 google-chrome-stable : Depends: fonts-liberation but it is not installable
                        Depends: libasound2 (>= 1.0.16) but it is not installable
                        Depends: libatk-bridge2.0-0 (>= 2.5.3) but it is not installable
                        Depends: libatk1.0-0 (>= 2.2.0) but it is not installable
                        Depends: libatspi2.0-0 (>= 2.9.90) but it is not installable
                        Depends: libcups2 (>= 1.4.0) but it is not installable
                        Depends: libdbus-1-3 (>= 1.5.12) but it is not installable
                        Depends: libdrm2 (>= 2.4.38) but it is not installable
                        Depends: libgbm1 (>= 8.1~0) but it is not installable
                        Depends: libgtk-3-0 (>= 3.9.10) but it is not installable or
                                 libgtk-4-1 but it is not installable
                        Depends: libnspr4 (>= 2:4.9-2~) but it is not installable
                        Depends: libnss3 (>= 2:3.22) but it is not installable
                        Depends: libxcomposite1 (>= 1:0.4.4-1) but it is not installable
                        Depends: libxdamage1 (>= 1:1.1) but it is not installable
                        Depends: libxfixes3 but it is not installable
                        Depends: libxkbcommon0 (>= 0.4.1) but it is not installable
                        Depends: libxrandr2 but it is not installable
                        Depends: libxshmfence1 but it is not installable
                        Depends: xdg-utils (>= 1.0.2) but it is not installable
                        Recommends: libu2f-udev but it is not installable
                        Recommends: libvulkan1 but it is not installable

Added an install command for these and worked fine. Also make sure you have the same version of google chrome and chromedriver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:config Installation - Configuration settings .pinned Draws attention viz:thumbnail
Projects
None yet
Development

No branches or pull requests