pyppeteer
pyppeteer copied to clipboard
[SEVERE] The communication with Chromium are disconnected after 20 seconds.
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 https://github.com/miyakogi/pyppeteer/pull/160#issuecomment-616863812
Related to #158 I think
Confirming issue and fix, thanks for that!
Will this be part of a release?
Hi,
Is this going to be addressed in future releases?