3

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 Answers2

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

This helped!

0

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!

Logan
  • 482