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

   ### Bug description
   
   When trying to send screenshots for reports, on ARM64 servers, we're getting 
this after upgrading to v5:
   ```
   Traceback (most recent call last):
     File 
"/app/.venv/lib/python3.10/site-packages/selenium/webdriver/common/driver_finder.py",
 line 67, in _binary_paths
       raise WebDriverException(f"Unsupported platform/architecture 
combination: {sys.platform}/{arch}")
   Traceback (most recent call last):
     File "/app/superset/utils/webdriver.py", line 311, in auth
       driver = self.create()
       return driver_class(**kwargs)
       raise NoSuchDriverException(msg) from err
   selenium.common.exceptions.NoSuchDriverException: Message: Unable to obtain 
driver for firefox; For documentation on this error, please visit: 
https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
       ).run()
     File "/app/superset/utils/decorators.py", line 266, in wrapped
       return on_error(ex)
     File "/app/superset/utils/decorators.py", line 236, in on_error
     File "/app/superset/utils/decorators.py", line 259, in wrapped
       ).run()
     File "/app/superset/utils/decorators.py", line 266, in wrapped
       return on_error(ex)
     File "/app/superset/utils/decorators.py", line 259, in wrapped
     File "/app/superset/commands/report/execute.py", line 858, in run
     File "/app/superset/commands/report/execute.py", line 726, in next
       self.send()
       notification_content = self._get_notification_content()
     File "/app/superset/commands/report/execute.py", line 505, in 
_get_notification_content
       screenshot_data = self._get_screenshots()
   [2025-08-26 04:20:04,146: ERROR/ForkPoolWorker-8] A downstream exception 
occurred while generating a report: 33d5ab22-2cdc-4b9a-9707-19ee0e80b24b. 
Failed taking a screenshot Message: Unable to obtain driver for firefox; For 
documentation on this error, please visit: 
https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
     File 
"/app/.venv/lib/python3.10/site-packages/selenium/webdriver/common/selenium_manager.py",
 line 94, in _get_binary
       self.screenshot = driver.get_screenshot(self.url, self.element, user)
     File "/app/superset/utils/webdriver.py", line 387, in get_screenshot
       driver = self.auth(user)
     File "/app/superset/utils/webdriver.py", line 308, in create
       if finder.get_browser_path():
     File 
"/app/.venv/lib/python3.10/site-packages/selenium/webdriver/common/driver_finder.py",
 line 47, in get_browser_path
     File 
"/app/.venv/lib/python3.10/site-packages/selenium/webdriver/common/driver_finder.py",
 line 78, in _binary_paths
   Traceback (most recent call last):
       raise ex
       result = func(*args, **kwargs)
     File "/app/superset/utils/decorators.py", line 236, in on_error
       result = func(*args, **kwargs)
       raise ReportScheduleScreenshotFailedError(
   superset.commands.report.exceptions.ReportScheduleScreenshotFailedError: 
Failed taking a screenshot Message: Unable to obtain driver for firefox; For 
documentation on this error, please visit: 
https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location
       output = SeleniumManager().binary_paths(self._to_args())
     File 
"/app/.venv/lib/python3.10/site-packages/selenium/webdriver/common/selenium_manager.py",
 line 47, in binary_paths
       args = [str(self._get_binary())] + args
   selenium.common.exceptions.WebDriverException: Message: Unsupported 
platform/architecture combination: linux/aarch64
   The above exception was the direct cause of the following exception:
     File "/app/superset/commands/report/execute.py", line 357, in 
_get_screenshots
       if imge := screenshot.get_screenshot(user=user):
     File "/app/superset/utils/screenshots.py", line 176, in get_screenshot
     File 
"/app/.venv/lib/python3.10/site-packages/selenium/webdriver/firefox/webdriver.py",
 line 57, in __init__
       return self._binary_paths()["browser_path"]
   The above exception was the direct cause of the following exception:
     File "/app/superset/tasks/scheduler.py", line 99, in execute
     File "/app/superset/commands/report/execute.py", line 896, in run
       raise ex
       ).next()
     File "/app/superset/commands/report/execute.py", line 624, in send
     File "/app/superset/commands/report/execute.py", line 363, in 
_get_screenshots
   ```
   
   ### Screenshots/recordings
   
   _No response_
   
   ### Superset version
   
   5.0.0
   
   ### Python version
   
   3.10
   
   ### Node version
   
   I don't know
   
   ### Browser
   
   Not applicable
   
   ### Additional context
   
   this was working fine in superset v4, knowing that we had to add this into 
docker image:
   ```
     # Install geckodriver for reports (ARM/AMD support):
     #ARCH=$(uname -m) && \
     curl -s https://api.github.com/repos/mozilla/geckodriver/releases/latest > 
/tmp/json && \
     if [ "$TARGETARCH" = "amd64" ]; then \
       ARCH="linux64"; \
       #GECKO_URL=$(cat /tmp/json | jq -r '.assets[].browser_download_url | 
select(endswith("linux64.tar.gz"))'); \
     elif [ "$TARGETARCH" = "arm64" ]; then \
        ARCH="linux-aarch64"; \
       #GECKO_URL=$(cat /tmp/json | jq -r '.assets[].browser_download_url | 
select(endswith("linux-aarch64.tar.gz"))'); \
     else \
       echo "Unsupported architecture" && exit 1; \
     fi && \
     GECKO_URL=$(jq -r --arg ARCH "$ARCH" '.assets[].browser_download_url | 
select(endswith("\($ARCH).tar.gz"))' /tmp/json) && \
     rm /tmp/json && \
     curl -s -L "$GECKO_URL" | tar -xz && \
     chmod +x geckodriver && \
     mv geckodriver "/usr/local/bin"
   ```
   
   ### Checklist
   
   - [x] I have searched Superset docs and Slack and didn't find a solution to 
my problem.
   - [x] I have searched the GitHub issue tracker and didn't find a similar bug 
report.
   - [x] 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.


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