You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/09/30 15:25:55 UTC

[GitHub] [superset] krsnik93 opened a new issue #16924: Chrome WebDriver Selenium generating all white screenshots

krsnik93 opened a new issue #16924:
URL: https://github.com/apache/superset/issues/16924


   Chrome WebDriver-powered Selenium is generating all white screenshots, for both charts and dashboards.
   
   #### How to reproduce the bug
   
   1. Create new chart
   2. Save it
   3. Wait for a bit for the screenshot to get generated (can inspect `/var/log/celery/*` to track progress)
   4. Refresh window
   
   ### Expected results
   
   Expect thumbnail screenshot to look the same as the chart.
   
   ### Actual results
   
   Screenshot is all white.
   
   #### Screenshots
   
   Charts:
   
   ![image](https://user-images.githubusercontent.com/13034472/135483029-a80fb920-4b35-4146-8ee8-dcebadde1c80.png)
   ![image](https://user-images.githubusercontent.com/13034472/135483134-abab1be5-105f-41e8-826a-a6cd0ad5e13e.png)
   
   
   Dashboards:
   
   
   The actual chart:
   ![image](https://user-images.githubusercontent.com/13034472/135483261-4efffdef-03c1-497b-94fd-62e7f0e56ce9.png)
   
   It takes about 5 secs to load and does not require touching the control panel.
   
   ### Environment
   
   (please complete the following information):
   
   - browser type and version: Firefox 92.0
   - superset version: 1.2.0
   - python version: 3.8.10
   - any feature flags active:
   ```
       "DYNAMIC_PLUGINS": True,
       "ROW_LEVEL_SECURITY": True,
       "VERSIONED_EXPORT": True,
   
       "THUMBNAILS": True,
       "THUMBNAILS_SQLA_LISTENERS": True,
       "LISTVIEWS_DEFAULT_CARD_VIEW": True,
   ```
   
   ### Checklist
   
   Make sure to follow these steps before submitting your issue - thank you!
   
   - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [x] I have reproduced the issue with at least the latest released version of superset.
   - [x] I have checked the issue tracker for the same issue and I haven't found one similar.
   
   ### Additional context
   
   ChromeDriver version: `ChromeDriver 90.0.4430.93 (4df112c29cfe9a2c69b14195c0275faed4e997a7-refs/branch-heads/4430@{#1348})`
   
   Relevant Superset config:
   ```
   CACHE_CONFIG = {
       'CACHE_TYPE': 'redis',
       'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
       'CACHE_KEY_PREFIX': 'superset_results',
       'CACHE_REDIS_URL': 'redis://localhost:6379/0',
   }
   
   THUMBNAIL_CACHE_CONFIG = {
       'CACHE_TYPE': 'redis',
       'CACHE_DEFAULT_TIMEOUT': 60 * 60 * 24, # 1 day default (in secs)
       'CACHE_KEY_PREFIX': 'thumbnail_',
       'CACHE_NO_NULL_WARNING': True,
       'CACHE_REDIS_URL': 'redis://localhost:6379/0'
   }
   THUMBNAIL_SELENIUM_USER = "admin"
   
   class CeleryConfig(object):
       BROKER_URL = 'redis://localhost:6379/0'
       CELERY_IMPORTS = (
           'superset.sql_lab',
           'superset.tasks',
           'superset.tasks.thumbnails'
       )
       CELERY_RESULT_BACKEND = 'redis://localhost:6379/0'
       CELERYD_LOG_LEVEL = 'DEBUG'
       CELERYD_PREFETCH_MULTIPLIER = 10
       CELERY_ACKS_LATE = True
   
   CELERY_CONFIG = CeleryConfig
   
   WEBDRIVER_TYPE = "chrome"
   WEBDRIVER_BASEURL = "http://localhost:8080"
   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",
   ]
   SCREENSHOT_SELENIUM_ANIMATION_WAIT = 20
   ```
   Last line added just to test if a longer wait would work.
   
   Logs from `/var/log/celery/worker1.log`:
   ```
   [2021-09-30 16:02:45,450: INFO/MainProcess] Received task: cache_chart_thumbnail[55a06cba-b027-4268-884b-fcc81499a432]  
   [2021-09-30 16:02:45,453: DEBUG/MainProcess] TaskPool: Apply <function _fast_trace_task at 0x7efd0d70c790> (args:('cache_chart_thumbnail', '55a06cba-b027-4268-884b-fcc81499a432', {'lang': 'py', 'task': 'cache_chart_thumbnail', 'id': '55a06cba-b027-4268-884b-fcc81499a432', 'shadow': None, 'eta': None, 'expires': None, 'group': None, 'group_index': None, 'retries': 0, 'timelimit': [None, 300], 'root_id': '55a06cba-b027-4268-884b-fcc81499a432', 'parent_id': None, 'argsrepr': "('http://localhost:8080/superset/slice/4/?standalone=true', '9f8a8ede5b3960ee353aed547019bf75')", 'kwargsrepr': "{'force': True}", 'origin': 'gen569095@puppet-agent', 'reply_to': '8cc3e63c-3555-39dc-86b5-0e6376d5a2cb', 'correlation_id': '55a06cba-b027-4268-884b-fcc81499a432', 'hostname': 'worker1@puppet-agent', 'delivery_info': {'exchange': '', 'routing_key': 'celery', 'priority': 0, 'redelivered': None}, 'args': ['http://localhost:8080/superset/slice/4/?standalone=true', '9f8a8ede5b3960ee353aed547019bf75'], 'kw
 args': {'force': True}}, b'[["http://localhost:8080/superset/slice/4/?standalone=true", "9f8a8ede5b3960ee353aed547019bf75"], {"force": true},... kwargs:{})
   [2021-09-30 16:02:45,457: DEBUG/MainProcess] Task accepted: cache_chart_thumbnail[55a06cba-b027-4268-884b-fcc81499a432] pid:569084
   ```
   Logs from `/var/log/celery/worker1-3.log`:
   ```
   [2021-09-30 16:02:45,458: INFO/ForkPoolWorker-3] Caching chart: http://localhost:8080/superset/slice/4/?standalone=true
   [2021-09-30 16:02:45,498: INFO/ForkPoolWorker-3] Processing url for thumbnail: c2d03e44eb42b1746dc5b1b0414e34fe
   [2021-09-30 16:02:45,498: INFO/ForkPoolWorker-3] Init selenium driver
   [2021-09-30 16:02:46,533: DEBUG/ForkPoolWorker-3] POST http://127.0.0.1:60289/session {"capabilities": {"firstMatch": [{}], "alwaysMatch": {"browserName": "chrome", "platformName": "any", "goog:chromeOptions": {"extensions": [], "args": ["--window-size=800,600", "--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"]}}}, "desiredCapabilities": {"browserName": "chrome", "version": "", "platform": "ANY", "goog:chromeOptions": {"extensions": [], "args": ["--window-size=800,600", "--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"]}}}
   [2021-09-30 16:02:46,537: DEBUG/ForkPoolWorker-3] Starting new HTTP connection (1): 127.0.0.1:60289
   [2021-09-30 16:02:46,803: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "POST /session HTTP/1.1" 200 720
   [2021-09-30 16:02:46,807: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:46,808: DEBUG/ForkPoolWorker-3] POST http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52/url {"url": "http://localhost:8080/login/"}
   [2021-09-30 16:02:47,465: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "POST /session/b2158b7baa2a0150a4e9e96199ec0e52/url HTTP/1.1" 200 14
   [2021-09-30 16:02:47,466: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:47,481: DEBUG/ForkPoolWorker-3] POST http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52/cookie {"cookie": {"name": "session", "value": ".eJwlzjEOwzAIQNG7MGcwGIzJZSJjsNo1aaaqd2-lHuA__Tcc68zrAfvrvHOD4xmwQzdaunLSROlVWivTB1biGERIktg0m7inRFbj4N6GMv-Cop4FWdG6yWqkP0W64_ASWUr0JBef5s5JNjTr1F7JwoKKYM6SnWGD-8rzP4Pw-QJpBS6n.YVXRlw.fXns-1imSRCPoZP04l40yHD2f0A"}}
   [2021-09-30 16:02:47,488: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "POST /session/b2158b7baa2a0150a4e9e96199ec0e52/cookie HTTP/1.1" 200 14
   [2021-09-30 16:02:47,488: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:47,489: DEBUG/ForkPoolWorker-3] POST http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52/window/rect {"x": null, "y": null, "width": 800, "height": 600}
   [2021-09-30 16:02:47,596: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "POST /session/b2158b7baa2a0150a4e9e96199ec0e52/window/rect HTTP/1.1" 200 48
   [2021-09-30 16:02:47,596: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:47,597: DEBUG/ForkPoolWorker-3] POST http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52/url {"url": "http://localhost:8080/superset/slice/4/?standalone=true"}
   [2021-09-30 16:02:48,907: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "POST /session/b2158b7baa2a0150a4e9e96199ec0e52/url HTTP/1.1" 200 14
   [2021-09-30 16:02:48,907: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:51,911: DEBUG/ForkPoolWorker-3] POST http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52/element {"using": "css selector", "value": ".chart-container"}
   [2021-09-30 16:02:51,935: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "POST /session/b2158b7baa2a0150a4e9e96199ec0e52/element HTTP/1.1" 200 88
   [2021-09-30 16:02:51,936: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:51,936: DEBUG/ForkPoolWorker-3] POST http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52/elements {"using": "css selector", "value": ".loading"}
   [2021-09-30 16:02:51,947: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "POST /session/b2158b7baa2a0150a4e9e96199ec0e52/elements HTTP/1.1" 200 12
   [2021-09-30 16:02:51,947: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:51,947: INFO/ForkPoolWorker-3] Taking a PNG screenshot or url http://localhost:8080/superset/slice/4/?standalone=true
   [2021-09-30 16:02:51,948: DEBUG/ForkPoolWorker-3] GET http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52/element/1607d29c-53d2-4d7e-abea-c6df244fc6d8/screenshot {"id": "1607d29c-53d2-4d7e-abea-c6df244fc6d8"}
   [2021-09-30 16:02:52,042: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "GET /session/b2158b7baa2a0150a4e9e96199ec0e52/element/1607d29c-53d2-4d7e-abea-c6df244fc6d8/screenshot HTTP/1.1" 200 9332
   [2021-09-30 16:02:52,043: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:52,043: DEBUG/ForkPoolWorker-3] DELETE http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52/window {}
   [2021-09-30 16:02:52,106: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "DELETE /session/b2158b7baa2a0150a4e9e96199ec0e52/window HTTP/1.1" 200 12
   [2021-09-30 16:02:52,107: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:52,107: DEBUG/ForkPoolWorker-3] DELETE http://127.0.0.1:60289/session/b2158b7baa2a0150a4e9e96199ec0e52 {}
   [2021-09-30 16:02:52,109: DEBUG/ForkPoolWorker-3] http://127.0.0.1:60289 "DELETE /session/b2158b7baa2a0150a4e9e96199ec0e52 HTTP/1.1" 200 14
   [2021-09-30 16:02:52,109: DEBUG/ForkPoolWorker-3] Finished Request
   [2021-09-30 16:02:52,120: INFO/ForkPoolWorker-3] Caching thumbnail: c2d03e44eb42b1746dc5b1b0414e34fe
   [2021-09-30 16:02:52,123: INFO/ForkPoolWorker-3] Done caching thumbnail
   [2021-09-30 16:02:52,130: INFO/ForkPoolWorker-3] Task cache_chart_thumbnail[55a06cba-b027-4268-884b-fcc81499a432] succeeded in 6.6734346160665154s: None
   ```
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 commented on issue #16924: Thumbnails not showing correctly

Posted by GitBox <gi...@apache.org>.
krsnik93 commented on issue #16924:
URL: https://github.com/apache/superset/issues/16924#issuecomment-942182530


   Issue solved after updating ChromeDriver version.


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 edited a comment on issue #16924: Thumbnails not showing correctly

Posted by GitBox <gi...@apache.org>.
krsnik93 edited a comment on issue #16924:
URL: https://github.com/apache/superset/issues/16924#issuecomment-940771878


   I inspected the thumbnail images in Dev Tools and they look like this
   ![sc_1](https://user-images.githubusercontent.com/13034472/136916750-ee1046d1-9f8e-4278-8f02-3a57f2ea9bbf.png)
   ![sc_2](https://user-images.githubusercontent.com/13034472/136916766-0c8af7b4-d5a6-42de-8e51-8394f83028f5.png)
   
   so it seems they are not all white, but are just displaying as such.
   
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 commented on issue #16924: Thumbnails not showing correctly

Posted by GitBox <gi...@apache.org>.
krsnik93 commented on issue #16924:
URL: https://github.com/apache/superset/issues/16924#issuecomment-941021519


   I resolved the issue with CSP headers to make the screenshots display, but they still look off:
   ![image](https://user-images.githubusercontent.com/13034472/136966458-86a496c4-8dea-4a10-a5c9-7acfe9d1f492.png)
   ![image](https://user-images.githubusercontent.com/13034472/136966569-d1dca18b-35ae-4477-8309-c25dc68e8a48.png)
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 commented on issue #16924: Chromium WebDriver Selenium generating all white screenshots

Posted by GitBox <gi...@apache.org>.
krsnik93 commented on issue #16924:
URL: https://github.com/apache/superset/issues/16924#issuecomment-940771878


   I inspected the thumbnail images in Dev Tools and they look like this
   ![sc_1](https://user-images.githubusercontent.com/13034472/136916750-ee1046d1-9f8e-4278-8f02-3a57f2ea9bbf.png)
   ![sc_2](https://user-images.githubusercontent.com/13034472/136916766-0c8af7b4-d5a6-42de-8e51-8394f83028f5.png)
   
   so it seems they are not all white, but are just displaying as such.
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 commented on issue #16924: Thumbnails not showing correctly

Posted by GitBox <gi...@apache.org>.
krsnik93 commented on issue #16924:
URL: https://github.com/apache/superset/issues/16924#issuecomment-940874559


   Also seeing `Content Security Policy: The page’s settings blocked the loading of a resource at blob:https://myhost.com/0b33f8ee-20b7-4770-b9c0-511ddb8d715e (“default-src”).` in the console


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 edited a comment on issue #16924: Thumbnails not showing correctly

Posted by GitBox <gi...@apache.org>.
krsnik93 edited a comment on issue #16924:
URL: https://github.com/apache/superset/issues/16924#issuecomment-940771878


   I inspected the thumbnail images in Dev Tools and they look like this
   ![sc_1](https://user-images.githubusercontent.com/13034472/136916750-ee1046d1-9f8e-4278-8f02-3a57f2ea9bbf.png)
   ![sc_2](https://user-images.githubusercontent.com/13034472/136916766-0c8af7b4-d5a6-42de-8e51-8394f83028f5.png)
   
   so it seems they are not all white, but are just not displaying.
   
   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 closed issue #16924: Thumbnails not showing correctly

Posted by GitBox <gi...@apache.org>.
krsnik93 closed issue #16924:
URL: https://github.com/apache/superset/issues/16924


   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 closed issue #16924: Thumbnails not showing correctly

Posted by GitBox <gi...@apache.org>.
krsnik93 closed issue #16924:
URL: https://github.com/apache/superset/issues/16924


   


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] krsnik93 commented on issue #16924: Thumbnails not showing correctly

Posted by GitBox <gi...@apache.org>.
krsnik93 commented on issue #16924:
URL: https://github.com/apache/superset/issues/16924#issuecomment-940831077


   When I replace the screenshot blob URL with another image, it gets displayed nomally. 


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

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org