I get the same error as in #2179, #2618.
ERROR [2018-08-01 21:11:58] [username] Message: unknown error: Chrome failed to start: exited abnormally
(unknown error: DevToolsActivePort file doesn't exist)
(The process started from chrome location /usr/bin/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 2.6.32-042stab120.6 x86_64)
Traceback (most recent call last):
File "/home/user/InstaPy/instapy/instapy.py", line 302, in set_selenium_local_session
chrome_options=chrome_options)
File "/usr/lib/python2.7/site-packages/selenium/webdriver/chrome/webdriver.py", line 69, in __init__
desired_capabilities=desired_capabilities)
File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 90, in __init__
self.start_session(desired_capabilities, browser_profile)
File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 177, in start_session
response = self.execute(Command.NEW_SESSION, capabilities)
File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "/usr/lib/python2.7/site-packages/selenium/webdriver/remote/errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
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/google-chrome is no longer running, so ChromeDriver is assuming that Chrome has crashed.)
(Driver info: chromedriver=2.41.578700 (2f1ed5f9343c13f73144538f15c00b370eda6706),platform=Linux 2.6.32-042stab120.6 x86_64)
Traceback (most recent call last):
File "username_de.py", line 11, in <module>
InstaPy(username='username',password='Password', nogui=True)\
File "/home/user/InstaPy/instapy/instapy.py", line 195, in __init__
self.set_selenium_local_session()
File "/home/user/InstaPy/instapy/instapy.py", line 306, in set_selenium_local_session
Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at /home/user/InstaPy/assets/chromedriver
Newest InstaPy version
Newest Chrome installed
Newest chromedriver installed
Ubuntu
Same, i tried everything,
ERROR [2018-08-01 22:19:20] [hpierre.photo] Message: Service /home/pi/Project/InstaPy/assets/chromedriver unexpectedly exited. Status code was: 127
Traceback (most recent call last):
File "/home/pi/Project/InstaPy/instapy/instapy.py", line 302, in set_selenium_local_session
chrome_options=chrome_options)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 62, in __init__
self.service.start()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 86, in start
self.assert_process_still_running()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/common/service.py", line 99, in assert_process_still_running
% (self.path, return_code)
WebDriverException: Message: Service /home/pi/Project/InstaPy/assets/chromedriver unexpectedly exited. Status code was: 127
Traceback (most recent call last):
File "quickstart.py", line 23, in
multi_logs=True)
File "/home/pi/Project/InstaPy/instapy/instapy.py", line 195, in __init__
self.set_selenium_local_session()
File "/home/pi/Project/InstaPy/instapy/instapy.py", line 306, in set_selenium_local_session
Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at /home/pi/Project/InstaPy/assets/chromedriver
I'm having the same problem as well.
I have deleted Chromedriver, installed the new one, installed the old one to see if that would work but nothing has worked so far.
having chromedriver alone is not enough you need to install chrome browser itself
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo dpkg -i google-chrome-stable_current_amd64.deb; sudo apt-get -fy install
@moeinrahimi i tried this too and it didn't worked
I believe the issue #2524 which I am facing is related to this.
Same here. After the pi update (sudo apt-get update) it doesn't work anymore.
@moeinrahimi Thanks for your reply, but I鈥檝e installed Chrome already. Have been using InstaPy for a long time, so I wouldn鈥檛 open an issue for such simple mistakes.
I got stuck on that too.
I solved this issue installing libgconf-2-4
sudo apt-get install libgconf-2-4
After that, I updated chromedriver to the latest version.
@rodriguesprobr is there an equivalent for Windows which I can install?
Also I would like to understand how _libgconf_ installation fixed this issue?
Sorry, but I don't use Windows for a long time.
I tried to ran chromedriver manually and the stdout message was that this library was missing.
When I run the Chromedriver manually it starts without any problem. I get 'PermissionError: [WinError 5] Access is denied' only when InstaPy tries to use it.
I use the InstaPy (up-to-date 04-Aug-2018) on Windows 10 (Python 3.7.0, ChromeDriver 2.41, Chrome 68.x (up-to-date))
I tried running a old version of InstaPy (which was running successfully about a month ago) using both old Chromedriver (v2.38) and also the latest version of Chromedriver (v2.41). Always the same error. This makes it difficult to guess where the issue is - whether with the InstaPy or elsewhere.
I'm on raspi 2 B+ i get the error too
Earlier InstaPy expected _chromedriver.exe_ inside 'assets' folder. Now it is expecting _chromedriver.exe_ inside 'assets/chromedriver' folder. Is my understanding correct?
When I run the Chromedriver manually it starts without any problem. I get 'PermissionError: [WinError 5] Access is denied' only when InstaPy tries to use it.
Did you try to change permission settings?
Did you try to change permission settings?
Yes, the driver has read, write, modify and execute permissions by default. I addition, I have given another permission called 'Full control'.
This problem still exists on Linux
@timgrossmann Do you have any idea how to fix this? Seems to be a problem for many users at the moment.
same here :\
Can someone please help with this? Unable to fix this for about a month :(
Hello! I use Win and I observed that script tries to execute InstaPy\assets\chromedriver_windows\ folder as a file.
So as temporaly workaround I put chromedriver.exe file to InstaPy\assets\ and delete this code in settings.py:
if os_env == 'windows':
chromedriver_location = os.path.join(BASE_DIR, 'assets', 'chromedriver_windows')
So chromedriver_location = os.path.join(BASE_DIR, 'assets', 'chromedriver')
only triggered now for my system.
@deyoneg Thank you! I also run from Windows.
I have appended chromedriver.exe to the third parameter of the following line in settings.py
chromedriver_location = os.path.join(BASE_DIR, 'assets', 'chromedriver\\chromedriver.exe')
Its working fine with this. Otherwise I think it is trying to execute the directory 'chromedriver' (instead of the executable inside the directory). If this is the case, to my understanding, anyone who downloaded the code after a last change here will not be able to run in Windows.
Same error
Message: Service /code/assets/chromedriver unexpectedly exited. Status code was: 127
I'm on Raspberry Pi3 B+ and I get the same error. Isn't it solved yet?
I think I solved the pi problem but let me finish some testing before I post something here.
Still need a solution. (Ubuntu)
Permissions : check, Latest Chrome : check, Drivers in assets : check, python-selenium installed : check, nogui & headless -> true : check
The combination is nogui=False
and headless=True
.
Theres no need for the virtual GUI when we are not running an actual chrome browser instance
@timgrossmann this doesn't work
Try this (worked for me):
Run this command at your cmd, to get the path of chromedriver:
whereis chromedriver
Then go to the instapy package code, and modify this block of code in instapy.py:
try:
self.browser = webdriver.Chrome(chromedriver_location,
desired_capabilities=capabilities,
chrome_options=chrome_options)
by changing chromedriver_location
to the location you've got from the whereis
command.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. > If this problem still occurs, please open a new issue
Most helpful comment
I think I solved the pi problem but let me finish some testing before I post something here.