yatendra99 opened a new issue, #23332:
URL: https://github.com/apache/superset/issues/23332

   Hi Team,
   
   I am trying to setup the reporting in Superset. I am trying to use the 
firefox Driver: Below are the configuration i am using: 
   
   `WEBDRIVER_OPTION_ARGS = ["--headless"]
   WEBDRIVER_WINDOW = {
       "dashboard": (1600, 2000),
       "slice": (3000, 1200),
       "pixel_density": 1,
   }
   EMAIL_PAGE_RENDER_WAIT = 300
   SCREENSHOT_LOCATE_WAIT = 1000
   SCREENSHOT_LOAD_WAIT = 6000
   SCREENSHOT_SELENIUM_RETRIES = 5
   SCREENSHOT_SELENIUM_HEADSTART = 3
   SCREENSHOT_SELENIUM_ANIMATION_WAIT = 5
   SCREENSHOT_REPLACE_UNEXPECTED_ERRORS = False
   SCREENSHOT_WAIT_FOR_ERROR_MODAL_VISIBLE = 5
   SCREENSHOT_WAIT_FOR_ERROR_MODAL_INVISIBLE = 5
   EMAIL_REPORTS_SUBJECT_PREFIX = "[Fleet Scanner] "
   ALERT_REPORTS_NOTIFICATION_DRY_RUN = False
   ENABLE_ALERTS = True
   ENABLE_SCHEDULED_EMAIL_REPORTS = True
   EMAIL_NOTIFICATIONS = True
   EMAIL_REPORTS_USER="admin"
   SUPERSET_WEBSERVER_ADDRESS = "localhost"
   EMAIL_REPORTS_WEBDRIVER = "firefox"
   WEBDRIVER_TYPE= "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",
   ]
   
   WEBDRIVER_BASEURL = "http://superset:8088/";
   WEBDRIVER_BASEURL_USER_FRIENDLY = WEBDRIVER_BASEURL
   
   SQLLAB_CTAS_NO_LIMIT = True
   
   FEATURE_FLAGS = {
       "ALERT_REPORTS": True,
       "EMBEDDED_SUPERSET": True,
       "GENERIC_CHART_AXES": True,
       "ALERTS_ATTACH_REPORTS": True,
       "THUMBNAILS": True,
   }
   '
   
   Below are the errors I am seeing in Worker nodes: 
   
   `This typically means that you attempted to use functionality that needed
   an active HTTP request.  Consult the documentation on testing for
   information about how to avoid this problem.
   Traceback (most recent call last):
     File "/app/superset/reports/commands/execute.py", line 221, in 
_get_screenshots
       image = screenshot.get_screenshot(user=user)
     File "/app/superset/utils/screenshots.py", line 82, in get_screenshot
       self.screenshot = driver.get_screenshot(self.url, self.element, user)
     File "/app/superset/utils/webdriver.py", line 170, in get_screenshot
       driver = self.auth(user)
     File "/app/superset/utils/webdriver.py", line 149, in auth
       return machine_auth_provider_factory.instance.authenticate_webdriver(
     File "/app/superset/utils/machine_auth.py", line 63, in 
authenticate_webdriver
       elif request.cookies:
     File "/usr/local/lib/python3.8/site-packages/werkzeug/local.py", line 316, 
in __get__
       obj = instance._get_current_object()
     File "/usr/local/lib/python3.8/site-packages/werkzeug/local.py", line 520, 
in _get_current_object
       return get_name(local())  # type: ignore
     File "/usr/local/lib/python3.8/site-packages/flask/globals.py", line 33, 
in _lookup_req_object
       raise RuntimeError(_request_ctx_err_msg)
   RuntimeError: Working outside of request context.
   
   This typically means that you attempted to use functionality that needed
   an active HTTP request.  Consult the documentation on testing for
   information about how to avoid this problem.
   
   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 719, in run
       raise ex
     File "/app/superset/reports/commands/execute.py", line 715, in run
       ReportScheduleStateMachine(
     File "/app/superset/reports/commands/execute.py", line 673, in run
       state_cls(
     File "/app/superset/reports/commands/execute.py", line 574, in next
       raise first_ex
     File "/app/superset/reports/commands/execute.py", line 543, in next
       self.send()
     File "/app/superset/reports/commands/execute.py", line 440, in send
       notification_content = self._get_notification_content()
     File "/app/superset/reports/commands/execute.py", line 347, in 
_get_notification_content
       screenshot_data = self._get_screenshots()
     File "/app/superset/reports/commands/execute.py", line 226, in 
_get_screenshots
       raise ReportScheduleScreenshotFailedError(
   superset.reports.commands.exceptions.ReportScheduleScreenshotFailedError: 
Failed taking a screenshot Working outside of request context.
   
   
   
   


-- 
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