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

Unable to install Chromedriver using Kubernetes deployment (executable not in PATH) #32202

Open
3 tasks done
leutrims opened this issue Feb 10, 2025 · 4 comments
Open
3 tasks done

Comments

@leutrims
Copy link

leutrims commented Feb 10, 2025

Bug description

I'm encountering an issue when trying to send report emails from Superset. Despite configuring SMTP and Superset Worker according to the official documentation, the emails fail to send.

Configurations in Superset:
Image
Image

Errors:

  1. Failed taking a screenshot Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
  2. SMTP AUTH extension not supported by server.

Image

Any guidance on these issues would be appreciated.

Screenshots/recordings

No response

Superset version

master / latest-dev

Python version

3.9

Node version

16

Browser

Chrome

Additional context

No response

Checklist

  • I have searched Superset docs and Slack and didn't find a solution to my problem.
  • I have searched the GitHub issue tracker and didn't find a similar bug report.
  • I have checked Superset's logs for errors and if I found a relevant Python stacktrace, I included it here as text in the "additional context" section.
Copy link

dosubot bot commented Feb 10, 2025

Hey @leutrims! 👋 It's great to meet you. I'm here to help you with any bugs, questions, or contributions you have for Superset. Feel free to ask me anything while we wait for a human maintainer to join the conversation.

I found some similar threads that might help you resolve these issues:

  1. For the issue with the 'chromedriver' executable not being in the PATH, you can ensure that the Chrome WebDriver is installed and properly configured in your Kubernetes setup. Here's an example configuration for installing Chrome and ChromeDriver in a Kubernetes environment:

    supersetWorker:
      command:
        - /bin/sh
        - -c
        - |
          # Install chrome webdriver
          apt-get update
          apt-get install -y wget
          wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
          apt-get install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb
          wget https://chromedriver.storage.googleapis.com/88.0.4324.96/chromedriver_linux64.zip
          apt-get install -y zip
          unzip chromedriver_linux64.zip
          chmod +x chromedriver
          mv chromedriver /usr/bin
          apt-get autoremove -yqq --purge
          apt-get clean
          rm -f google-chrome-stable_current_amd64.deb chromedriver_linux64.zip
    
          # Run
          . {{ .Values.configMountPath }}/superset_bootstrap.sh; celery --app=superset.tasks.celery_app:app worker

    This script updates the package list, installs necessary packages, downloads and installs Google Chrome, downloads and sets up ChromeDriver, and then cleans up unnecessary files [1].

  2. For the "SMTP AUTH extension not supported by server" error, ensure that your SMTP settings in superset_config.py are configured correctly. If your SMTP server does not support authentication, make sure you are not attempting to authenticate. You might need to check the specific SMTP server documentation or logs for further troubleshooting [2].

These solutions should help you address the issues you're facing with Superset.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@leutrims
Copy link
Author

@dosu

  • SMTP Authentication: No longer an issue after setting SMTP_USERNAME and SMTP_PASSWORD to empty strings ("") in the Celery worker setup.
  • ChromeDriver Issue: Despite using the same code and updating to the latest ChromeDriver version, the issue persists.

Copy link

dosubot bot commented Feb 11, 2025

To resolve the ChromeDriver issue, ensure that the ChromeDriver is correctly installed and accessible in the PATH. Here are some steps you can follow:

  1. Verify Installation: Make sure that ChromeDriver is installed in the correct location and has the necessary permissions. You can check this by running chromedriver --version in your Kubernetes environment to see if it returns the installed version.

  2. Update PATH: Ensure that the directory containing the chromedriver executable is included in the system PATH. You can do this by adding the following line to your Dockerfile or Kubernetes setup script:

    export PATH=$PATH:/usr/bin
  3. Configuration in Superset: Ensure that your superset_config.py is correctly configured to use ChromeDriver. You should have the following settings:

    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",
    ]
  4. Check for Compatibility: Ensure that the version of ChromeDriver matches the version of Chrome installed. You can find the compatible versions on the ChromeDriver download page.

By following these steps, you should be able to resolve the ChromeDriver PATH issue in your Kubernetes environment.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@sfirke sfirke changed the title Chrome driver not in executable PATH and SMTP AUTH extension not supported by server. Unable to install Chromedriver using Kubernetes deployment (executable not in PATH) Feb 12, 2025
@sfirke
Copy link
Member

sfirke commented Feb 12, 2025

I'm glad you figured out to use '' for an unauthenticated SMTP server, we have that part in the docs so I removed it from this issue title to focus things.

Can you build your own image on top of the base Superset image and then ensure there that Chromedriver is getting installed properly? The way you are going about it now should be possible I think but I'm ignorant of Kubernetes/Helm so can't help. Building your own image might be easier to debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants