-
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Issue with Driver call in v1.5.1 (selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools) #52
Comments
Hi again! I will be investigating this issue. First I have a couple questions:
I did some research and it seems other users are reporting similar issues on Mac, some related to
The error message indicates that the WebDriver is not connected to DevTools. Some things you can try:
Because it failed for you at |
After upgrading the selenium, checking chrome and a restart, it went
further and this time the error was as below. I will try with 1.4.2 and
see if it works.
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/IMDBTraktSyncer/IMDBTraktSyncer.py",
line 229, in main
success, status_code, url = EH.get_page_with_retries(f'
https://www.imdb.com/title/{item["IMDB_ID"]}/', driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/IMDBTraktSyncer/errorHandling.py",
line 117, in get_page_with_retries
driver.get(url)
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py",
line 355, in get
self.execute(Command.GET, {"url": url})
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py",
line 346, in execute
self.error_handler.check_response(response)
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py",
line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected:
Unable to receive message from renderer
(failed to check if window was closed: disconnected: not connected to
DevTools)
(Session info: chrome=114.0.5735.133)
Stacktrace:
0 chromedriver_mac_arm64 0x0000000104df82b8
chromedriver_mac_arm64 + 4260536
1 chromedriver_mac_arm64 0x0000000104df094c
chromedriver_mac_arm64 + 4229452
2 chromedriver_mac_arm64 0x0000000104a2c9d4
chromedriver_mac_arm64 + 281044
3 chromedriver_mac_arm64 0x0000000104a1684c
chromedriver_mac_arm64 + 190540
4 chromedriver_mac_arm64 0x0000000104a16574
chromedriver_mac_arm64 + 189812
5 chromedriver_mac_arm64 0x0000000104a15198
chromedriver_mac_arm64 + 184728
6 chromedriver_mac_arm64 0x0000000104a154ec
chromedriver_mac_arm64 + 185580
7 chromedriver_mac_arm64 0x0000000104a2e990
chromedriver_mac_arm64 + 289168
8 chromedriver_mac_arm64 0x0000000104a9eda8
chromedriver_mac_arm64 + 748968
9 chromedriver_mac_arm64 0x0000000104a9e7e4
chromedriver_mac_arm64 + 747492
10 chromedriver_mac_arm64 0x0000000104a5b98c
chromedriver_mac_arm64 + 473484
11 chromedriver_mac_arm64 0x0000000104a5c98c
chromedriver_mac_arm64 + 477580
12 chromedriver_mac_arm64 0x0000000104db6a6c
chromedriver_mac_arm64 + 3992172
13 chromedriver_mac_arm64 0x0000000104dbacd0
chromedriver_mac_arm64 + 4009168
14 chromedriver_mac_arm64 0x0000000104dc0d48
chromedriver_mac_arm64 + 4033864
15 chromedriver_mac_arm64 0x0000000104dbb940
chromedriver_mac_arm64 + 4012352
16 chromedriver_mac_arm64 0x0000000104d9357c
chromedriver_mac_arm64 + 3847548
17 chromedriver_mac_arm64 0x0000000104dd9400
chromedriver_mac_arm64 + 4133888
18 chromedriver_mac_arm64 0x0000000104dd9558
chromedriver_mac_arm64 + 4134232
19 chromedriver_mac_arm64 0x0000000104de9c3c
chromedriver_mac_arm64 + 4201532
20 libsystem_pthread.dylib 0x00000001a55affa8 _pthread_start +
148
21 libsystem_pthread.dylib 0x00000001a55aada0 thread_start + 8
…On Sat, 24 Jun 2023 at 22:34, RileyXX ***@***.***> wrote:
Hi again! I will be investigating this issue. First I have a couple
questions:
1. Are you getting this error specifically on v1.5.1 or are you also
getting this error on v1.4.2?
2. Does it give you the same error every time or does it fail at
different points?
- Specifically I'm looking to see if this bug is coming from wait.until(EC.invisibility_of_element_located((By.CSS_SELECTOR,
'[data-testid="tm-box-wl-loader"]'))) in particular or if it is
also failing at different points.
I did some research and it seems other users are reporting similar issues
on Mac, some related to invisibility_of_element_located (Link #1
<https://stackoverflow.com/questions/75809962/webdriverexception-message-disconnected-not-connected-to-devtools-python-ma>,
Link #2 <flathunters/flathunter#357>, Link #3
<SeleniumHQ/selenium#11721>). Apparently some
people are saying it works for them occasionally on MacOS, and sometimes it
crashes. This might be a potential bug with chromedriver on MacOS. There
may be some type of port conflict with the dev tools or
invisibility_of_element_located is causing chrome or chromedriver to
crash.
selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
The error message indicates that the WebDriver is not connected to
DevTools.
Some things you can try:
- Make sure selenium is updated to the latest version using python -m
pip install selenium --upgrade
- Make sure chrome is updated to the latest version by opening Chrome
and entering chrome://settings/help in the url bar.
- Restart your computer and then run the script again and see if the
issue persists
- If the issue still persists, you can downgrade IMDBTraktSyncer to
v1.4.2
<https://github.com/RileyXX/IMDB-Trakt-Syncer/releases/tag/v1.4.2>
using python -m pip install IMDBTraktSyncer==1.4.2. If this version
works for you, then you can use it for now until a fix or workaround is
implemented. v1.4.2 is the latest version that doesn't use
invisibility_of_element_located.
Because it failed for you at wait.until(EC.invisibility_of_element_located((By.CSS_SELECTOR,
'[data-testid="tm-box-wl-loader"]'))) then I'm assuming a bug with
invisibility_of_element_located on MacOS is likely the cause. What I can
do is try to implement a workaround solution for Mac that doesn't use
invisibility_of_element_located. But first if you could please answer the 2
questions above so I can verify if invisibility_of_element_located is the
cause of the issue. Thanks!
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ7UU6FYFKCYEPH3WZ7OMJ3XM5FO5ANCNFSM6AAAAAAZRPLR2A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I confirm on the other hand that 1.4.2 is working fine!
…On Sat, 24 Jun 2023 at 23:13, Paul Bradley ***@***.***> wrote:
After upgrading the selenium, checking chrome and a restart, it went
further and this time the error was as below. I will try with 1.4.2 and
see if it works.
Traceback (most recent call last):
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/IMDBTraktSyncer/IMDBTraktSyncer.py",
line 229, in main
success, status_code, url = EH.get_page_with_retries(f'
https://www.imdb.com/title/{item["IMDB_ID"]}/', driver)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/IMDBTraktSyncer/errorHandling.py",
line 117, in get_page_with_retries
driver.get(url)
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py",
line 355, in get
self.execute(Command.GET, {"url": url})
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py",
line 346, in execute
self.error_handler.check_response(response)
File
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py",
line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected:
Unable to receive message from renderer
(failed to check if window was closed: disconnected: not connected to
DevTools)
(Session info: chrome=114.0.5735.133)
Stacktrace:
0 chromedriver_mac_arm64 0x0000000104df82b8
chromedriver_mac_arm64 + 4260536
1 chromedriver_mac_arm64 0x0000000104df094c
chromedriver_mac_arm64 + 4229452
2 chromedriver_mac_arm64 0x0000000104a2c9d4
chromedriver_mac_arm64 + 281044
3 chromedriver_mac_arm64 0x0000000104a1684c
chromedriver_mac_arm64 + 190540
4 chromedriver_mac_arm64 0x0000000104a16574
chromedriver_mac_arm64 + 189812
5 chromedriver_mac_arm64 0x0000000104a15198
chromedriver_mac_arm64 + 184728
6 chromedriver_mac_arm64 0x0000000104a154ec
chromedriver_mac_arm64 + 185580
7 chromedriver_mac_arm64 0x0000000104a2e990
chromedriver_mac_arm64 + 289168
8 chromedriver_mac_arm64 0x0000000104a9eda8
chromedriver_mac_arm64 + 748968
9 chromedriver_mac_arm64 0x0000000104a9e7e4
chromedriver_mac_arm64 + 747492
10 chromedriver_mac_arm64 0x0000000104a5b98c
chromedriver_mac_arm64 + 473484
11 chromedriver_mac_arm64 0x0000000104a5c98c
chromedriver_mac_arm64 + 477580
12 chromedriver_mac_arm64 0x0000000104db6a6c
chromedriver_mac_arm64 + 3992172
13 chromedriver_mac_arm64 0x0000000104dbacd0
chromedriver_mac_arm64 + 4009168
14 chromedriver_mac_arm64 0x0000000104dc0d48
chromedriver_mac_arm64 + 4033864
15 chromedriver_mac_arm64 0x0000000104dbb940
chromedriver_mac_arm64 + 4012352
16 chromedriver_mac_arm64 0x0000000104d9357c
chromedriver_mac_arm64 + 3847548
17 chromedriver_mac_arm64 0x0000000104dd9400
chromedriver_mac_arm64 + 4133888
18 chromedriver_mac_arm64 0x0000000104dd9558
chromedriver_mac_arm64 + 4134232
19 chromedriver_mac_arm64 0x0000000104de9c3c
chromedriver_mac_arm64 + 4201532
20 libsystem_pthread.dylib 0x00000001a55affa8 _pthread_start
+ 148
21 libsystem_pthread.dylib 0x00000001a55aada0 thread_start + 8
On Sat, 24 Jun 2023 at 22:34, RileyXX ***@***.***> wrote:
> Hi again! I will be investigating this issue. First I have a couple
> questions:
>
> 1. Are you getting this error specifically on v1.5.1 or are you also
> getting this error on v1.4.2?
> 2. Does it give you the same error every time or does it fail at
> different points?
> - Specifically I'm looking to see if this bug is coming from wait.until(EC.invisibility_of_element_located((By.CSS_SELECTOR,
> '[data-testid="tm-box-wl-loader"]'))) in particular or if it is
> also failing at different points.
>
> I did some research and it seems other users are reporting similar issues
> on Mac, some related to invisibility_of_element_located (Link #1
> <https://stackoverflow.com/questions/75809962/webdriverexception-message-disconnected-not-connected-to-devtools-python-ma>,
> Link #2 <flathunters/flathunter#357>, Link #3
> <SeleniumHQ/selenium#11721>). Apparently some
> people are saying it works for them occasionally on MacOS, and sometimes it
> crashes. This might be a potential bug with chromedriver on MacOS. There
> may be some type of port conflict with the dev tools or
> invisibility_of_element_located is causing chrome or chromedriver to
> crash.
>
> selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
> (failed to check if window was closed: disconnected: not connected to DevTools)
>
> The error message indicates that the WebDriver is not connected to
> DevTools.
>
> Some things you can try:
>
> - Make sure selenium is updated to the latest version using python -m
> pip install selenium --upgrade
> - Make sure chrome is updated to the latest version by opening Chrome
> and entering chrome://settings/help in the url bar.
> - Restart your computer and then run the script again and see if the
> issue persists
> - If the issue still persists, you can downgrade IMDBTraktSyncer to
> v1.4.2
> <https://github.com/RileyXX/IMDB-Trakt-Syncer/releases/tag/v1.4.2>
> using python -m pip install IMDBTraktSyncer==1.4.2. If this version
> works for you, then you can use it for now until a fix or workaround is
> implemented. v1.4.2 is the latest version that doesn't use
> invisibility_of_element_located.
>
> Because it failed for you at wait.until(EC.invisibility_of_element_located((By.CSS_SELECTOR,
> '[data-testid="tm-box-wl-loader"]'))) then I'm assuming a bug with
> invisibility_of_element_located on MacOS is likely the cause. What I can
> do is try to implement a workaround solution for Mac that doesn't use
> invisibility_of_element_located. But first if you could please answer the 2
> questions above so I can verify if invisibility_of_element_located is
> the cause of the issue. Thanks!
>
> —
> Reply to this email directly, view it on GitHub
> <#52 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AJ7UU6FYFKCYEPH3WZ7OMJ3XM5FO5ANCNFSM6AAAAAAZRPLR2A>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
Thanks for confirming that 1.4.2 is working without issue! It seems You can upgrade to the latest version using the following:
If you are still experiencing this error you can downgrade back to v1.4.2 again using the following:
|
Hi,
I confirm that the new version works perfectly and finishes correctly.
Many thanks for fixing it.
Kind Regards,
Paul
…On Tue, 27 Jun 2023 at 22:22, RileyXX ***@***.***> wrote:
Thanks for confirming that 1.4.2 is working without issue! It seems wait.until(EC.invisibility_of_element_located((By.CSS_SELECTOR,
'[data-testid="tm-box-wl-loader"]'))) may not be directly causing this
error. There may be something else causing chromedriver to crash or some
other issue. There are a few changes to IMDB requests in v1.5.4 which may
or may not fix this problem. When you get some time give it a try and let
me know how it goes.
You can upgrade to the latest version using the following:
python -m pip install IMDBTraktSyncer --upgrade
If you are still experiencing this error you can downgrade back to v1.4.2
again using the following:
python -m pip install IMDBTraktSyncer==1.4.2
—
Reply to this email directly, view it on GitHub
<#52 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AJ7UU6FC4AH5SHSCHGDYDGTXNM6JHANCNFSM6AAAAAAZRPLR2A>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Is there already an issue for your problem?
Bug Description
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/IMDBTraktSyncer/IMDBTraktSyncer.py", line 235, in main
wait.until(EC.invisibility_of_element_located((By.CSS_SELECTOR, '[data-testid="tm-box-wl-loader"]')))
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/support/wait.py", line 86, in until
value = method(self._driver)
^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/support/expected_conditions.py", line 300, in _predicate
target = driver.find_element(*target)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 831, in find_element
return self.execute(Command.FIND_ELEMENT, {"using": by, "value": value})["value"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/webdriver.py", line 440, in execute
self.error_handler.check_response(response)
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/selenium/webdriver/remote/errorhandler.py", line 245, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: disconnected: not connected to DevTools
(failed to check if window was closed: disconnected: not connected to DevTools)
(Session info: chrome=114.0.5735.133)
Stacktrace:
0 chromedriver_mac_arm64 0x00000001011fc2b8 chromedriver_mac_arm64 + 4260536
1 chromedriver_mac_arm64 0x00000001011f494c chromedriver_mac_arm64 + 4229452
2 chromedriver_mac_arm64 0x0000000100e309d4 chromedriver_mac_arm64 + 281044
3 chromedriver_mac_arm64 0x0000000100e19c48 chromedriver_mac_arm64 + 187464
4 chromedriver_mac_arm64 0x0000000100e19a30 chromedriver_mac_arm64 + 186928
5 chromedriver_mac_arm64 0x0000000100ea2030 chromedriver_mac_arm64 + 745520
6 chromedriver_mac_arm64 0x0000000100e5f98c chromedriver_mac_arm64 + 473484
7 chromedriver_mac_arm64 0x0000000100e6098c chromedriver_mac_arm64 + 477580
8 chromedriver_mac_arm64 0x00000001011baa6c chromedriver_mac_arm64 + 3992172
9 chromedriver_mac_arm64 0x00000001011becd0 chromedriver_mac_arm64 + 4009168
10 chromedriver_mac_arm64 0x00000001011c4d48 chromedriver_mac_arm64 + 4033864
11 chromedriver_mac_arm64 0x00000001011bf940 chromedriver_mac_arm64 + 4012352
12 chromedriver_mac_arm64 0x000000010119757c chromedriver_mac_arm64 + 3847548
13 chromedriver_mac_arm64 0x00000001011dd400 chromedriver_mac_arm64 + 4133888
14 chromedriver_mac_arm64 0x00000001011dd558 chromedriver_mac_arm64 + 4134232
15 chromedriver_mac_arm64 0x00000001011edc3c chromedriver_mac_arm64 + 4201532
16 libsystem_pthread.dylib 0x000000019307ffa8 _pthread_start + 148
17 libsystem_pthread.dylib 0x000000019307ada0 thread_start + 8
Environment
MacOS Ventura 13.4
Screenshots
No response
The text was updated successfully, but these errors were encountered: