
It exits right after clicking download link on the page w/o waiting for 5 seconds and chrome puts downloaded file into default 'Downloads' folder instead of defined 'downloadPath' in the script. Script does not work properly during the execution.

In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. So it’s basically a tool that lets you do all the cool browser related things on server. It can also be configured to use full (non-headless) Chrome or Chromium. (node:51016) DeprecationWarning: Unhandled promise rejections are deprecated. Puppeteer is a Node library which provides a high-level API to control headless Chrome or Chromium over the DevTools Protocol. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with. (node:51016) UnhandledPromiseRejectionWarning: Unhandled promise rejection. The generated file is then saved to the /public directory of the next. (C:\Users\Me\Downloads\puppeteer\node_modules\puppeteer\lib\helper.js:112:23)Īt C:\Users\Me\Downloads\puppeteer\test-download-file.js:97:18 After all of the site's code has been compiled, the script opens a headless browser using puppeteer, loads the HTML/CSS version of the CV, and creates a PDF using my preferred settings.

(node:51016) UnhandledPromiseRejectionWarning: Error: WebSocket is not open: readyState 3 (CLOSED)Īt nd (C:\Users\Me\Downloads\puppeteer\node_modules\ws\lib\websocket.js:329:19)Īt nd (C:\Users\Me\Downloads\puppeteer\node_modules\puppeteer\lib\WebSocketTransport.js:60:14)Īt Connection._rawSend (C:\Users\Me\Downloads\puppeteer\node_modules\puppeteer\lib\Connection.js:86:21)Īt nd (C:\Users\Me\Downloads\puppeteer\node_modules\puppeteer\lib\Connection.js:72:21)Īt gracefull圜loseChrome (C:\Users\Me\Downloads\puppeteer\node_modules\puppeteer\lib\Launcher.js:194:20)Īt Browser.close (C:\Users\Me\Downloads\puppeteer\node_modules\puppeteer\lib\Browser.js:255:31)Īt Browser.
