Python – Network Driver Exception: Message: Service/usr/lib/chromium-browser/chromedriver unexpectedly exited on Raspberry-Pi with ChromeDriver and Selenium

Network Driver Exception: Message: Service/usr/lib/chromium-browser/chromedriver unexpectedly exited on Raspberry-Pi with ChromeDriver and Selenium… here is a solution to the problem.

Network Driver Exception: Message: Service/usr/lib/chromium-browser/chromedriver unexpectedly exited on Raspberry-Pi with ChromeDriver and Selenium

I wrote a python script that does some tasks in the browser (using Selenium) and it works fine in Windows. Now I’m trying to install it on my Raspberry Pi.

I did a lot of searching to find the best way to make it work with Chromium. The best I could find was this Reddit Link .

The problem is that I can’t find a chromedriver for my version of Chromium (version 56.0.2924.84). When I do an apt-get upgrade, it tells me that I have the latest version of Chromium. I’ve tried chromedriver versions 53 through 65 by downloading from this Launchpad Link

So when I run the following command

from selenium import webdriver
driver_path = 'usr/lib/chromium-browser/chromedriver'
driver = webdriver. Chrome(driver_path)

I get error > 58 for the chrome driver

selenium.common.exceptions.SessionNoteCreatedException: Message: session not 
created exception: Chrome version must be >= 59.0.3071.0
(Driver info: chromedriver=2.43,platform=Linux 4.9.35-v7+ armv7l)

Or this error for chrome driver < 58

selenium.common.exceptions.WebDriverException: Message: 
Service /usr/lib/chromium-browser/chromedriver unexpectedly exited. Status code was: 127

Any help would be appreciated

Solution

Depending on your issue, your Chromium binary is version 56.0.2924.84. So, with this limitation in mind, the solution is to start with ChromeDriver Google Storage Download one of the following versions of ChromeDriver.

    ChromeDriver v84

  • : Chrome v84 is supported
  • ChromeDriver v83: Chrome v83 is supported
  • ChromeDriver v82: Skipped on purpose
  • ChromeDriver v81

  • : Chrome v81 is supported
  • ChromeDriver v80

  • : Chrome v80 is supported
  • ChromeDriver v79

  • : Chrome v79 is supported
  • ChromeDriver v78

  • : Chrome v78 is supported
  • ChromeDriver v77

  • : Chrome v77 is supported
  • ChromeDriver v76

  • : Chrome v76 is supported
  • ChromeDriver v75

  • : Chrome v75 is supported
  • ChromeDriver v74

  • : Chrome v74 is supported
  • ChromeDriver v73

  • : Chrome v73 is supported
  • ChromeDriver v2.46: Chrome v71-73 is supported
  • ChromeDriver v2.46: Chrome v71-73 is supported
  • ChromeDriver v2.45: Chrome v70-72 is supported
  • ChromeDriver

  • v2.44: Chrome v69-71 is supported (same as ChromeDriver 2.43, but other bug fixes).
  • ChromeDriver v2.43: Chrome v69-71 is supported
  • ChromeDriver v2.42: Chrome v68-70 is supported
  • ChromeDriver v2.41: Chrome v67-69 is supported
  • ChromeDriver v2.40: Chrome v66-68 is supported
  • ChromeDriver v2.39: Chrome v66-68 is supported
  • ChromeDriver v2.38: Chrome v65-67 is supported
  • ChromeDriver v2.37: Chrome v64-66 is supported
  • ChromeDriver v2.36: Chrome v63-65 is supported
  • ChromeDriver v2.35: Chrome v62-64 is supported
  • ChromeDriver v2.34: Chrome v61-63 is supported
  • ChromeDriver v2.33: Chrome v60-62 is supported
  • ChromeDriver v2.32: Chrome v59-61 is supported
  • ChromeDriver v2.31: Chrome v58-60 is supported
  • ChromeDriver v2.30: Chrome v58-60 is supported
  • ChromeDriver v2.29: Support for Chrome v56-58li >
  • ChromeDriver v2.28: Chrome v55-57 is supported
  • ChromeDriver v2.27: Chrome v54-56 is supported

Note: A few months ago, Chromium Team made a preliminary announcement that ChromeDriver’s versioning model will be changing. Chromium Team is moving forward with the plan. Specifically, ChromeDriver 2.46 will be the last release carrying the major version of 2. Future ChromeDriver releases will carry a version number similar to Chrome release. We will start with a release of ChromeDriver 73 next week, before the Beta release of Chrome 73.

The newly published model works as follows:

  • ChromeDriver will use the same version number scheme as Chrome. See https://www.chromium.org/developers/version-numbers for more details.
  • Each version of the ChromeDriver will support Chrome with matching major, minor, and build numbers. For example, the upcoming ChromeDriver 73.0.3683.* will support all Chrome versions starting with 73.0.3683.
  • Before a new major version of Chrome enters beta, a matching version of ChromeDriver will be released. For example, a new version of ChromeDriver will be released next week to match the beta version of Chrome m73.
  • After a new major version is first released, we will release patches as needed. These patches may or may not be consistent with Chrome updates.

ChromeDriver for the Raspberry Pi

When you use a Raspberry Pi, you need to start with this link download ChromeDriver arm format and use it in your programs.


Additional considerations

  • Upgrade Selenium to current levels Version 3.11.0
  • Upgrade ChromeDriver based on the discussion above.
  • Keep the Chrome

  • version at the Chrome v56.x level. (according to discussion).
  • Clean up your project workspace, go through your IDE and rebuild your project, using only the required dependencies.
  • Use a tool that CCleaner uses to clear all operating system chores before and after executing your test suite.
  • If your base Web Client version is too old, > Revo by Uninstaller uninstalls it. and install the latest GA and release versions of Web Client.
  • System reboot.
  • Carry out your @Test.

Related Problems and Solutions