[Fix] selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status

Recently while using the selenwire package in python I got across an unexpected error ”selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status from unknown error: unexpected command response”. Below is the snippet for error:

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: unexpected command response

I would share the steps that helped me out to fix the selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status from unknown error: unexpected command response error issue.

Why selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status is seen?

This error is seen because of incompatible google chrome driver ‘chromeDriver 103 version’ and there is an issue raised for the same with the chromium community. The most easiest way to avoid this problem would be to change the version of the chrome driver used to a version which shows no error.

How to Fix selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status Error?

To fix selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status error, update the version of chrome driver you are using right now, as this is an error from google’s technical side.

Once you would update the google chrome driver to latest version, it would fix selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status error.

There is a known issue with non-headless chromedriver browsers, you can read more about it here. As of today there has not been a fix for chromedriver version 103 or less. 

To fix the problem You need to upgrade Google chrome and Chrome Driver to version 104.

Below are the steps to fix the selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status from unknown error: unexpected command response Error:

Step 1: Install Google Chrome Beta version

For installing Google Chrome Beta version, go to the official site link, click on “Download Chrome Beta” option and Google Chrome Beta version will be download to your laptop.

Google Chrome Beta version

Step 2: Update ChromeDriver to 104 Manually

https://chromedriver.storage.googleapis.com/index.html?path=104.0.5112.20/

Update ChromeDriver Manually

ON above mention link, Choose a driver according to your operating system:

For Mac Users

  • Open the zip file and move the contents to “/Applications/Google Chrome Beta.app/Contents/MacOS/Google Chrome Beta”

For Windows Users

  • Open the zip file and move the contents to “C:Program FilesGoogleChrome BetaApplicationchrome.exe”

Conclusion

To fix selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status error, update the version of chrome driver you are using as this is an error from google’s side. Because of this reason, Selenium community has closed the issue with regard to the same because the issue is related to Chrome team. You can read further about issue here.