Selenium Webdriverexception: Message: Unknown Error: Cannot Determine Loading Status From Unknown Error: Missing Or Invalid 'entry.level'
Solution 1:
The error says it all :
selenium.common.exceptions.WebDriverException: Message: unknown error: cannot determine loading status
from unknown error: missing or invalid 'entry.level'
Your main issue is the version compatibility among the binaries you are using as follows :
- You are using
chromedriver=2.29.461591
(which is as per the logs, though you mentionedChromedriver 2.35
in your question) - Release Notes of
chromedriver=2.29.461591
clearly mentions the following :
Supports Chrome v56-58
- You are using
chrome=65.0.3315.3
- Release Notes of
chromedriver=2.35
clearly mentions the following :
Supports Chrome v62-64
- You are using
Selenium Version 2.53.1
. - Your
JDK version
is unknown to us.
Solution
- Upgrade
JDK
to recent levelsJDK Version 8 Update 151
. - Upgrade
ChromeDriver
toChromeDriver v2.35
level. - Keep
Chrome
toChrome v64.x
levels. (as per ChromeDriver v2.35 release notes
) - Upgrade
Selenium
to current levelsVersion 3.8.1
. - Clean the Project Workspace from your IDE & Rebuild All.
- Run CCleaner tool to wipe off all the OS chores.
- If your Chrome base version is too old, uninstall Chrome through Revo Uninstaller and install a recent GA Release version of Chrome.
- Take a System Reboot.
- Execute your
Test
.
Solution 2:
Go to http://chromedriver.chromium.org/downloads
copy the download link according to your OS
wget -N paste_the_link_you_copied
unzip it using below command
unzip chromedriver_linux64.zip
Give the permission by the below command
chmod +x chromedriver
Then follow the below commands, if it says already exists (probabily old version) then go to that path (/usr/local/bin/chromedriver and /usr/bin/chromedriver) and delete chromedriver and run the commands again
sudo mv -f chromedriver /usr/local/share/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver
sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
Hope this helps. Thanks
Solution 3:
That error raised beacuse your chrome browser is not compatible with the web driver. If you are using Linux, then simply execute the following command. sudo apt-get update
Solution 4:
Recently I am facing the same problem and take me too much time to figure out what's going on, in my situation facing the problem, I did not close the chrome process after using it, so you should check the process exit or not when you exit the app, this is my last worked Python 3 code demo, hope it will help others:
@staticmethod
def fetch_music_download_url(music_name: str):
chrome_driver_service = Service(ChromeDriverManager(chrome_type=ChromeType.GOOGLE).install())
chrome_options = Options()
chrome_options.add_argument("--no-sandbox")
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
chrome_options.add_argument("--remote-debugging-port=9230")
driver = webdriver.Chrome(service=chrome_driver_service,
options=chrome_options,
executable_path="/usr/local/bin/chromedriver")
try:
driver.maximize_window()
driver.get('http://tool.example.cn/music/?page=audioPage&type=migu&name=' + music_name)
driver.implicitly_wait(5)
driver.find_element(By.CSS_SELECTOR, ".aplayer-list-download.iconfont.icon-xiazai").click()
urls = [a.get_attribute('href') for a in
driver.execute_script('return document.querySelectorAll(".modal-body a[href*=\'http\']")')]
for url in urls:
if "listenSong.do" in url:
logger.info("fetched url:" + url)
FetchMusic.do_save_music_download_url(url)
except Exception as e:
logger.error("scrapy impl error", e)
finally:
driver.stop_client()
driver.close()
driver.quit()
chrome_driver_service.stop()
Post a Comment for "Selenium Webdriverexception: Message: Unknown Error: Cannot Determine Loading Status From Unknown Error: Missing Or Invalid 'entry.level'"