close

[Solved] WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 in python. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 Error Occurs?

Today I get the following error WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 in python.

How To Solve WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 Error ?

  1. How To Solve WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 Error ?

    To Solve WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 Error I encountered the same error when using selenium/chromedriver on my VPS. I installed chromium-browser and the problem was gone.

  2. WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127

    To Solve WebDriverException: Message: Service chromedriver unexpectedly exited. Status code was: 127 Error I encountered the same error when using selenium/chromedriver on my VPS. I installed chromium-browser and the problem was gone.

Solution 1

It seems chromedriver needs some extra libraries. This solved the issue for me:

apt-get install -y libglib2.0-0=2.50.3-2 \
    libnss3=2:3.26.2-1.1+deb9u1 \
    libgconf-2-4=3.2.6-4+b1 \
    libfontconfig1=2.11.0-6.7+b1

I was working on a similar setup using a docker container instead of a server/VM without X / GUI.

To figure out which dependencies are required I tried iteratively to run it from the command line like this: /opt/chromedriver/2.33/chromedriver --version over and over again.

Then at eache time I used commands like apt-cache search <STUFF> and apt-cache madison <STUFF> to figure out the exact version of the deb package needed by chromedriver 2.33 (in my case, but I guess something similar would work for any version of chromedriver).

Solution 2

I encountered the same error when using selenium/chromedriver on my VPS. I installed chromium-browser and the problem was gone.

sudo apt-get install -y chromium-browser

Maybe it’s not the chromium-browser is needed, but the packages were installed along with it. However, that was a quick fix.

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also, Read