Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[🐛 Bug]: Unknown Error,the error message is empty #15325

Open
melon-bun opened this issue Feb 23, 2025 · 2 comments
Open

[🐛 Bug]: Unknown Error,the error message is empty #15325

melon-bun opened this issue Feb 23, 2025 · 2 comments

Comments

@melon-bun
Copy link

What happened?

When using Selenium to launch Chrome, the browser does not open, and instead, an error occurs. However, the error message is blank.

How can we reproduce the issue?

selenium version:4.27.1
from selenium.webdriver.chrome.service import Service
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager
chromedriver_path = "M:/chromedriver-win64/chromedriver-win64/chromedriver.exe" 

service = Service(executable_path=chromedriver_path)
options = webdriver.ChromeOptions()
options.add_argument("--disable-extensions")
driver = webdriver.Chrome(service=service, options=options)
try:
    driver.get("https://www.google.com")
except Exception as e:
    print(f"error: {e}")

Relevant log output

WebDriverException                        Traceback (most recent call last)
Cell In[1], line 15
     13 options = webdriver.ChromeOptions()
     14 options.add_argument("--disable-extensions")
---> 15 driver = webdriver.Chrome(service=service, options=options)
     17 try:
     19     driver.get("https://www.google.com")

File d:\program files\python38\lib\site-packages\selenium\webdriver\chrome\webdriver.py:69, in WebDriver.__init__(self, executable_path, port, options, service_args, desired_capabilities, service_log_path, chrome_options, service, keep_alive)
     66 if not service:
     67     service = Service(executable_path, port, service_args, service_log_path)
---> 69 super(WebDriver, self).__init__(DesiredCapabilities.CHROME['browserName'], "goog",
     70                                 port, options,
     71                                 service_args, desired_capabilities,
     72                                 service_log_path, service, keep_alive)

File d:\program files\python38\lib\site-packages\selenium\webdriver\chromium\webdriver.py:93, in ChromiumDriver.__init__(self, browser_name, vendor_prefix, port, options, service_args, desired_capabilities, service_log_path, service, keep_alive)
     90 self.service.start()
     92 try:
---> 93     RemoteWebDriver.__init__(
     94         self,
     95         command_executor=ChromiumRemoteConnection(
     96             remote_server_addr=self.service.service_url,
     97             browser_name=browser_name, vendor_prefix=vendor_prefix,
     98             keep_alive=keep_alive, ignore_proxy=_ignore_proxy),
     99         options=options)
    100 except Exception:
    101     self.quit()

File d:\program files\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:266, in WebDriver.__init__(self, command_executor, desired_capabilities, browser_profile, proxy, keep_alive, file_detector, options)
    264 self.file_detector = file_detector or LocalFileDetector()
    265 self.start_client()
--> 266 self.start_session(capabilities, browser_profile)

File d:\program files\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:357, in WebDriver.start_session(self, capabilities, browser_profile)
    354 w3c_caps = _make_w3c_caps(capabilities)
    355 parameters = {"capabilities": w3c_caps,
    356               "desiredCapabilities": capabilities}
--> 357 response = self.execute(Command.NEW_SESSION, parameters)
    358 if 'sessionId' not in response:
    359     response = response['value']

File d:\program files\python38\lib\site-packages\selenium\webdriver\remote\webdriver.py:418, in WebDriver.execute(self, driver_command, params)
    416 response = self.command_executor.execute(driver_command, params)
    417 if response:
--> 418     self.error_handler.check_response(response)
    419     response['value'] = self._unwrap_value(
    420         response.get('value', None))
    421     return response

File d:\program files\python38\lib\site-packages\selenium\webdriver\remote\errorhandler.py:207, in ErrorHandler.check_response(self, response)
    205     value = response['value']
    206 if isinstance(value, str):
--> 207     raise exception_class(value)
    208 if message == "" and 'message' in value:
    209     message = value['message']

WebDriverException: Message:

Operating System

Window 11

Selenium version

4.27.1 python

What are the browser(s) and version(s) where you see this issue?

Chrome 133.0.6943.127

What are the browser driver(s) and version(s) where you see this issue?

Chromedriver 133.0.6943.127

Are you using Selenium Grid?

No response

Copy link

@melon-bun, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@cgoldberg
Copy link
Contributor

@melon-bun

Can you upgrade to the latest version of selenium (4.29) and verify this is reproducible? We only support the latest version.

Unfortunately, it looks like you are using Python 3.8... which is no longer supported with the latest selenium package. You might need to upgrade your version of Python as well if 3.8 gives you issues.

# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

2 participants