selenium-manager failed with "dns error: failed to lookup address information: Name does not resolve"

104 Views Asked by At

I am using selenium-manager in Python, and I am getting an error in GitLab CI. The error is as follows.

{
  "level": "ERROR",
  "timestamp": 1708741147,
  "message": "error sending request for url (https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json): error trying to connect: dns error: failed to lookup address information: Name does not resolve"
}

To find the cause, I tried to run selenium-manager directly, but I get the same error. To investigate the cause, I tried to get the json file by "wget" immediately before the run as shown below, and it succeeded. Only selenium-manager failed.

- cat /etc/resolv.conf                                                                                                                                                                            
- dig googlechromelabs.github.io +qr                                                                                                                                                              
- wget https://googlechromelabs.github.io/chrome-for-testing/known-good-versions-with-downloads.json
- /builds/.venv/lib/python3.10/site-packages/selenium/webdriver/common/linux/selenium-manager --browser chrome --debug --language-binding python --output json

Do you know what the cause is?

1

There are 1 best solutions below

0
Boni García On

Your problem seems a connectivity issue at your end. I found a similar issue in another Rust-based tool:

https://github.com/codota/TabNine/issues/319

They solved the problem by setting the proxy settings.

See more info about proxies in Selenium here:

https://www.selenium.dev/documentation/selenium_manager/#connectivity-issues https://www.selenium.dev/documentation/webdriver/drivers/options/#proxy