2022-06-27

selenium / seleniumwire unknown error: cannot determine loading status from unknown error: unexpected command response

Here's the error:

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: unexpected command response
  (Session info: chrome=103.0.5060.53)

I'm using proper webdriver and chrome version:

Here is the script, its job is too open a webpage from the normal suer data directory and provide a response.

from seleniumwire import webdriver  # Import from seleniumwire


chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument("user-data-dir=C:\\selenium") 

driver = webdriver.Chrome(chrome_options=chrome_options)

driver.get('https://katalon.com/
')


for request in driver.requests:
    if request.response:
        print(
            
            request.response.status_code,
            
        )


1 comment:

  1. Mine did the same thing until I removed the user-data-dir option. Try commenting that line out and just letting chrome handle the user data. Hope it also solves your issue for you.
    Also chrome_options argument is now just options so your line should be
    driver = webdriver.Chrome(options=chrome_options)

    Cheers

    ReplyDelete