Szpadel / chrome-headless-render-pdf

223 stars 67 forks source link

Handle errors thrown during CDP construction #36

Closed danielrbradley closed 6 years ago

danielrbradley commented 6 years ago

Occasionally, after the port is available, the target is not yet ready and will throw an error within the Chrome class constructor: https://github.com/cyrus-and/chrome-remote-interface/blob/master/lib/chrome.js#L47

This gets raised through the event emitter which we can listen for and attempt another retry.

Szpadel commented 6 years ago

Thanks for PR!