-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[🐛 Bug]: unable to run selenium python in a docker container #13376
Comments
@alfonsocanor, thank you for creating this issue. We will troubleshoot it as soon as we can. Info for maintainersTriage this issue by using labels.
If information is missing, add a helpful comment and then
If the issue is a question, add the
If the issue is valid but there is no time to troubleshoot it, consider adding the
If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C),
add the applicable
After troubleshooting the issue, please add the Thank you! |
We do not write or maintain webdriver manager. Selenium has added driver and browser management functionality natively in our library, though. If you use the latest selenium without webdriver manager and still have an issue, we can help, otherwise |
I remove the webdriver manager dependency. Here's how it looks now same exception:
|
Run it with logging turned on: https://www.selenium.dev/documentation/webdriver/troubleshooting/logging/ |
Information from logs: Started executable: |
Hmm, I think our docs are missing the basicConfig line. Should look like this: import logging
from selenium import webdriver
logging.basicConfig(level=logging.WARN)
logging.getLogger('selenium').setLevel(logging.DEBUG)
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--remote-debugging-pipe')
driver = webdriver.Chrome(chrome_options) |
DEBUG:selenium.webdriver.common.selenium_manager:Selenium Manager binary found at: /usr/local/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-manager |
Hmm, now add driver logging...
|
new logs: (Updated with '--whitelisted-ips=') DEBUG:selenium.webdriver.common.selenium_manager:Selenium Manager binary found at: /usr/local/lib/python3.12/site-packages/selenium/webdriver/common/linux/selenium-manager |
Oh. Linux on M2. This makes sense now. Selenium does not automatically support Linux on ARM computers (e.g., M2). (Google does not provide browsers or drivers for this architecture, see GoogleChromeLabs/chrome-for-testing#1) Documentation here — https://www.selenium.dev/documentation/selenium_manager/#alternative-architectures |
Thanks for the time spent and the information. I found that Firefox supports this execution, in my scenario, I don't need to explicitly use Chrome but selenium. Here's an official docker image and additional information: https://github.com/seleniumhq-community/docker-seleniarm .Running as seluser worked as expected. |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What happened?
Python selenium running from a docker container results in timeout: Timed out receiving message from renderer: 60.000. Locally in MacOs (M2) works as expected.
How can we reproduce the issue?
Relevant log output
Operating System
MacOs + Docker
Selenium version
webdriver-manager==4.0.1
What are the browser(s) and version(s) where you see this issue?
120
What are the browser driver(s) and version(s) where you see this issue?
120
Are you using Selenium Grid?
NA
The text was updated successfully, but these errors were encountered: