pyppeteer icon indicating copy to clipboard operation
pyppeteer copied to clipboard

Handle global context errors (i.e. with no callback id)

Open dmaone opened this issue 5 years ago • 0 comments

Those global errors arise from, for example, invalid JSON supplied to evaluateHandle().

Current pyppeteer revision just waits forever when that happens, because error happens on CDP level, not on callback level.

While it is possible to recover from such situation, it's somewhat hard to know what command caused the error. This patch just aborts all in-flight callbacks - which works for me but may not be the optimal way to handle such errors.

dmaone avatar Dec 30 '19 02:12 dmaone