stanbiryukov opened a new issue #13483:
URL: https://github.com/apache/superset/issues/13483


   I read through some related issues but still can't resolve getting the 
superset worker to appropriately cache thumbnails. I've installed chrome utils, 
my `config.py` file has the following and I'm pulling a recent image `FROM 
apache/superset:d2e03ab9b4f6e941040cf60153599b1a64e28ce6`
   
   ```
   WEBDRIVER_TYPE = "chrome"
   def auth_driver(driver: WebDriver, user: "User") -> WebDriver:
       pass
   
   WEBDRIVER_AUTH_FUNC = auth_driver
   
   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",
           ]
   
   WEBDRIVER_BASEURL = "http://0.0.0.0:8088/";
   
   FEATURE_FLAGS = { "THUMBNAILS" : True, "LISTVIEWS_DEFAULT_CARD_VIEW" : True, 
"THUMBNAILS_SQLA_LISTENERS" : True, "DASHBOARD_NATIVE_FILTERS" : True, 
"OMNIBAR": 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'
   }
   ```
   
   Relevant error:
   
   ```
   superset_1  | Triggering thumbnail compute (chart id: 70) ASYNC
   superset_1  | INFO:superset.charts.api:Triggering thumbnail compute (chart 
id: 70) ASYNC
   worker_1    | Processing url for thumbnail: 2d1d2b861263ff01562aa66ab5dcb0a5
   worker_1    | [2021-03-05 15:28:31,412: INFO/MainProcess] Received task: 
cache_chart_thumbnail[f3045225-ef9e-4943-a920-eb8ab2b2c8da]  
   worker_1    | [2021-03-05 15:28:31,412: INFO/ForkPoolWorker-2] Processing 
url for thumbnail: 2d1d2b861263ff01562aa66ab5dcb0a5
   worker_1    | Init selenium driver
   superset_1  | 172.20.0.1 - - [05/Mar/2021:15:28:31 +0000] "GET 
/api/v1/saved_query/_info?q=(keys:!(permissions)) HTTP/1.1" 200 41 
"http://0.0.0.0:8088/superset/welcome/"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 
11_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 
Safari/537.36"
   worker_1    | [2021-03-05 15:28:31,413: INFO/ForkPoolWorker-2] Init selenium 
driver
   worker_1    | Caching chart: 
http://0.0.0.0:8088/superset/slice/70/?standalone=true
   worker_1    | [2021-03-05 15:28:31,414: INFO/ForkPoolWorker-3] Caching 
chart: http://0.0.0.0:8088/superset/slice/70/?standalone=true
   worker_1    | SQLite Database support for metadata databases will be removed 
            in a future version of Superset.
   worker_1    | [2021-03-05 15:28:31,415: WARNING/ForkPoolWorker-3] SQLite 
Database support for metadata databases will be removed             in a future 
version of Superset.
   superset_1  | 172.20.0.1 - - [05/Mar/2021:15:28:31 +0000] "GET 
/api/v1/chart/71/thumbnail/443edfa02dc5e1b835e623b428fc5071/ HTTP/1.1" 202 23 
"http://0.0.0.0:8088/superset/welcome/"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 
11_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 
Safari/537.36"
   superset_1  | 172.20.0.1 - - [05/Mar/2021:15:28:31 +0000] "GET 
/api/v1/chart/70/thumbnail/cca95388580b3de0a239a38ea049d123/ HTTP/1.1" 202 23 
"http://0.0.0.0:8088/superset/welcome/"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 
11_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 
Safari/537.36"
   worker_1    | Processing url for thumbnail: 75fe7c153d0730ac397f90a0a7f9d5e4
   worker_1    | [2021-03-05 15:28:31,424: INFO/ForkPoolWorker-3] Processing 
url for thumbnail: 75fe7c153d0730ac397f90a0a7f9d5e4
   worker_1    | Init selenium driver
   worker_1    | [2021-03-05 15:28:31,424: INFO/ForkPoolWorker-3] Init selenium 
driver
   superset_1  | 172.20.0.1 - - [05/Mar/2021:15:28:31 +0000] "GET 
/api/v1/chart/favorite_status/?q=%21%2872%2C71%2C70%29 HTTP/1.1" 200 85 
"http://0.0.0.0:8088/superset/welcome/"; "Mozilla/5.0 (Macintosh; Intel Mac OS X 
11_2_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.192 
Safari/537.36"
   worker_1    | Failed at generating thumbnail 'NoneType' object has no 
attribute 'set_window_size'
   worker_1    | [2021-03-05 15:28:32,348: ERROR/ForkPoolWorker-8] Failed at 
generating thumbnail 'NoneType' object has no attribute 'set_window_size'
   worker_1    | [2021-03-05 15:28:32,351: INFO/ForkPoolWorker-8] Task 
cache_dashboard_thumbnail[63c2f19e-fd9d-4ac6-86bd-f7f4d472e27b] succeeded in 
1.1585000829945784s: None
   
   ```
   
   I'm wondering if it's a permissions issue that the worker can't pull up the 
dashboard. Any guidance would be appreciated. I haven't seen or been able to 
create a dashboard with a `conf.py` and docker-compose combination that 
successfully produces thumbnails.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to