puppeteer: Question: Broken example?
OS: GNU / Debian testing 64-bit
Node.js: v7.10.1
I have tried the PDF example and when I run it, Node rejected it for the following reasons:
(node:8043) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: Failed to connect to chrome! (node:8043) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Any suggestions please?
Cheers.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (8 by maintainers)
@Garbee thanks for pointing out issue #290.
@aslushnikov’s suggestion fixed my problem. Indeed it is sandbox’s problem and you have to be explicit when launching.
By adding
{args: ['--no-sandbox']}
insideawait puppeteer.launch()
works as expected.👍 to @aslushnikov for figuring out.
Cheers to both of you folks.
Looks related to #290. So check that thread for discussion on that.
You can go ahead and run these two scripts to verify your OS has everything required for Chromium to run.
Debian check
Namespace check
If you get no output, then all the things required to run Chromium should be there. If you get an error, follow what the instructions provided in the output.