Skip to content
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 connect to Chrome #14472

Closed
sociallistening opened this issue Sep 4, 2024 · 5 comments
Closed

[🐛 Bug]:unable to connect to Chrome #14472

sociallistening opened this issue Sep 4, 2024 · 5 comments
Labels
I-defect I-issue-template Applied to issues not following the template, or missing information.

Comments

@sociallistening
Copy link

What happened?

i unable to connect to Chrome after update version.the code it used to work,but does'n.
Screenshot 2024-09-04 225956

How can we reproduce the issue?

chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--remote-debugging-port=9222')
chrome_options.add_argument('--window-size=1920x1080')
chrome_options.add_argument('--disable-software-rasterizer')
chrome_options.add_argument('--lang=th')

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)

Relevant log output

win32/chromedriver.exe] found in cache

Operating System

Microsoft Windows10

Selenium version

python 3.10.9 ,selenium 4.31.1

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

chrome

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

ChromeDriver version: 128.0.6613.119

Are you using Selenium Grid?

No response

Copy link

github-actions bot commented Sep 4, 2024

@sociallistening, 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!

@diemol
Copy link
Member

diemol commented Sep 4, 2024

Use https://www.selenium.dev/documentation/selenium_manager/ instead of ChromeDriverManager

@sociallistening
Copy link
Author

Use https://www.selenium.dev/documentation/selenium_manager/ instead of ChromeDriverManager

i got

SessionNotCreatedException Traceback (most recent call last)
Cell In[20], line 50
47 chrome_options.add_argument('--lang=th')
49 # Use Selenium Manager to handle the driver
---> 50 driver = webdriver.Chrome(options=chrome_options)
52 def login(email, password):
53 logging.info("Attempting to log in...")

File ~\anaconda3\lib\site-packages\selenium\webdriver\chrome\webdriver.py:45, in WebDriver.init(self, options, service, keep_alive)
42 service = service if service else Service()
43 options = options if options else Options()
---> 45 super().init(
46 browser_name=DesiredCapabilities.CHROME["browserName"],
47 vendor_prefix="goog",
48 options=options,
49 service=service,
50 keep_alive=keep_alive,
51 )

File ~\anaconda3\lib\site-packages\selenium\webdriver\chromium\webdriver.py:66, in ChromiumDriver.init(self, browser_name, vendor_prefix, options, service, keep_alive)
57 executor = ChromiumRemoteConnection(
58 remote_server_addr=self.service.service_url,
59 browser_name=browser_name,
(...)
62 ignore_proxy=options._ignore_local_proxy,
63 )
65 try:
---> 66 super().init(command_executor=executor, options=options)
67 except Exception:
68 self.quit()

File ~\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py:212, in WebDriver.init(self, command_executor, keep_alive, file_detector, options)
210 self._authenticator_id = None
211 self.start_client()
--> 212 self.start_session(capabilities)
214 self._websocket_connection = None
215 self._script = None

File ~\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py:299, in WebDriver.start_session(self, capabilities)
292 """Creates a new session with the desired capabilities.
293
294 :Args:
295 - capabilities - a capabilities dict to start the session with.
296 """
298 caps = _create_caps(capabilities)
--> 299 response = self.execute(Command.NEW_SESSION, caps)["value"]
300 self.session_id = response.get("sessionId")
301 self.caps = response.get("capabilities")

File ~\anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py:354, in WebDriver.execute(self, driver_command, params)
352 response = self.command_executor.execute(driver_command, params)
353 if response:
--> 354 self.error_handler.check_response(response)
355 response["value"] = self._unwrap_value(response.get("value", None))
356 return response

File ~\anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py:229, in ErrorHandler.check_response(self, response)
227 alert_text = value["alert"].get("text")
228 raise exception_class(message, screen, stacktrace, alert_text) # type: ignore[call-arg] # mypy is not smart enough here
--> 229 raise exception_class(message, screen, stacktrace)

SessionNotCreatedException: Message: session not created
from disconnected: unable to connect to renderer
Stacktrace:
GetHandleVerifier [0x00007FF6E0B9B5D2+29090]
(No symbol) [0x00007FF6E0B0E689]
(No symbol) [0x00007FF6E09CB1CA]
(No symbol) [0x00007FF6E0A0CE6D]
(No symbol) [0x00007FF6E0A078E9]
(No symbol) [0x00007FF6E0A01E0A]
(No symbol) [0x00007FF6E0A5236D]
(No symbol) [0x00007FF6E0A51A20]
(No symbol) [0x00007FF6E0A46493]
(No symbol) [0x00007FF6E0A109B1]
(No symbol) [0x00007FF6E0A11B11]
GetHandleVerifier [0x00007FF6E0EB8C5D+3295277]
GetHandleVerifier [0x00007FF6E0F04843+3605523]
GetHandleVerifier [0x00007FF6E0EFA707+3564247]
GetHandleVerifier [0x00007FF6E0C56EB6+797318]
(No symbol) [0x00007FF6E0B1980F]
(No symbol) [0x00007FF6E0B153F4]
(No symbol) [0x00007FF6E0B15580]
(No symbol) [0x00007FF6E0B04A1F]
BaseThreadInitThunk [0x00007FF875F7257D+29]
RtlUserThreadStart [0x00007FF877D2AF28+40]

Uploading Screenshot 2024-09-04 233854.png…

@diemol diemol added I-issue-template Applied to issues not following the template, or missing information. and removed needs-triaging labels Sep 4, 2024
Copy link

github-actions bot commented Sep 4, 2024

Hi, @sociallistening.
Please follow the issue template, we need more information to reproduce the issue.

Either a complete code snippet and URL/HTML (if more than one file is needed, provide a GitHub repo and instructions to run the code), the specific versions used, or a more detailed description to help us understand the issue.

Note: If you cannot share your code and URL/HTML, any complete code snippet and URL/HTML that reproduces the issue is good enough.

Reply to this issue when all information is provided, thank you.

@diemol
Copy link
Member

diemol commented Sep 17, 2024

We are closing this issue as we didn't get a reply from the original poster.

If someone is facing this issue, feel free to comment and provide a concise reproducible test case that includes the page required to execute the scenario (a sample page or a public site).

If you have any questions or need help, join us in the IRC/Slack channel, where the community can also assist you.

@diemol diemol closed this as not planned Won't fix, can't repro, duplicate, stale Sep 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-defect I-issue-template Applied to issues not following the template, or missing information.
Projects
None yet
Development

No branches or pull requests

2 participants