Skip to content
This repository has been archived by the owner on May 8, 2020. It is now read-only.

[SEVERE] The communication with Chromium are disconnected after 20 seconds. #159

Open
PCXDME opened this issue Nov 6, 2018 · 4 comments

Comments

@PCXDME
Copy link

PCXDME commented Nov 6, 2018

The connection/communication with Chromium are disconnected after 20 seconds.
So if you do something after 20 seconds, app will crash.

This will fail.

import asyncio
from pyppeteer import launch

async def main():
    browser = await launch()
    page = await browser.newPage()
    await page.goto('http://example.com')
    await asyncio.sleep(20)
    await page.screenshot({'path': 'example.png'})
    await browser.close()

asyncio.get_event_loop().run_until_complete(main())

Solution:
https://github.com/miyakogi/pyppeteer/blob/master/pyppeteer/connection.py#L43
The websockets.client.connect should be called with these parameters.
ping_interval=None
ping_timeout=None

This is fixed in https://github.com/pyppeteer/pyppeteer2

See #160 (comment)

@saadtazi
Copy link

saadtazi commented Nov 6, 2018

Related to #158 I think

@wackazong
Copy link
Contributor

wackazong commented Nov 18, 2018

Confirming issue and fix, thanks for that!

@nurettin
Copy link

Will this be part of a release?

@lucaromagnoli
Copy link

Hi,

Is this going to be addressed in future releases?

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

No branches or pull requests

5 participants