We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chrome-aws-lambda
puppeteer
puppeteer-core
Load HTML into the opened page and conveting into the pdf
Got following error "Error: Failed to launch the browser process!", "[0306/083156.482836:WARNING:resource_bundle.cc(427)] locale_file_path.empty() for locale ", "Fontconfig error: Cannot load default config file: No such file: (null)", "[0306/083156.522474:FATAL:platform_font_skia.cc(97)] Check failed: InitDefaultFont(). Could not find the default font", "#0 0x564c990e3939 ", "#1 0x564c99055443 ", "#2 0x564c990664d5 ", "#3 0x564c99d7ff2e ", "#4 0x564c99d8152b ", "#5 0x564c99d7542e ", "#6 0x564c98139e10 ", "#7 0x564c9825da2a ", "#8 0x564c97fa8f57 ", "#9 0x564c97fa87e1 ", "#10 0x564c97fa82b7 ", "#11 0x564c97f532b8 ", "#12 0x564c97f7b9b6 ", "#13 0x564c97f59b57 ", "#14 0x564c97f5945f ", "#15 0x564c9a7ea4e1 ", "#16 0x564c9917e6d7 ", "#17 0x564c9904d1f4 ", "#18 0x564c97cebb4f ", "#19 0x564c97374e77 ", "#20 0x564c97ed89fe ", "#21 0x564c990b70d9 ", "#22 0x564c99093a1b ", "#23 0x564c990a47ce ", "#24 0x564c990a4561 ", "#25 0x564c990fe279 ", "#26 0x564c990a5059 ", "#27 0x564c990815e2 ", "#28 0x564c97e27824 ", "#29 0x564c97e29372 ", "#30 0x564c9a7f2b88 ", "#31 0x564c9900f6bf ", "#32 0x564c9900f3fa ", "#33 0x564c9a700693 ", "#34 0x564c99008861 ", "#35 0x564c990517e5 ", "#36 0x564c990514ad ", "#37 0x7f7424b2d02a __libc_start_main", "#38 0x564c9730e8aa _start", "Task trace:", "#0 0x564c9904cd32 ", "#1 0x564c9904cd32 ", "", "Received signal 6", "#0 0x564c990e3939 ", "#1 0x564c99055443 ", "#2 0x564c990e3481 ", "#3 0x7f74258627e0 ", "#4 0x7f7424b3fae0 __GI_raise", "#5 0x7f7424b40f88 __GI_abort", "#6 0x564c990e2285 ", "#7 0x564c99066974 ", "#8 0x564c99d7ff2e ", "#9 0x564c99d8152b ", "#10 0x564c99d7542e ", "#11 0x564c98139e10 ", "#12 0x564c9825da2a ", "#13 0x564c97fa8f57 ", "#14 0x564c97fa87e1 ", "#15 0x564c97fa82b7 ", "#16 0x564c97f532b8 ", "#17 0x564c97f7b9b6 ", "#18 0x564c97f59b57 ", "#19 0x564c97f5945f ", "#20 0x564c9a7ea4e1 ", "#21 0x564c9917e6d7 ", "#22 0x564c9904d1f4 ", "#23 0x564c97cebb4f ", "#24 0x564c97374e77 ", "#25 0x564c97ed89fe ", "#26 0x564c990b70d9 ", "#27 0x564c99093a1b ", "#28 0x564c990a47ce ", "#29 0x564c990a4561 ", "#30 0x564c990fe279 ", "#31 0x564c990a5059 ", "#32 0x564c990815e2 ", "#33 0x564c97e27824 ", "#34 0x564c97e29372 ", "#35 0x564c9a7f2b88 ", "#36 0x564c9900f6bf ", "#37 0x564c9900f3fa ", "#38 0x564c9a700693 ", "#39 0x564c99008861 ", "#40 0x564c990517e5 ", "#41 0x564c990514ad ", "#42 0x7f7424b2d02a __libc_start_main", "#43 0x564c9730e8aa _start", " r8: 0000000000000000 r9: 00007ffc7f669450 r10: 0000000000000008 r11: 0000000000000246", " r12: 00007ffc7f66a710 r13: 00007ffc7f6696f0 r14: 00007ffc7f66a718 r15: aaaaaaaaaaaaaaaa", " di: 0000000000000002 si: 00007ffc7f669450 bp: 00007ffc7f6696a0 bx: 0000000000000006", " dx: 0000000000000000 ax: 0000000000000000 cx: 00007f7424b3fae0 sp: 00007ffc7f669450", " ip: 00007f7424b3fae0 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000", " trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000", "[end of stack trace]", "Calling _exit(1). Core file will not be generated.", "", "", "TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md", "", " at onClose (/var/task/node_modules/puppeteer-core/lib/Launcher.js:750:14)", " at Interface. (/var/task/node_modules/puppeteer-core/lib/Launcher.js:739:50)", " at Interface.emit (events.js:228:7)", " at Interface.close (readline.js:402:8)", " at Socket.onend (readline.js:180:10)", " at Socket.emit (events.js:228:7)", " at endReadableNT (_stream_readable.js:1185:12)", " at processTicksAndRejections (internal/process/task_queues.js:81:21)" ] }
Code : const browser = await chromium.puppeteer.launch({ args: chromium.args, defaultViewport: chromium.defaultViewport, executablePath: await chromium.executablePath, headless: chromium.headless, }); const page = await browser.newPage(); await page.setContent(renderedTemplate, {waitUntil: 'networkidle0'}); const buffer = await page.pdf({ format: "A4", printBackground: true, margin: { "top": "6mm", "bottom": "6mm", } }); browser.close();
const browser = await chromium.puppeteer.launch({ args: chromium.args, defaultViewport: chromium.defaultViewport, executablePath: await chromium.executablePath, headless: chromium.headless, }); const page = await browser.newPage(); await page.setContent(renderedTemplate, {waitUntil: 'networkidle0'}); const buffer = await page.pdf({ format: "A4", printBackground: true, margin: { "top": "6mm", "bottom": "6mm", } }); browser.close();
The text was updated successfully, but these errors were encountered:
It same for me
Sorry, something went wrong.
I changed memory in lambda service to 512 mb and its work for me.
@don-aot Without renderedTemplate I cannot reproduce your example.
renderedTemplate
alixaxel
No branches or pull requests
Environment
chrome-aws-lambda
Version: ^2.1.1puppeteer
/puppeteer-core
Version: ^2.1.1Expected Behavior
Load HTML into the opened page and conveting into the pdf
Current Behavior
Got following error
"Error: Failed to launch the browser process!",
"[0306/083156.482836:WARNING:resource_bundle.cc(427)] locale_file_path.empty() for locale ",
"Fontconfig error: Cannot load default config file: No such file: (null)",
"[0306/083156.522474:FATAL:platform_font_skia.cc(97)] Check failed: InitDefaultFont(). Could not find the default font",
"#0 0x564c990e3939 ",
"#1 0x564c99055443 ",
"#2 0x564c990664d5 ",
"#3 0x564c99d7ff2e ",
"#4 0x564c99d8152b ",
"#5 0x564c99d7542e ",
"#6 0x564c98139e10 ",
"#7 0x564c9825da2a ",
"#8 0x564c97fa8f57 ",
"#9 0x564c97fa87e1 ",
"#10 0x564c97fa82b7 ",
"#11 0x564c97f532b8 ",
"#12 0x564c97f7b9b6 ",
"#13 0x564c97f59b57 ",
"#14 0x564c97f5945f ",
"#15 0x564c9a7ea4e1 ",
"#16 0x564c9917e6d7 ",
"#17 0x564c9904d1f4 ",
"#18 0x564c97cebb4f ",
"#19 0x564c97374e77 ",
"#20 0x564c97ed89fe ",
"#21 0x564c990b70d9 ",
"#22 0x564c99093a1b ",
"#23 0x564c990a47ce ",
"#24 0x564c990a4561 ",
"#25 0x564c990fe279 ",
"#26 0x564c990a5059 ",
"#27 0x564c990815e2 ",
"#28 0x564c97e27824 ",
"#29 0x564c97e29372 ",
"#30 0x564c9a7f2b88 ",
"#31 0x564c9900f6bf ",
"#32 0x564c9900f3fa ",
"#33 0x564c9a700693 ",
"#34 0x564c99008861 ",
"#35 0x564c990517e5 ",
"#36 0x564c990514ad ",
"#37 0x7f7424b2d02a __libc_start_main",
"#38 0x564c9730e8aa _start",
"Task trace:",
"#0 0x564c9904cd32 ",
"#1 0x564c9904cd32 ",
"",
"Received signal 6",
"#0 0x564c990e3939 ",
"#1 0x564c99055443 ",
"#2 0x564c990e3481 ",
"#3 0x7f74258627e0 ",
"#4 0x7f7424b3fae0 __GI_raise",
"#5 0x7f7424b40f88 __GI_abort",
"#6 0x564c990e2285 ",
"#7 0x564c99066974 ",
"#8 0x564c99d7ff2e ",
"#9 0x564c99d8152b ",
"#10 0x564c99d7542e ",
"#11 0x564c98139e10 ",
"#12 0x564c9825da2a ",
"#13 0x564c97fa8f57 ",
"#14 0x564c97fa87e1 ",
"#15 0x564c97fa82b7 ",
"#16 0x564c97f532b8 ",
"#17 0x564c97f7b9b6 ",
"#18 0x564c97f59b57 ",
"#19 0x564c97f5945f ",
"#20 0x564c9a7ea4e1 ",
"#21 0x564c9917e6d7 ",
"#22 0x564c9904d1f4 ",
"#23 0x564c97cebb4f ",
"#24 0x564c97374e77 ",
"#25 0x564c97ed89fe ",
"#26 0x564c990b70d9 ",
"#27 0x564c99093a1b ",
"#28 0x564c990a47ce ",
"#29 0x564c990a4561 ",
"#30 0x564c990fe279 ",
"#31 0x564c990a5059 ",
"#32 0x564c990815e2 ",
"#33 0x564c97e27824 ",
"#34 0x564c97e29372 ",
"#35 0x564c9a7f2b88 ",
"#36 0x564c9900f6bf ",
"#37 0x564c9900f3fa ",
"#38 0x564c9a700693 ",
"#39 0x564c99008861 ",
"#40 0x564c990517e5 ",
"#41 0x564c990514ad ",
"#42 0x7f7424b2d02a __libc_start_main",
"#43 0x564c9730e8aa _start",
" r8: 0000000000000000 r9: 00007ffc7f669450 r10: 0000000000000008 r11: 0000000000000246",
" r12: 00007ffc7f66a710 r13: 00007ffc7f6696f0 r14: 00007ffc7f66a718 r15: aaaaaaaaaaaaaaaa",
" di: 0000000000000002 si: 00007ffc7f669450 bp: 00007ffc7f6696a0 bx: 0000000000000006",
" dx: 0000000000000000 ax: 0000000000000000 cx: 00007f7424b3fae0 sp: 00007ffc7f669450",
" ip: 00007f7424b3fae0 efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000",
" trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000",
"[end of stack trace]",
"Calling _exit(1). Core file will not be generated.",
"",
"",
"TROUBLESHOOTING: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md",
"",
" at onClose (/var/task/node_modules/puppeteer-core/lib/Launcher.js:750:14)",
" at Interface. (/var/task/node_modules/puppeteer-core/lib/Launcher.js:739:50)",
" at Interface.emit (events.js:228:7)",
" at Interface.close (readline.js:402:8)",
" at Socket.onend (readline.js:180:10)",
" at Socket.emit (events.js:228:7)",
" at endReadableNT (_stream_readable.js:1185:12)",
" at processTicksAndRejections (internal/process/task_queues.js:81:21)"
]
}
Possible Solution
Steps to Reproduce
Code :
const browser = await chromium.puppeteer.launch({ args: chromium.args, defaultViewport: chromium.defaultViewport, executablePath: await chromium.executablePath, headless: chromium.headless, }); const page = await browser.newPage(); await page.setContent(renderedTemplate, {waitUntil: 'networkidle0'}); const buffer = await page.pdf({ format: "A4", printBackground: true, margin: { "top": "6mm", "bottom": "6mm", } }); browser.close();
The text was updated successfully, but these errors were encountered: