1

Note: This question was closed referencing this question from a few years ago but, while similar, that question appears to address a separate issue. In that instance the error originates from tab crashed and in this case it is from target frame detached. The steps there unfortunately do not resolve this issue so I would ask that this question be left open as it appears to be distinct and previously unaddressed.

I am doing some web scraping using Python with Selenium and ChromeDriver that has been working fine for months but all of a sudden will now crash intermittently with the following error code:

Traceback (most recent call last):
  File "/Users/admin/Desktop/Code/script.py", line 104, in <module>
    driver.get(link)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 437, in get
    self.execute(Command.GET, {'url': url})
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/webdriver.py", line 425, in execute
    self.error_handler.check_response(response)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/selenium/webdriver/remote/errorhandler.py", line 247, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from target frame detached
  (Session info: chrome=100.0.4896.88)

Sometimes it will make it all the way through the code and complete properly, other times it will make it through some portion of the code (the amount of code it makes it through varies every time) and then terminate with the above error. There is no specific line that it hangs up on but the traceback does always begin with the driver.get() method (this method is called many times within the code).

No changes have been made to the code since it was working properly but Chrome did just recently update to version 100.0.4896.88. I have the latest version of ChromeDriver (100.0.4896.60) but am wondering if ChromeDriver may just be out of date at the moment as the version numbers do not match up (not sure if they are ever on identical nomenclature). Appreciate any tips to troubleshoot

CLJ22
  • 21
  • 2

0 Answers0