Chrome - Devtoolsactiveport File Doesn't Exist

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

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

Elena Rostova
Author

Elena Rostova

Elena Rostova holds a Master's degree in Public Health Journalism. She covers groundbreaking medical research, holistic wellness trends, mental health awareness, and nutritional science.