abhinavkaundal commented on issue #12867:
URL: https://github.com/apache/superset/issues/12867#issuecomment-2365046433

   I have followed the mentioned steps and getting the below error in MAC M1 
and ubuntu 22.04 both the operatig systems:
   
   
   [2024-09-21 07:35:55,025: INFO/MainProcess] Task 
cache_chart_thumbnail[31f38b30-f40d-4fa0-821a-2e4df8bd9fec] received
   superset_init          | 2024-09-21 
07:35:55,047:INFO:superset.models.helpers:Updating slices Weekly Threads
   superset_worker        | [2024-09-21 07:35:55,061: INFO/MainProcess] Task 
cache_chart_thumbnail[9f566582-700f-439b-8322-fbff13f12995] received
   superset_worker        | [2024-09-21 07:35:55,061: INFO/ForkPoolWorker-7] 
Caching chart: http://superset:8088/superset/slice/40/
   superset_worker        | [2024-09-21 07:35:55,069: INFO/ForkPoolWorker-8] 
Caching chart: http://superset:8088/superset/slice/41/
   superset_worker        | [2024-09-21 07:35:55,095: INFO/ForkPoolWorker-7] 
Processing url for thumbnail: 0df6b964a837db1cdc860f3f9cf96ad6
   superset_worker        | [2024-09-21 07:35:55,096: INFO/ForkPoolWorker-8] 
Processing url for thumbnail: 242cb88e0c5e8dfc3771dbf687d0ba74
   superset_worker        | [2024-09-21 07:35:55,100: DEBUG/ForkPoolWorker-7] 
Init selenium driver
   superset_init          | 2024-09-21 
07:35:55,101:INFO:superset.models.helpers:Updating slices First Time Developer 
& Commute Time
   superset_worker        | [2024-09-21 07:35:55,101: DEBUG/ForkPoolWorker-8] 
Init selenium driver
   superset_worker        | [2024-09-21 07:35:55,113: INFO/MainProcess] Task 
cache_chart_thumbnail[2c76265d-8967-4832-9a52-cb8323f59b25] received
   superset_worker        | [2024-09-21 07:35:55,112: WARNING/ForkPoolWorker-8] 
Failed at generating thumbnail Message: 'chromedriver' executable needs to be 
in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
   superset_worker        | Traceback (most recent call last):
   superset_worker        |   File 
"/usr/local/lib/python3.10/site-packages/selenium/webdriver/common/service.py", 
line 72, in start
   superset_worker        |     self.process = subprocess.Popen(cmd, 
env=self.env,
   superset_worker        |   File "/usr/local/lib/python3.10/subprocess.py", 
line 971, in __init__
   superset_worker        |     self._execute_child(args, executable, 
preexec_fn, close_fds,
   superset_worker        |   File "/usr/local/lib/python3.10/subprocess.py", 
line 1863, in _execute_child
   superset_worker        |     raise child_exception_type(errno_num, err_msg, 
err_filename)
   superset_worker        | FileNotFoundError: [Errno 2] No such file or 
directory: 'chromedriver'
   
   
   > 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",
   >         ]
   > ```
   
   


-- 
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: [email protected]

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