Error Report Failed Taking Screenshot
See original GitHub issueA 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
- Go to ‘Alerts and Reports’
- Create new scheduled reports on dashboard or chart
- 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.
Issue Analytics
- State:
- Created 10 months ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
Screenshot on failure doesn't work - checked in Report settings
The option 'take screenshot on failure' just works on test cases failed by click object or set text…the screenshots appears in report folder....
Read more >How To Take a Screenshot When Reporting an Error Message
How To Take a Screenshot When Reporting an Error Message. Taking a Screenshot With the Windows Snipping Tool. Locating the Snipping Tool in ......
Read more >Extent Reports - Screenshots of Failed Test Cases in Extent ...
In this I just explain how to capture screenshot and pass it to the extent reports. Below mentioned method is to capture the...
Read more >Selenium Python Tutorial #66 - Take Screenshot on Failure in ...
... In this Selenium Python Tutorial, we will learn how to take screenshot on failure in pytest and embed it in Selenium Python...
Read more >How to add Screenshot in Extent Report for Failed Test Cases ...
... +How to add screenshot for failure test cases + Capture Screenshot in Extent Reports – Selenium Webdriver +How to add Error /Exceptions ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.thanks. it works for me.