Chrome - DevToolsActivePort file doesn't exist

My system:

  • Ubuntu 20.04 (AWS)
  • Python 3.8.5
  • ChromeDriver 88.0.4324.96
  • Google Chrome 88.0.4324.182

Error: 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.

Code:

async def arsenic_scraper(url): service = services.Chromedriver() browser = browsers.Chrome() browser.capabilities = {"goog:chromeOptions": {"args": ["--no-sandbox", "--disable-dev-shm-usage"]}} async with get_session(service, browser) as session: await session.get(url)
2

2 Answers

browser.capabilities = {"goog:chromeOptions": {"args": ["--headless", "--no-sandbox", "--disable-dev-shm-usage"]}}

This helped!

Try reinstalling Chrome. Press: CTRL+T Then enter the commands:

sudo apt-get --reinstall install WhateverChromeIsCalledOnDownload

You can get the package name by viewing the package that you downloaded. Make sure you get it exactly right or the command will not work.

I hope this helps!

6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like