I’m trying to get a basic Puppeteer example working. It seems to be hanging on something. Any ideas?
https://www.developers.google.com/web/tools/puppeteer isn’t a valid URL, so the page.goto hangs with err_name_not_resolved. You want https://developers.google.com/web/tools/puppeteer I think.
Whoops, good catch. However, still doesn’t work after providing a valid URL.
I started a discussion on the Puppeteer side of things, too: https://github.com/GoogleChrome/puppeteer/issues/2143
you can see why it fails in the Logs:
TypeError: path must be absolute or specify root to res.sendFile at ServerResponse.sendFile (/rbd/pnpm-volume/2ba2fb12-3226-4fc6-a9ae-a9cf09896d19/node_modules/.registry.npmjs.org/express/4.16.2/node_modules/express/lib/response.js:421:11) at app.get (/app/server.js:14:14) at <anonymous>
Basically, the issue is that when the endpoint fails, you didn’t write a response for the browser, but only in the logs. Try adding this in the
This way you can see the error from the preview too
By the way, to actually fix the error you can write: