SolvedInstaPy ERROR Message: unknown error: DevToolsActivePort file doesn't exist

Please someone has this problem? What are you talking?

(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.9.0-5-amd64 x86_64)
Traceback (most recent call last):
File "/var/www/InstaPy/instapy/instapy.py", line 297, in set_selenium_local_session
chrome_options=chrome_options)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/chrome/webdriver.py", line 75, in init
desired_capabilities=desired_capabilities)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 156, in init
self.start_session(capabilities, browser_profile)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 251, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 320, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: unknown error: DevToolsActivePort file doesn't exist
(Driver info: chromedriver=2.40.565383 (76257d1ab79276b2d53ee976b2c3e3b9f335cde7),platform=Linux 4.9.0-5-amd64 x86_64)

Traceback (most recent call last):
File "quickstart.py", line 23, in
nogui=True)
File "/var/www/InstaPy/instapy/instapy.py", line 190, in init
self.set_selenium_local_session()
File "/var/www/InstaPy/instapy/instapy.py", line 301, in set_selenium_local_session
Settings.chromedriver_location))
instapy.instapy.InstaPyError: ensure chromedriver is installed at /var/www/InstaPy/assets/chromedriver

30 Answers

✔️Accepted Answer

uncomment line

chrome_options.add_argument('--no-sandbox')

in your instapy.py

should fix your problem.

Other Answers:

Quick update: i didn't set headless_browser=True just nogui=True. Setting both to True solved this concrete problem for me.

cant find this line

chrome_options.add_argument('--no-sandbox')

please what line is it on?

More Issues: