Chromedriver executable may have wrong permissions linux

Message: ‘chromedriver’ executable may have wrong permissions. #391

Comments

RealMakAttak commented Jul 11, 2017

I have tried everything to get rid of this error when I try to run any InstaPy script.

selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

I run with administrator cmd on windows 10, with full permissions (although the boxes are greyed out so im guessing those permissions are inherited)

What is wrong. Please help.

The text was updated successfully, but these errors were encountered:

onyxim commented Jul 11, 2017 •

Try to run with new docker micro services. It completely solves all chromedriver problems.

RealMakAttak commented Jul 11, 2017

I will look in to that, thank you very much! @onyxim

dc500 commented Jul 26, 2017

If anyone has this problem on Mac try brew install chromedriver

hajaja commented Oct 24, 2017

for me (using linux), the problem is solved by installing geckodriver

guymzee commented Jan 27, 2018

All my tinker has left me with the same problem, I either get a can not find Chrome binary or the permissions error. Did anyone figure this problem out ?

hecklerponics commented Jun 1, 2018 •

@guymzee same. this looks promising, but I can’t seem to resolve the Message: ‘chromedriver’ executable may have wrong permissions. error 🙁

hecklerponics commented Jun 1, 2018 •

@guymzee navigate to the dir your driver is in and type this: chmod a+x chromedriver

This solved the permissions issue for me, but now I’m having to troubleshoot this error chrome driver unexpectedly exited. Status code was: 127 :\

AlanInsam commented Jun 3, 2018

I got also the error ‘chromedriver’ executable may have wrong permissions anyone knows how to solve?

shnigi commented Jun 4, 2018

Got this issue when running Google-Chrome on Jenkins server. I had to download latest chromedriver here: http://chromedriver.chromium.org/downloads I accidentally downloaded wrong version first, then I moved chromedriver to /usr/local/bin and set Jenkins to its owner, chown jenkins /usr/local/bin/chromedriver and nooow it works.

gustafsom commented Jun 13, 2018

I performed the above procedure:

navigate to the dir your driver is in and type this: chmod a + x chromedriver

But now the following error occurs: [Errno 8] Exec format error

hecklerponics commented Jun 13, 2018

There’s no space between a+x

gtkpr commented Jun 22, 2018 •

i’m getting the exact same error, ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home when trying to execute a spider that uses selenium on my CentOS 7 VPS

gtkpr commented Jun 22, 2018 •

@hecklerponics on my CentOS 7 VPS i was getting the same error and i tried chmod a+x chromedriver , but now i get the following error:

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary (Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 3.10.0-862.3.3.el7.x86_64 x86_64)

hecklerponics commented Jun 22, 2018 •

@gtkpr I don’t know much about CentOS, but when I was using a Conda environment with it to run on an EC2+Ubuntu I had to make sure the chrome binary was accessible by the environment. Also, make sure you’re using the binary for chrome and not the .exe.

gtkpr commented Jun 22, 2018

i think i figured it out. move chromedriver to /usr/local/bin .

but now i’m getting the following error: ‘chromedriver’ executable needs to be in PATH.

hecklerponics commented Jun 22, 2018 •

@gtkpr that’s the error I got when the environment couldn’t access the driver. Are you declaring the path to the chromedriver here: driver #= webdriver.Chrome(‘PATH/TO/chromedriver) ?

gtkpr commented Jun 22, 2018 •

@hecklerponics
Sorry, i forgot to update its location in my script.

So once I moved it to /usr/local/bin and then updated the file location in my python script, then I started getting the following error:

selenium.common.exceptions.WebDriverException: Message: unknown error: cannot find Chrome binary

And this absolutely baffles me, unless it means i need to download and install Chrome/Chromium.

Just found this thread, which affirms my belief, so I’m going to install one or the other and see if that fixes the problem!

So I installed Chrome via the official repository. Now it’s throwing the following error:
DevToolsActivePort file doesn’t exist

Источник

‘chromedriver’ executable may have wrong permissions #2524

Comments

Nocturnal-2 commented Jul 24, 2018 •

I was using InstaPy successfully couple of months ago. I am setting up everything again after a Windows crash. I am getting the following error. I am using the latest Chrome driver (chromedriver_win32_v2.40) in the ‘assets’ folder. I tried copying a older version (chromedriver_win32_v2.37) with which I was running successfully before crash. But I am getting the following error.

Could someone please help me?

Current Behavior

`E:\Workspace\InstaPy>python quickstart.py
ERROR [2018-07-24 13:26:09] [myusername] Message: ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home
Traceback (most recent call last):
File «E:\Workspace\Python\Python37\lib\site-packages\selenium\webdriver\common\service.py», line 76, in start
stdin=PIPE)
File «E:\Workspace\Python\Python37\lib\subprocess.py», line 756, in init
restore_signals, start_new_session)
File «E:\Workspace\Python\Python37\lib\subprocess.py», line 1155, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «E:\Workspace\InstaPy\instapy\instapy.py», line 297, in set_selenium_local_session
chrome_options=chrome_options)
File «E:\Workspace\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py», line 68, in init
self.service.start()
File «E:\Workspace\Python\Python37\lib\site-packages\selenium\webdriver\common\service.py», line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

Читайте также:  Windows системные атрибуты папки

Traceback (most recent call last):
File «E:\Workspace\Python\Python37\lib\site-packages\selenium\webdriver\common\service.py», line 76, in start
stdin=PIPE)
File «E:\Workspace\Python\Python37\lib\subprocess.py», line 756, in init
restore_signals, start_new_session)
File «E:\Workspace\Python\Python37\lib\subprocess.py», line 1155, in _execute_child
startupinfo)
PermissionError: [WinError 5] Access is denied

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «E:\Workspace\InstaPy\instapy\instapy.py», line 297, in set_selenium_local_session
chrome_options=chrome_options)
File «E:\Workspace\Python\Python37\lib\site-packages\selenium\webdriver\chrome\webdriver.py», line 68, in init
self.service.start()
File «E:\Workspace\Python\Python37\lib\site-packages\selenium\webdriver\common\service.py», line 88, in start
os.path.basename(self.path), self.start_error_message)
selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File «quickstart.py», line 22, in
multi_logs=True)
File «E:\Workspace\InstaPy\instapy\instapy.py», line 190, in init
self.set_selenium_local_session()
File «E:\Workspace\InstaPy\instapy\instapy.py», line 301, in set_selenium_local_session
Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at E:\Workspace\InstaPy\assets\chromedriver`

InstaPy configuration

Latest InstaPy
Python 3.7.0
ChromeDriver 2.41
Chrome 68.x (up-to-date)
Windows 10

Please let me know if any additional info is needed.

In Windows properties > Security I have given full control for ‘chromedriver.exe’. But I am still getting this issue.

The text was updated successfully, but these errors were encountered:

Источник

Forums

‘chromedriver’ executable may have wrong permissions

I am trying to use selenium along with chrome web driver .chrome web driver .exe is already uploaded on the code files . How can I fix the following problem ?

self.service.start() File «/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py», line 76, in start os.path.basename(self.path), self.start_error_message) selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/ chromium.org/chromedriver/home

I’m pretty sure Chrome doesn’t work in our virtualisation system. We have a version of Firefox installed that does work, though.

Does it still not work?

No, we have a new experimental virtualization system. We can switch your account over to it. Headless chrome works there.

fjl, can you switch my account to the experimental virtualization system, please?

fjl, I am a beginner in programming, so just wondering that switching to the experimental virtualization system will not cause problems for the working parts of my web app, right? If not, then please switch me the experimental virtualization system as well.

@ipala5, it shouldn’t cause issues, but it’s still experimental and we haven’t identified all of the issues it may have. So, while it shouldn’t cause any issues with your web app, it may. Let us know if you’d still like to go ahead with the switch.

@glenn, I also would like to switch to the experimental virtualization system.

It is already enabled for your account. I believe you’ve asked for it before and we enabled it.

Hi glenn, could you please switch me over to the experimental virtualization system? Also, could you inform me when its done. Thanks

@ipala5 — sure, no problem — that’s done now. To use Chrome, you’ll need to upgrade Selenium for your account — for example, if you’re using Python 3.7, run this in Bash:

. and then you can run Selenium with Chrome using code like this:

Hi @glenn, I also would like to switch to the experimental virtualization system. Thks

No problem. I have enabled it for your account.

Hi glenn, I have followed exactly what you have said. I have successfully been able to upgrade selenium, however my code doesn’t seem to be working.

Thank you for all the help.

I don’t think you can see the images I have inserted — so just go to test/models.py

Taking a peak at the error you are seeing:

It seems you don’t have chrome/chromdriver installed. Our latest system image does have that ready for you. We can switch you over to that, but because it will change the versions of python libraries etc, that means that all your code may break and you will need to delete and recreate your virtualenvs. Do you want us to do that? Otherwise, you can also try to build chrome yourself.

no, I can’t do anything that will break my code currently as my assignment is due very soon. I do have ‘chromedriver.exe’ file in my test/ folder

Also, I just remembered that I have chrome version 81.0.4044.92 but I have had to install the driver for 81.0.4044.69 ( the most current release according to https://chromedriver.chromium.org/downloads/version-selection). I don’t know if that will make a difference.. but yeh just though I would add.

chromedriver.exe is the Windows version of Chromedriver — to run this on PythonAnywhere, you would need the 64-bit Linux version for the version of Chrome that you’re using.

sorry, for constantly asking so many questions. I have installed the linux version and instead of chromedriver.exe it is now just chromedriver. However, I am still getting the same error: ‘chromedriver’ executable needs to be in PATH’ Also, my chromedriver is in the same directory as my python file

Is that directory in the PATH? See result of echo $PATH in the bash console.

I have added the directory to my PATH, however same error is received.

The error in models.py when I run it

where is the chromedriver that you installed, what is your path, and what is the error?

The chromedriver is installed in /home/ipala5/test The images of the error and the path were attached in the above post (I have hosted my images on https://ibb.co/h8kG7vP and https://ibb.co/VSyTp7m)

hi, i encountered following error after i updated my chromedriver on server: Message: ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium.org/chromedriver/home can anyone kindly guide me how to fix this issue, thank you

i got this error, please can anyone update which version of chrome using on server thankyou Message: session not created: This version of ChromeDriver only supports Chrome version 81

The version of Chrome needs to match the version of Chromedriver, and if you’ve uploaded a new version then you need to also upload the matching version of Chrome; that’s not something we can change for you.

Out of interest, why don’t you just use the version that is already there?

Читайте также:  Ошибка c windows system32 dsound dll

I’m with same problem. I think the main issue is that I don’t have any Chrome in pythoneverywhere server. How to deal with it? I’ve tried to install it and I got a error

Ok, @dividendocao, I have enabled the new virtualisation system for your account. Give it a go now.

could you please switch me over to the experimental virtualization system?

sure @chikaki I have switched you over now.

could you please switch me over to the experimental virtualization system?

No problem. I have switched your account over.

Is the compatible version of chromedriver 78? I am still getting the error «WebDriverException: Message: ‘chromedriver’ executable may have wrong permissions.»

that’s not a version problem. That’s a file permissions problem. Did you build your own chrome?

Hi, I am having troubles with this too. Would you be able to help switch my account over to the experimental virtualisation system as well?

sure, that’s already done for you

Hi, even after the move i am getting the errors:

PermissionError: [Errno 13] Permission denied: ‘/home/jacommoditydata/mysite/chromedriver’

selenium.common.exceptions.WebDriverException: Message: ‘chromedriver’ executable may have wrong permissions. Please see https://sites.google.com/a/chromium. org/chromedriver/home

Does anyone know what the reasons may be? How can I go about fixing that?

Thanks Conrad. I’m not sure I understand what you mean by building my own chrome. Could you provide a resource that explains?

@jacommoditydata — It looks like you’re trying to use a different chromedriver to the one that is already supplied. If you do not specify the chromedriver executable or the path to it, then you should just use the built in one. @cwestie — I suspect that you have the same issue as @jacommoditydata

hi glenn, when i remove the chromedriver path altogether, i get the following error:

selenium.common.exceptions.WebDriverException: Message: chrome not reachable (Session info: headless chrome=78.0.3904.70) (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1106-aws x86_64)

Thanks, Glenn. I’m getting the following error:

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn’t exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1106-aws x86_64)

@jacommoditydata, @cwestie27 — what do you see if you run the following commands in a fresh Bash console?

Hi giles, this is what i get:

when i run it again in a new bash i get the following:

[edit by admin: formatting]

OK, that’s good news at least — those are the pre-installed ones. What happens if you run a super-simple selenium script like this?

Running the above simple code I get TypeError: init() got an unexpected keyword argument ‘options’

That sounds like you’re running a version of webdriver that does not support the options argument. If you’re running that code in a virtualenv, try running it outside of the virtualenv. Also, if you have installed selenium with the —user argument, try uninstalling it, so you can use the system-provided selenium.

I don’t think that’s the case. I opened a bash console where my simple python script you provided is and did the below. These are the ones provided right? chromedriver 78 should have the options argument?

[edit by admin: formatting]

Have you upgraded Selenium to the most recent version? For example, if you’re using Python 3.7, you would run

Thank you, Giles! That worked. Now I’m trying a piece of code that simply inputs text into an input field of instagram to log in via selecting the respective Xpath. Does PA have the ability to do that? The error I’m getting is:

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn’t exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1106-aws x86_64)

That sounds really weird — it’s as if Chromium crashed. Did you get any emails from our systems saying that it had used up too much memory? There is a 3GiB memory limit for processes on PythonAnywhere, which certainly should be sufficient for showing a web page, but with modern websites you never know.

No, I haven’t. Is there anything else you can think of trying?

If you have the example code that accesses Google working and that does not cause Chrome to crash, then it’s probably something about the code that is accessing instagram. Start with the Google code, and slowly add in the instagram code into it to see if you can determine where the browser starts crashing. Then maybe we can use that information to identify what’s causing the crash.

Hi! I have tried the code above and it throws this error: TypeError: init() got an unexpected keyword argument ‘options’. I wanted to write a more complex code, but I don’t think that the chrome driver is working properly. I have also attached the error: https://ibb.co/r2tg1TY . How can I solve it? 🙂

that sounds like your python selenium library version is incorrect

Well, I tried to run the same script from the bash and this is what I get now. I’ve seen the error above too, but cannot solve it. https://ibb.co/HpsTnzM

What is the command / script that you are using?

Sorry about that, i managed to solve. The problem was that i didn’t have the activation of the chrome virtualization. Thanks!

Glad to see that you figured it out!

Hi, I am having issues with this too. Could you switch my account over to the experimental virtualisation system as well? Thanks in advance!

Hi @glenn, I also would like to switch to the experimental virtualization system. Thks

@eudesrodrigo It’s done for you

Giles wrote: chromedriver.exe is the Windows version of Chromedriver — to run this on PythonAnywhere, you would need the 64-bit Linux version for the version of Chrome that you’re using. But I’m using Mac. Should it be the version of Chrome that PythonAnywhere is using? Please clarify

Hi @glenn, please switch my account to the experimental virtualization system. Thanks!

@alvaropmartins — the operating system that your own computer is using does not matter; you need to use the 64-bit Linux version of Chromedriver because our servers run 64-bit Linux.

Читайте также:  Жесткие диски отображаются как флешки windows 10

@thirstybear85 no problem, that’s done now. As a next step, you’ll need to upgrade Selenium for your account — for example, if you’re using Python 3.7, run this in Bash:

. and then you can run Selenium with Chrome using code like this:

Thanks a lot. Turns out that Firefox was just fine. I followed: https://www.pythonanywhere.com/forums/topic/26693/

@giles — thank you! Maybe you can help me a bit further. I upgraded selenium via bash console and now tried to run the sample code you provided in a notebook but I get this error:

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn’t exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1106-aws x86_64)

just to double check- is that a new bash console since Giles turned on the features for you? (perhaps try closing all the consoles so you don’t get confused with an old one?)

@conrad — yes I did install on a new bash console after giles post. also double checked it again now, closed all consoles started a new one and it says selenium is up to date. then I ran the sample code again and it gave me this error this time:

TypeError: init() got an unexpected keyword argument ‘options’

That error would definitely suggest that it’s not using the most recent version of Selenium. What command did you use to upgrade it, and what command are you using to run the script? Are you using a virtualenv?

I used the bash command giles provided in his post above:

I’m not using a virtualenv, I just ran that code in a notebook with a python 3.7 kernel which I opened from my dashboard. I’m a newbie maybe I have something wrong with the imports? Or some other stupid mistake??

This code gives me this error:

WebDriverException: Message: unknown error: Chrome failed to start: exited abnormally (unknown error: DevToolsActivePort file doesn’t exist) (The process started from chrome location /usr/bin/chromium-browser is no longer running, so ChromeDriver is assuming that Chrome has crashed.) (Driver info: chromedriver=2.42.591071 (0b695ff80972cc1a65a5cd643186d2ae582cd4ac),platform=Linux 4.4.0-1106-aws x86_64)

The error mentioned in my last post (TypeError: init() got an unexpected keyword argument ‘options’) occured when I accidently ran the code on a python 3.8 kernel which of course can’t work as I upgraded selenium on python 3.7 in bash console. so you can forget about that error, sorry. my problem is the one mentioned with the code above in this post. any further help much apreciated;-)

hi giles — I used the command line provided in your earlier post.

I’m not using a virtualenv. I started a notebook with python 3.7 from my dashboard and used the code below. I’m relatively new to python so maybe it is just some stupid mistake?

This code gives mit this error:

Please forget about the error mentioned in my last post (TypeError: init() got an unexpected keyword argument ‘options’), as I accidently used a python 3.8 kernel which obviously can’t work as I updated selenium in bash for python 3.7. Any further help much appreciated!

Ah, I’m sorry! I completely missed the fact that you were running this code in a notebook. Unfortunately the new virtualization system doesn’t work in notebooks yet — that would be what’s causing the problem here 🙁

ah ok, that makes sense:-)) thank you anyway!

Can you activate my chrome virtualization. Thanks

Sure, that’s done. See my earlier post for the next steps.

Could you please activate my chrome virtualization? Thanks so much!

@acj608 It’s done for you.

Hi @glenn, I also would like to switch the experimental chrome virtualization. Thank you!

okay, that has actually already been switched on for you.

Hi @glenn, I also would like to switch the experimental chrome virtualization. Thank you!

Sure, that’s done. See my earlier post for the next steps.

I am getting this error: —

Bad display name «»

Now i am getting this error: —

Message: ‘chromedriver.exe’ executable may have wrong permissions.

Please let me know what can i do to solve this.

chromedriver.exe would be the Windows version of ChromeDriver — you should not install that into your account. Instead, just use the one that is pre-installed — Selenium will do that if you do not specify a path to ChromeDriver when you create your browser.

I removed the path of my own chrome driver and now i am getting this error: —

Bad display name «»

It looks like the image link you posted is broken. Just post the text of the exception.

This is the image link. You can visit this to see the error: https://ibb.co/gSMdzT0

Could you please activate my chrome virtualization?I would be very happy about that.

I see the part of the traceback, but not the Error. Could you take it from your logs? It looks like it’s coming from your web app, so the link to your error.log is on your «Web» page on PythonAnywhere. The newest entries are on the bottom.

I am having similar problems, are you suggesting switching to the new virtualization system would remedy this @glenn?

@sovereign — for your account we would need to switch you over to the new virtualization system and also update your account so that you use the latest system image. For the latter change, one word of warning first — because of the changes to the point releases of Python (eg. 3.7.0 to 3.7.5), any virtualenvs you have might break — and if you’re not using virtualenvs, the pre-installed Python modules will be upgraded so that might break any code you have that relies on the old installed versions.

If you’re happy for us to switch you over despite that, then let us know.

Источник

Оцените статью