Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Google Chrome: DevToolsActivePort file doesn't exist #118

Open
gavrilka opened this issue Feb 24, 2021 · 1 comment
Open

Google Chrome: DevToolsActivePort file doesn't exist #118

gavrilka opened this issue Feb 24, 2021 · 1 comment

Comments

@gavrilka
Copy link

gavrilka commented Feb 24, 2021

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)
@gavrilka
Copy link
Author

Solved it with this:

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant