You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2022/07/25 09:37:03 UTC
[GitHub] [superset] nigzak opened a new issue, #20843: sending emails from superset does not work with chrome or firefox - errors in logfiles for both possibilities
nigzak opened a new issue, #20843:
URL: https://github.com/apache/superset/issues/20843
Sending emails does not work - does not mind if firefox or chrome is used
#### How to reproduce the bug
create custom dockerfile with adding firefox or chrome (same issue if you only add one of them) and config
having redis active and reachable from docker
start docker
init image, load example and add a job for sending a report every minute
start cronery
```
celery --app=superset.tasks.celery_app:app worker --pool=prefork -O fair -c 4
```
HINT: featureflag alert_reports is active
![image](https://user-images.githubusercontent.com/102737855/180746793-aee43f26-f912-4bc4-a0d7-a93aaaa42248.png)
### Expected results
email is sent
### Actual results
error is shown in logfile, no email is sent
HINT: source for dockerfile is https://superset.apache.org/docs/installation/alerts-reports/
#### firefox
dockerfile
```
FROM apache/superset:2.0.0
USER superset:superset
COPY custom_sso_security_manager.py /app/pythonpath/custom_sso_security_manager.py
COPY superset_config.py /app/pythonpath/superset_config.py
USER root:root
RUN chown superset:superset /app/pythonpath/custom_sso_security_manager.py
RUN chown superset:superset /app/pythonpath/superset_config.py
RUN chmod +x /app/pythonpath/custom_sso_security_manager.py
RUN chmod +x /app/pythonpath/superset_config.py
RUN apt-get update && \
apt-get install --no-install-recommends -y firefox-esr
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 777 /usr/bin/geckodriver && \
rm geckodriver-v${GECKODRIVER_VERSION}-linux64.tar.gz
RUN pip install --no-cache authlib gevent psycopg2 redis
USER superset:superset
```
error
```
logging was configured successfully
2022-07-25 09:25:43,392:INFO:superset.utils.logging_configurator:logging was configured successfully
2022-07-25 09:25:43,399:INFO:root:Configured event logger of type <class 'superset.utils.log.DBEventLogger'>
-------------- celery@7db8236e4201 v5.2.2 (dawn-chorus)
--- ***** -----
-- ******* ---- Linux-5.10.16.3-microsoft-standard-WSL2-x86_64-with-glibc2.2.5 2022-07-25 09:25:45
- *** --- * ---
- ** ---------- [config]
- ** ---------- .> app: __main__:0x7ff39e8a2040
- ** ---------- .> transport: redis://redis:6379/5
- ** ---------- .> results: redis://redis:6379/5
- *** --- * --- .> concurrency: 4 (prefork)
-- ******* ---- .> task events: OFF (enable -E to monitor tasks in this worker)
--- ***** -----
-------------- [queues]
.> celery exchange=celery(direct) key=celery
SQLite Database support for metadata databases will be removed in a future version of Superset.
[2022-07-25 09:25:47,477: WARNING/ForkPoolWorker-4] SQLite Database support for metadata databases will be removed in a future version of Superset.
Init selenium driver
[2022-07-25 09:25:47,565: INFO/ForkPoolWorker-4] Init selenium driver
A downstream exception occurred while generating a report: f7372ee4-3c4d-4b6a-8b78-930926d4ba4f
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/superset/reports/commands/execute.py", line 234, in _get_screenshots
image = screenshot.get_screenshot(user=user)
File "/app/superset/utils/screenshots.py", line 74, in get_screenshot
self.screenshot = driver.get_screenshot(self.url, self.element, user)
File "/app/superset/utils/webdriver.py", line 109, in get_screenshot
driver = self.auth(user)
File "/app/superset/utils/webdriver.py", line 87, in auth
driver = self.create()
File "/app/superset/utils/webdriver.py", line 84, in create
return driver_class(**kwargs)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
self.service.start()
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/tasks/scheduler.py", line 79, in execute
AsyncExecuteReportScheduleCommand(
File "/app/superset/reports/commands/execute.py", line 659, in run
raise ex
File "/app/superset/reports/commands/execute.py", line 655, in run
ReportScheduleStateMachine(
File "/app/superset/reports/commands/execute.py", line 624, in run
state_cls(
File "/app/superset/reports/commands/execute.py", line 525, in next
raise first_ex
File "/app/superset/reports/commands/execute.py", line 503, in next
self.send()
File "/app/superset/reports/commands/execute.py", line 408, in send
notification_content = self._get_notification_content()
File "/app/superset/reports/commands/execute.py", line 334, in _get_notification_content
screenshot_data = self._get_screenshots()
File "/app/superset/reports/commands/execute.py", line 239, in _get_screenshots
raise ReportScheduleScreenshotFailedError(
superset.reports.commands.exceptions.ReportScheduleScreenshotFailedError: Failed taking a screenshot Message: 'geckodriver' executable needs to be in PATH.
[2022-07-25 09:25:47,881: ERROR/ForkPoolWorker-4] A downstream exception occurred while generating a report: f7372ee4-3c4d-4b6a-8b78-930926d4ba4f
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 72, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/usr/local/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/local/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'geckodriver'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/superset/reports/commands/execute.py", line 234, in _get_screenshots
image = screenshot.get_screenshot(user=user)
File "/app/superset/utils/screenshots.py", line 74, in get_screenshot
self.screenshot = driver.get_screenshot(self.url, self.element, user)
File "/app/superset/utils/webdriver.py", line 109, in get_screenshot
driver = self.auth(user)
File "/app/superset/utils/webdriver.py", line 87, in auth
driver = self.create()
File "/app/superset/utils/webdriver.py", line 84, in create
return driver_class(**kwargs)
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/firefox/webdriver.py", line 164, in __init__
self.service.start()
File "/usr/local/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 81, in start
raise WebDriverException(
selenium.common.exceptions.WebDriverException: Message: 'geckodriver' executable needs to be in PATH.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/app/superset/tasks/scheduler.py", line 79, in execute
AsyncExecuteReportScheduleCommand(
File "/app/superset/reports/commands/execute.py", line 659, in run
raise ex
File "/app/superset/reports/commands/execute.py", line 655, in run
ReportScheduleStateMachine(
File "/app/superset/reports/commands/execute.py", line 624, in run
state_cls(
File "/app/superset/reports/commands/execute.py", line 525, in next
raise first_ex
File "/app/superset/reports/commands/execute.py", line 503, in next
self.send()
File "/app/superset/reports/commands/execute.py", line 408, in send
notification_content = self._get_notification_content()
File "/app/superset/reports/commands/execute.py", line 334, in _get_notification_content
screenshot_data = self._get_screenshots()
File "/app/superset/reports/commands/execute.py", line 239, in _get_screenshots
raise ReportScheduleScreenshotFailedError(
superset.reports.commands.exceptions.ReportScheduleScreenshotFailedError: Failed taking a screenshot Message: 'geckodriver' executable needs to be in PATH.
```
#### chrome
#### Screenshots
If applicable, add screenshots to help explain your problem.
### Environment
(please complete the following information):
- browser type and version:
- superset version: `superset version`
- python version: `python --version`
- node.js version: `node -v`
- any feature flags active:
### Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ ] I have reproduced the issue with at least the latest released version of superset.
- [ ] 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.
--
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: notifications-unsubscribe@superset.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] nigzak commented on issue #20843: Send emails does not work -official documentation wrong? CHROME=>version incompatible ChromeDriver/Chrome FIREFOX=> 'geckodriver' executable needs to be in PATH
Posted by GitBox <gi...@apache.org>.
nigzak commented on issue #20843:
URL: https://github.com/apache/superset/issues/20843#issuecomment-1362587978
Hi @rusackas
I have added both driver in my container (still like this :)) and I am using currently CHROME variant.
I have shortly checked the official documentation again on page - and its still buggy. This should be at least fixed; if you use it like this it will not work
Official Documentation => https://superset.apache.org/docs/installation/alerts-reports/
![image](https://user-images.githubusercontent.com/102737855/209096829-b2bc331d-439b-4d20-9420-0adf5fafaedd.png)
This walk-through is not working because the versions are not matching and the use will fail.
Minimum suggested fix: remove "_88" to use latest version of chromedriver.
With this you install the latest chrome with the _88 chromdriver - they are not compatible
/// from up
```
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 88
Current browser version is 103.0.5060.134 with binary path /usr/bin/google-chrome
```
exact code lines where are not matching on docu page:
```
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
// downloads latest chrome (currently seems to be in linux at the moment V 108.0.5359.124)
...
export CHROMEDRIVER_VERSION=$(curl --silent https://chromedriver.storage.googleapis.com/LATEST_RELEASE_88) && \
wget -q https://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip
// downloads CHROMEDRIVER V88
==> V88 and V108 are not compatible
```
With this fix currently chromedriver version works.
If Gecko works I currently don't know sorry ... I am happy that I found at least one working config :)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas closed issue #20843: Send emails does not work -official documentation wrong? CHROME=>version incompatible ChromeDriver/Chrome FIREFOX=> 'geckodriver' executable needs to be in PATH
Posted by GitBox <gi...@apache.org>.
rusackas closed issue #20843: Send emails does not work -official documentation wrong? CHROME=>version incompatible ChromeDriver/Chrome FIREFOX=> 'geckodriver' executable needs to be in PATH
URL: https://github.com/apache/superset/issues/20843
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] eloymc98 commented on issue #20843: Send emails does not work -official documentation wrong? CHROME=>version incompatible ChromeDriver/Chrome FIREFOX=> 'geckodriver' executable needs to be in PATH
Posted by GitBox <gi...@apache.org>.
eloymc98 commented on issue #20843:
URL: https://github.com/apache/superset/issues/20843#issuecomment-1332030531
i'm getting the same error
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas commented on issue #20843: Send emails does not work -official documentation wrong? CHROME=>version incompatible ChromeDriver/Chrome FIREFOX=> 'geckodriver' executable needs to be in PATH
Posted by GitBox <gi...@apache.org>.
rusackas commented on issue #20843:
URL: https://github.com/apache/superset/issues/20843#issuecomment-1363624271
Just opened a teensy PR with your suggestion. If that merges, it should close this issue. Thanks for the report and the update!
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org
[GitHub] [superset] rusackas commented on issue #20843: Send emails does not work -official documentation wrong? CHROME=>version incompatible ChromeDriver/Chrome FIREFOX=> 'geckodriver' executable needs to be in PATH
Posted by GitBox <gi...@apache.org>.
rusackas commented on issue #20843:
URL: https://github.com/apache/superset/issues/20843#issuecomment-1343439446
@nigzak thanks for all the effort you put into filing this issue, and sorry it slipped through the cracks for so long. A lot of updates have been made in this area. Can you confirm whether or not this is still an issue? If it is, we'll do our best to repro/triage accordingly (CC @yousoph - happy to help track this with you as needed)
--
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: notifications-unsubscribe@superset.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org