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

Failed taking a screenshot Message: 'geckodriver' executable needs to be in PATH. superset 4.1.1 #32395

Open
3 tasks
Pavanpatil0744 opened this issue Feb 26, 2025 · 6 comments
Labels
install:docker Installation - docker container

Comments

@Pavanpatil0744
Copy link

Pavanpatil0744 commented Feb 26, 2025

Bug description

I set up Apache Superset version 4.1.1 using Docker Compose with the following steps:

Clone the Apache Superset repository

git clone --depth=1 https://github.com/apache/superset.git
cd superset

Fetch and checkout version 4.1.1

git fetch origin --tags
git checkout 4.1.1

export TAG=4.1.1

Start Superset using Docker Compose

docker compose -f docker-compose-image-tag.yml up -d

Everything is working fine except sending reports via SMTP

Getting this error
Failed taking a screenshot Message: 'geckodriver' executable needs to be in PATH.

Image

Any guidance on resolving this would be greatly appreciated!

Let me know if any additional logs or configurations are needed.

Screenshots/recordings

Logs of Superset-worker

Image

Also, check geckodriver --version
Show command not found

Image

Superset version

4.1.1

Python version

3.9

Node version

16

Browser

Firefox

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.
@dosubot dosubot bot added the install:docker Installation - docker container label Feb 26, 2025
Copy link

dosubot bot commented Feb 26, 2025

Hey @Pavanpatil0744! I'm here to help you with any bugs, questions, or contributions you have for Apache Superset. Let's work together to solve this issue!

I found some similar discussions regarding the error "Failed taking a screenshot Message: 'geckodriver' executable needs to be in PATH" in Apache Superset:

  1. superset.commands.report.exceptions.ReportScheduleScreenshotFailedError: Failed taking a screenshot Message: 'geckodriver' executable needs to be in PATH. [1]
  2. Can't get ALERTS & REPORTS working. Error: Failed taking a screenshot Message: 'geckodriver' executable needs to be in PATH. [2]
  3. Automated reports in local using docker compose - Failed taking a screenshot Message: 'geckodriver' executable needs to be in PATH. [3]

To resolve this issue in Apache Superset version 4.1.1, you need to ensure that geckodriver is installed and available in your system's PATH. You can install geckodriver by downloading it from the official GitHub releases and placing it in /usr/bin with the appropriate permissions. Here is a sample command sequence to achieve this:

ENV GECKODRIVER_VERSION=0.29.0
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz && \
    tar -x geckodriver -zf geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -O > /usr/bin/geckodriver && \
    chmod 755 /usr/bin/geckodriver && \
    rm geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz

If you are using Superset docker images with a tag ending in -dev, the Firefox headless browser and geckodriver should already be installed. You can verify this by entering your Superset worker and running the commands firefox --headless and geckodriver. Both commands should start their respective applications [4].

To continue talking to Dosu, mention @dosu.


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

@Pavanpatil0744
Copy link
Author

Hey @dosu, thanks for your response!

I'm running Apache Superset 4.1.1 using Docker Compose (docker-compose-image-tag.yml). Could you guide me on how to install geckodriver inside my Docker setup?

Copy link

dosubot bot commented Feb 26, 2025

To install geckodriver inside your Docker setup for Apache Superset, you can modify your Dockerfile to include the installation steps for geckodriver. Here's a code snippet you can add to your Dockerfile:

ENV GECKODRIVER_VERSION=0.29.0
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/v${GECKODRIVER_VERSION}/geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz && \
    tar -x geckodriver -zf geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz -O > /usr/bin/geckodriver && \
    chmod 755 /usr/bin/geckodriver && \
    rm geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz

This snippet will download the specified version of geckodriver, extract it, move it to /usr/bin, set the appropriate permissions, and clean up the downloaded archive. After adding this to your Dockerfile, rebuild your Docker image and restart your containers to apply the changes [1].

To continue talking to Dosu, mention @dosu.


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

@Pavanpatil0744
Copy link
Author

Pavanpatil0744 commented Feb 26, 2025

@dosu @sfirke I checked my Dockerfile, and the installation steps for geckodriver are already present

`# Install GeckoDriver WebDriver
ARG GECKODRIVER_VERSION=v0.34.0
FIREFOX_VERSION=125.0.3

RUN apt-get update -qq
&& apt-get install -yqq --no-install-recommends wget bzip2
&& wget -q https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz -O - | tar xfz - -C /usr/local/bin
# Install Firefox
&& wget -q https://download-installer.cdn.mozilla.net/pub/firefox/releases/${FIREFOX_VERSION}/linux-x86_64/en-US/firefox-${FIREFOX_VERSION}.tar.bz2 -O - | tar xfj - -C /opt
&& ln -s /opt/firefox/firefox /usr/local/bin/firefox
&& apt-get autoremove -yqq --purge wget bzip2 && rm -rf /var/[log,tmp]/* /tmp/* /var/lib/apt/lists/*
`

However, I'm still encountering the error
I'm bit confused about what to do next.

@beliaev-maksim
Copy link

@Pavanpatil0744 you installed the driver, but where is the bit where you export the envvar ?

can you send here the report on the PATH envvar and please ensure that geckodriver binary is in one of the paths

Copy link

dosubot bot commented Feb 26, 2025

Since the installation steps for geckodriver are already present in your Dockerfile, and you're still encountering the error, here are a few things you can check:

  1. Verify Installation: Ensure that geckodriver is correctly installed and accessible in the PATH. You can do this by entering the Docker container and running geckodriver --version. This should return the version of geckodriver if it's correctly installed.

  2. Check PATH Configuration: Make sure that /usr/local/bin is included in the PATH environment variable within the Docker container. You can check this by running echo $PATH inside the container.

  3. Rebuild the Docker Image: If you made any changes to the Dockerfile, ensure that you rebuild the Docker image and restart the containers to apply those changes.

  4. Environment Variables: Ensure that any necessary environment variables are set in your Docker Compose file, especially if there are specific configurations required for geckodriver.

  5. Permissions: Double-check the permissions of the geckodriver executable. It should be executable (e.g., chmod 755 /usr/local/bin/geckodriver).

If these steps do not resolve the issue, consider using an alternative method for generating reports, such as configuring Superset to use Chrome instead of Firefox, as suggested in the Superset documentation [1].

To continue talking to Dosu, mention @dosu.


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
install:docker Installation - docker container
Projects
None yet
Development

No branches or pull requests

2 participants