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

Error Report Failed Taking Screenshot #22326

Closed
jerapahliar opened this issue Dec 4, 2022 · 27 comments
Closed

Error Report Failed Taking Screenshot #22326

jerapahliar opened this issue Dec 4, 2022 · 27 comments
Labels
#bug Bug report

Comments

@jerapahliar
Copy link

A clear and concise description of what the bug is.
Error on scheduled report : Failed taking a screenshot Message: Argument --marionette can't be set via capabilities
Superset run on docker

How to reproduce the bug

  1. Go to 'Alerts and Reports'
  2. Create new scheduled reports on dashboard or chart
  3. See error log on superset_app container

Expected results

dashboard screenshot received by email or slack channel

what you expected to happen.
dashboard screenshot received by email or slack channel

Actual results

error Failed taking a screenshot Message: Argument --marionette can't be set via capabilities

header_data in notifications for alerts and reports {'notification_type': 'Report', 'notification_source': <ReportSourceFormat.DASHBOARD: 'dashboard'>, 'notification_format': 'PNG', 'chart_id': None, 'dashboard_id': 8, 'owners': [Superset Admin]}, taskid, 5033b9ec-b364-4dec-8a8d-f7b2584f101d
[2022-12-04 14:48:01,265: INFO/ForkPoolWorker-1] header_data in notifications for alerts and reports {'notification_type': 'Report', 'notification_source': <ReportSourceFormat.DASHBOARD: 'dashboard'>, 'notification_format': 'PNG', 'chart_id': None, 'dashboard_id': 8, 'owners': [Superset Admin]}, taskid, 5033b9ec-b364-4dec-8a8d-f7b2584f101d
SupersetError(message='[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)', error_type=<SupersetErrorType.REPORT_NOTIFICATION_ERROR: 'REPORT_NOTIFICATION_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra=None)
[2022-12-04 14:48:01,284: WARNING/ForkPoolWorker-1] SupersetError(message='[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)', error_type=<SupersetErrorType.REPORT_NOTIFICATION_ERROR: 'REPORT_NOTIFICATION_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra=None)
A downstream LoggerLevel.EXCEPTION occurred while generating a report: 5033b9ec-b364-4dec-8a8d-f7b2584f101d
Traceback (most recent call last):
  File "/app/superset/reports/commands/execute.py", line 220, in _get_screenshots
    image = screenshot.get_screenshot(user=user)
  File "/app/superset/utils/screenshots.py", line 76, in get_screenshot
    self.screenshot = driver.get_screenshot(self.url, self.element, user)
  File "/app/superset/utils/webdriver.py", line 111, in get_screenshot
    driver = self.auth(user)
  File "/app/superset/utils/webdriver.py", line 89, in auth
    driver = self.create()
  File "/app/superset/utils/webdriver.py", line 86, in create
    return driver_class(**kwargs)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Argument --marionette can't be set via capabilities


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/superset/tasks/scheduler.py", line 87, in execute
    AsyncExecuteReportScheduleCommand(
  File "/app/superset/reports/commands/execute.py", line 706, in run
    raise ex
  File "/app/superset/reports/commands/execute.py", line 702, in run
    ReportScheduleStateMachine(
  File "/app/superset/reports/commands/execute.py", line 664, in run
    state_cls(
  File "/app/superset/reports/commands/execute.py", line 565, in next
    raise first_ex
  File "/app/superset/reports/commands/execute.py", line 534, in next
    self.send()
  File "/app/superset/reports/commands/execute.py", line 431, in send
    notification_content = self._get_notification_content()
  File "/app/superset/reports/commands/execute.py", line 338, in _get_notification_content
    screenshot_data = self._get_screenshots()
  File "/app/superset/reports/commands/execute.py", line 225, in _get_screenshots
    raise ReportScheduleScreenshotFailedError(
superset.reports.commands.exceptions.ReportScheduleScreenshotFailedError: Failed taking a screenshot Message: Argument --marionette can't be set via capabilities

[2022-12-04 14:48:01,305: ERROR/ForkPoolWorker-1] A downstream LoggerLevel.EXCEPTION occurred while generating a report: 5033b9ec-b364-4dec-8a8d-f7b2584f101d
Traceback (most recent call last):
  File "/app/superset/reports/commands/execute.py", line 220, in _get_screenshots
    image = screenshot.get_screenshot(user=user)
  File "/app/superset/utils/screenshots.py", line 76, in get_screenshot
    self.screenshot = driver.get_screenshot(self.url, self.element, user)
  File "/app/superset/utils/webdriver.py", line 111, in get_screenshot
    driver = self.auth(user)
  File "/app/superset/utils/webdriver.py", line 89, in auth
    driver = self.create()
  File "/app/superset/utils/webdriver.py", line 86, in create
    return driver_class(**kwargs)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Argument --marionette can't be set via capabilities


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/superset/tasks/scheduler.py", line 87, in execute
    AsyncExecuteReportScheduleCommand(
  File "/app/superset/reports/commands/execute.py", line 706, in run
    raise ex
  File "/app/superset/reports/commands/execute.py", line 702, in run
    ReportScheduleStateMachine(
  File "/app/superset/reports/commands/execute.py", line 664, in run
    state_cls(
  File "/app/superset/reports/commands/execute.py", line 565, in next
    raise first_ex
  File "/app/superset/reports/commands/execute.py", line 534, in next
    self.send()
  File "/app/superset/reports/commands/execute.py", line 431, in send
    notification_content = self._get_notification_content()
  File "/app/superset/reports/commands/execute.py", line 338, in _get_notification_content
    screenshot_data = self._get_screenshots()
  File "/app/superset/reports/commands/execute.py", line 225, in _get_screenshots
    raise ReportScheduleScreenshotFailedError(
superset.reports.commands.exceptions.ReportScheduleScreenshotFailedError: Failed taking a screenshot Message: Argument --marionette can't be set via capabilities

[2022-12-04 14:48:01,313: INFO/ForkPoolWorker-1] Task reports.execute[5033b9ec-b364-4dec-8a8d-f7b2584f101d] succeeded in 1.2248869069999273s: None
[2022-12-04 14:49:00,011: INFO/MainProcess] Task reports.scheduler[0530a6d8-189c-4fb8-be94-0105a924d158] received
Scheduling alert test eta: 2022-12-04 14:49:00
[2022-12-04 14:49:00,030: INFO/ForkPoolWorker-1] Scheduling alert test eta: 2022-12-04 14:49:00
[2022-12-04 14:49:00,035: INFO/MainProcess] Task reports.execute[9ae6e73c-a46d-4f27-a050-a15b5d6f9da9] received
[2022-12-04 14:49:00,036: INFO/ForkPoolWorker-1] Task reports.scheduler[0530a6d8-189c-4fb8-be94-0105a924d158] succeeded in 0.02262895000012577s: None
Executing alert/report, task id: 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9, scheduled_dttm: 2022-12-04T14:49:00
[2022-12-04 14:49:00,038: INFO/ForkPoolWorker-1] Executing alert/report, task id: 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9, scheduled_dttm: 2022-12-04T14:49:00
session is validated: id 2, executionid: 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9
[2022-12-04 14:49:00,039: INFO/ForkPoolWorker-1] session is validated: id 2, executionid: 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9
Running report schedule 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9 as user admin
[2022-12-04 14:49:00,059: INFO/ForkPoolWorker-1] Running report schedule 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9 as user admin
Init selenium driver
[2022-12-04 14:49:00,103: INFO/ForkPoolWorker-1] Init selenium driver
header_data in notifications for alerts and reports {'notification_type': 'Report', 'notification_source': <ReportSourceFormat.DASHBOARD: 'dashboard'>, 'notification_format': 'PNG', 'chart_id': None, 'dashboard_id': 8, 'owners': [Superset Admin]}, taskid, 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9
[2022-12-04 14:49:01,170: INFO/ForkPoolWorker-1] header_data in notifications for alerts and reports {'notification_type': 'Report', 'notification_source': <ReportSourceFormat.DASHBOARD: 'dashboard'>, 'notification_format': 'PNG', 'chart_id': None, 'dashboard_id': 8, 'owners': [Superset Admin]}, taskid, 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9
SupersetError(message='[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)', error_type=<SupersetErrorType.REPORT_NOTIFICATION_ERROR: 'REPORT_NOTIFICATION_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra=None)
[2022-12-04 14:49:01,183: WARNING/ForkPoolWorker-1] SupersetError(message='[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1131)', error_type=<SupersetErrorType.REPORT_NOTIFICATION_ERROR: 'REPORT_NOTIFICATION_ERROR'>, level=<ErrorLevel.ERROR: 'error'>, extra=None)
A downstream LoggerLevel.EXCEPTION occurred while generating a report: 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9
Traceback (most recent call last):
  File "/app/superset/reports/commands/execute.py", line 220, in _get_screenshots
    image = screenshot.get_screenshot(user=user)
  File "/app/superset/utils/screenshots.py", line 76, in get_screenshot
    self.screenshot = driver.get_screenshot(self.url, self.element, user)
  File "/app/superset/utils/webdriver.py", line 111, in get_screenshot
    driver = self.auth(user)
  File "/app/superset/utils/webdriver.py", line 89, in auth
    driver = self.create()
  File "/app/superset/utils/webdriver.py", line 86, in create
    return driver_class(**kwargs)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Argument --marionette can't be set via capabilities


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/superset/tasks/scheduler.py", line 87, in execute
    AsyncExecuteReportScheduleCommand(
  File "/app/superset/reports/commands/execute.py", line 706, in run
    raise ex
  File "/app/superset/reports/commands/execute.py", line 702, in run
    ReportScheduleStateMachine(
  File "/app/superset/reports/commands/execute.py", line 664, in run
    state_cls(
  File "/app/superset/reports/commands/execute.py", line 565, in next
    raise first_ex
  File "/app/superset/reports/commands/execute.py", line 534, in next
    self.send()
  File "/app/superset/reports/commands/execute.py", line 431, in send
    notification_content = self._get_notification_content()
  File "/app/superset/reports/commands/execute.py", line 338, in _get_notification_content
    screenshot_data = self._get_screenshots()
  File "/app/superset/reports/commands/execute.py", line 225, in _get_screenshots
    raise ReportScheduleScreenshotFailedError(
superset.reports.commands.exceptions.ReportScheduleScreenshotFailedError: Failed taking a screenshot Message: Argument --marionette can't be set via capabilities

[2022-12-04 14:49:01,201: ERROR/ForkPoolWorker-1] A downstream LoggerLevel.EXCEPTION occurred while generating a report: 9ae6e73c-a46d-4f27-a050-a15b5d6f9da9
Traceback (most recent call last):
  File "/app/superset/reports/commands/execute.py", line 220, in _get_screenshots
    image = screenshot.get_screenshot(user=user)
  File "/app/superset/utils/screenshots.py", line 76, in get_screenshot
    self.screenshot = driver.get_screenshot(self.url, self.element, user)
  File "/app/superset/utils/webdriver.py", line 111, in get_screenshot
    driver = self.auth(user)
  File "/app/superset/utils/webdriver.py", line 89, in auth
    driver = self.create()
  File "/app/superset/utils/webdriver.py", line 86, in create
    return driver_class(**kwargs)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 170, in __init__
    RemoteWebDriver.__init__(
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 157, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 252, in start_session
    response = self.execute(Command.NEW_SESSION, parameters)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.InvalidArgumentException: Message: Argument --marionette can't be set via capabilities


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/app/superset/tasks/scheduler.py", line 87, in execute
    AsyncExecuteReportScheduleCommand(
  File "/app/superset/reports/commands/execute.py", line 706, in run
    raise ex
  File "/app/superset/reports/commands/execute.py", line 702, in run
    ReportScheduleStateMachine(
  File "/app/superset/reports/commands/execute.py", line 664, in run
    state_cls(
  File "/app/superset/reports/commands/execute.py", line 565, in next
    raise first_ex
  File "/app/superset/reports/commands/execute.py", line 534, in next
    self.send()
  File "/app/superset/reports/commands/execute.py", line 431, in send
    notification_content = self._get_notification_content()
  File "/app/superset/reports/commands/execute.py", line 338, in _get_notification_content
    screenshot_data = self._get_screenshots()
  File "/app/superset/reports/commands/execute.py", line 225, in _get_screenshots
    raise ReportScheduleScreenshotFailedError(
superset.reports.commands.exceptions.ReportScheduleScreenshotFailedError: Failed taking a screenshot Message: Argument --marionette can't be set via capabilities```

what actually happens.

#### Screenshots

If applicable, add screenshots to help explain your problem.


### Environment

(please complete the following information):

- browser type and version: 
ARG GECKODRIVER_VERSION=v0.32.0
ARG FIREFOX_VERSION=106.0.3

- superset version: `superset version`
Superset 0.0.0-dev
- python version: `python --version`
Python 3.8.13
- node.js version: `node -v`

- any feature flags active:
FEATURE_FLAGS = {"ALERT_REPORTS": True}

### Checklist

Make sure to follow these steps before submitting your issue - thank you!

- [v ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ v] I have reproduced the issue with at least the latest released version of superset.
- [ v] I have checked the issue tracker for the same issue and I haven't found one similar.

### Additional context

Add any other context about the problem here.
@jerapahliar jerapahliar added the #bug Bug report label Dec 4, 2022
@sfirke
Copy link
Member

sfirke commented Dec 7, 2022

Try running 2.0.0-dev instead of the latest which is appearing as 0.0.0-dev in your installation and see if that fixes it. Others have been reporting similar bugs running the latest commit from master branch.

@jerapahliar
Copy link
Author

Try running 2.0.0-dev instead of the latest which is appearing as 0.0.0-dev in your installation and see if that fixes it. Others have been reporting similar bugs running the latest commit from master branch.

thanks. it works for me.

@rusackas
Copy link
Member

Closing as this appears to be resolved. Please ping me here if that's not the case! Thanks @sfirke!

@majkinetor
Copy link

Why is this closed as fixed if the solution is installing older version ?

@sfirke
Copy link
Member

sfirke commented Dec 15, 2022

Why is this closed as fixed if the solution is installing older version ?

Most of the time people reporting errors in Alerts & Reports are better served by running the latest stable version (I wouldn't say "an older version", it's the latest release), since they want production-ready software. So when that's the solution, these issues are solved. As in this issue.

That said, I think you are right that this will need to get fixed on the master branch. @rusackas What do you think? Should a new issue be opened for this?

@majkinetor
Copy link

majkinetor commented Dec 15, 2022

Solution is then not a fix for me, as I reverted to latest stable just because of this, and given that we based our recent work on latest master, as I think is recommended in the official docs, I have host of other problems now - missing stuff, jumping charts etc. I am considering abandoning email or reimplementing it differently just so i can revert to latest as it behaves much better.

Currrent solution can not be quialified as a fix of any kind and thus this issue should be reopen, IMO. Not sure why would you want to reopen new issue for it too, that practice can only make it harder for people to follow what is going on and which issue is relevant and artificially inflates the number of issues.

@rusackas
Copy link
Member

That said, I think you are right that this will need to get fixed on the master branch. @rusackas What do you think? Should a new issue be opened for this?

No problem re-opening this issue. I think i misinterpreted some of the thread a little bit.

I think I saw some related issues that were marked as closed... I'll do a little digging to see if I can find them and link them here in case they help.

@rusackas rusackas reopened this Dec 15, 2022
@sfirke
Copy link
Member

sfirke commented Dec 15, 2022

Solution is then not a fix for me, as I reverted to latest stable just because of this, and given that we based our recent work on latest master, as I think is recommended in the official docs, I have host of other problems now - missing stuff, jumping charts etc. I am considering abandoning email or reimplementing it differently just so i can revert to latest as it behaves much better.

Sorry to hear that. That new users are directed to deploy latest - which changes multiple times per day - is a problem and one I brought up this week at a Superset community meeting as something I'd like to see changed. I'm not an expert on this aspect but you might experience similar problems when you eventually switch to a newer release.

@majkinetor
Copy link

Thanks for reopening this.

That new users are directed to deploy latest - which changes multiple times per day - is a problem

I understand your point, but on the other hand users can have fixes ASAP that way instead of waiting for official release and you get more "beta testers" that way... halthy master is the point. For instance, this problem would probably be discovered after the official release and now it can get fixed before...

@devaale
Copy link

devaale commented Jan 11, 2023

Try running 2.0.0-dev instead of the latest which is appearing as 0.0.0-dev in your installation and see if that fixes it. Others have been reporting similar bugs running the latest commit from master branch.

thanks. it works for me.

Could you share your whole setup with me ? - I'm running into the same problem and changing to 2.0.0-dev doesn't seem to work for me

@gonzo-soc
Copy link

gonzo-soc commented Feb 6, 2023

Had the same bug. But found a workaround)
Firstly
I rolled back Apache Superset version from superset-helm-chart-0.8.5 to v2.0.0 didn't work.
Then
After a week investigation I finally found the workaround: use firefox as a webdriver and the most important part - use GECKODRIVER_VERSION=v0.29.0, the latest version of the driver gave me the error Failed taking a screenshot Message: Argument --marionette can't be set via capabilities. Want to note that Apache Superset documentation has the same version in its configuration files (GECKODRIVER_VERSION=v0.29.0), so pay attention: https://superset.apache.org/docs/installation/alerts-reports
Now I am going to test the latest version of Apache Superset - superset-helm-chart-0.8.5 and will let you know about result.
Also want to note Chrome webdriver couldn't be forced to work)

Final configuration (superset_config_docker.py):

ENABLE_SCHEDULED_EMAIL_REPORTS = True
ALERT_REPORTS_NOTIFICATION_DRY_RUN = False

SMTP_HOST = "smtp.somedomain.com" 
SMTP_PORT = 25 # your port, e.g. 587
SMTP_STARTTLS = False
SMTP_SSL_SERVER_AUTH = False 
SMTP_SSL = False
SMTP_USER = "" 
SMTP_PASSWORD = "" 
SMTP_MAIL_FROM = "admin@admin.com"
EMAIL_REPORTS_SUBJECT_PREFIX = "[SELLC Superset-dev] report" 
WEBDRIVER_BASEURL = "http://superset:8088"
WEBDRIVER_BASEURL_USER_FRIENDLY = "http://localhost:8088"

SCREENSHOT_LOCATE_WAIT = 100
SCREENSHOT_LOAD_WAIT = 1200

THUMBNAIL_SELENIUM_USER = "admin" 

SQLALCHEMY_ECHO = True

SCREENSHOT_LOCATE_WAIT = 100
SCREENSHOT_LOAD_WAIT = 1200

One more note: png is working but csv still doesn't work with the issue Failed generating csv HTTP Error 407: Authorization Required

Good luck!

@nkdanta1
Copy link

nkdanta1 commented Mar 3, 2023

Hi @gonzo-soc, I used GECKODRIVER_VERSION=v0.29.0 for Linux-amd64 and it works fine.
But for Linux-arm64 GECKODRIVER_VERSION=v0.32.2 is the oldest available version and it is giving me the error Failed taking a screenshot Message: Argument --marionette can't be set via capabilities.

Is there any workaround?

@sfirke
Copy link
Member

sfirke commented Mar 15, 2023

I'm experiencing this bug while testing reports using the 2.1.0rc2-dev image.

@nytai
Copy link
Member

nytai commented Mar 16, 2023

I wouldn't call this a bug, more so the default config doesn't work with the 2.1.0rc2-dev image out of the box. You just need to override this config to make it work: https://github.com/apache/superset/blob/2.1.0rc2/superset/config.py#L1307

In fact, the comment in the file mentions that the arg should be removed if using firefox

@sfirke
Copy link
Member

sfirke commented Mar 16, 2023

I tried specifying WEBDRIVER_OPTION_ARGS = ["--headless"] in my config but that just changed the failure error message to Process unexpectedly closed with status 255. Still with 2.1.0rc2.

@nytai
Copy link
Member

nytai commented Mar 27, 2023

This should be fixed in 2.1.0rc3

@nytai nytai closed this as completed Mar 27, 2023
@amartincolville
Copy link

hello, I am experiencing the same issue here, with 2.1.0rc3
@nytai with what would you override the config you mention?
Did anyone manage to specify the right configs in WEBDRIVER_OPTION_ARGS?

@asayeb
Copy link

asayeb commented May 9, 2023

is there an official fix for this?! Deploying thru helm chart, I am facing the same issue. I do helm pull on the repo, so I assume it pulls the latest version. Any suggestions?

@sfirke
Copy link
Member

sfirke commented May 10, 2023

This was fixed with this PR: https://github.com/apache/superset/pull/23388/files . Specifically the line WEBDRIVER_OPTION_ARGS = ["--headless"] in config.py. Which is still the case on latest as of today: https://github.com/apache/superset/blob/master/superset/config.py#LL1318C1-L1320C39

This functionality works on the latest official release of Superset, 2.1.0. If someone is getting --marionette can't be set via capabilities, what is in your config.py or other config for WEBDRIVER_OPTION_ARGS?

@asayeb
Copy link

asayeb commented May 10, 2023

I have pulled the latest docker image from "https://hub.docker.com/r/apache/superset/tags" so it must be the latest tag. Checked the link that you provided, I didn't have those apt installation in values.yaml file. I added them.
&& apt-get install -y --no-install-recommends \ libnss3 \ libdbus-glib-1-2 \ libgtk-3-0 \ libx11-xcb1 \ libasound2 \ libxtst6 \ wget

Now i am getting "Failed taking a screenshot Message: 'chromedriver' executable needs to be in PATH". I check the config.py file in the worker pod and its "WEBDRIVER_OPTION_ARGS = ["--headless"]".
I know there is another issue opened for this, but I don't see any solution there.

@sfirke
Copy link
Member

sfirke commented May 10, 2023

Are you using latest or latest-dev? Only -dev images come with a browser and driver.

@asayeb
Copy link

asayeb commented May 10, 2023

i just pulled the latest-dev and built using helm with the latest-dev docker image. same issue. this is my supersetWorker config:

    command:
      - "/bin/sh"
      - "-c"
      - |
        apt update
        apt-get install -y --no-install-recommends \
            libnss3 \
            libdbus-glib-1-2 \
            libgtk-3-0 \
            libx11-xcb1 \
            libasound2 \
            libxtst6 \
            wget \
            zip
        wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
        apt install -y --no-install-recommends ./google-chrome-stable_current_amd64.deb
        wget https://chromedriver.storage.googleapis.com/113.0.5672.63/chromedriver_linux64.zip
        unzip chromedriver_linux64.zip
        chmod +x chromedriver
        mv chromedriver /usr/bin
        apt autoremove -yqq --purge
        apt clean
        rm -f google-chrome-stable_current_amd64.deb chromedriver_linux64.zip
        . {{ .Values.configMountPath }}/superset_bootstrap.sh; celery --app=superset.tasks.celery_app:app worker

@amartincolville
Copy link

hey @asayeb
you might need to switch to firefox instead of chrome driver:
in your Dockerfile:

RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.24.0/geckodriver-v0.24.0-linux64.tar.gz && \
    tar -xvzf geckodriver* && \
    chmod +x geckodriver && \
    mv geckodriver /usr/local/bin/

# Firefox installation for M1 issues with Chromedriver
RUN apt install gnupg2 software-properties-common -y

RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A6DCF7707EBC211F && \ 
    apt-add-repository "deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu focal main" && \
    apt update && \
    apt install firefox -y

And in your config.py file:

WEBDRIVER_TYPE = "firefox"

@asayeb
Copy link

asayeb commented May 12, 2023

thank @amartincolville.
I have tried what you mentioned. I don't have any errors in the logs, however it keeps running till it hits timeout without any output.
It has been a week that I am trying to fix this. Documentation for how to setup using Docker and Documentation for Kubernetes doesn't match each other. In docker you pull image 2.0.1 while in Kubernetes there is nothing mentioned about it. There are different options and different flags that you see in one that hasn't been mentioned in the other. Tried 2.0.1, 2.0.1-dev, latest and latest-dev nothing worked for me. for 2.0.1 and 2.0.1-dev I get error in my init-db pod. for the latest tags, I have brought it to the point that It just runs forever till it hits the timeout. very frustrated now!

can you please let me know which one is up to date. Docker or Kubernetes documentation?

@santosh-sahoo334
Copy link

@asayeb same here. Struggling for last 2 days to make it work. :(

@asayeb
Copy link

asayeb commented May 15, 2023

@santosh-sahoo334 I followed the Kubernetes documentation: https://superset.apache.org/docs/installation/running-on-kubernetes . removed the reports I created and created new ones. csv, text and dashboard works fine. png still has issue for me. Follow the Kubernetes documentation if you are using helm deployment.

a follow up question: Is there an option to send reports directly to a google drive instead of email?

thanks @sfirke and @amartincolville for the help.

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

No branches or pull requests