Преглед изворни кода

Merge pull request #10192 from weseek/fix/169460-169461-puppeteer-not-launching-in-pdf-converter

fix: Puppeteer not launching in pdf-converter
Yuki Takei пре 8 месеци
родитељ
комит
9f47504dae

+ 1 - 0
apps/app/src/features/page-bulk-export/server/service/page-bulk-export-job-cron/steps/export-pages-to-fs-async.ts

@@ -39,6 +39,7 @@ async function getPageWritable(this: IPageBulkExportJobCronService, pageBulkExpo
   // define before the stream starts to avoid creating multiple instances
   const htmlConverter = unified()
     .use(remarkParse)
+    // !!! DO NOT DISABLE HTML ESCAPING WHILE --no-sandbox IS PASSED TO PUPPETEER INSIDE pdf-converter !!!
     .use(remarkHtml);
   return new Writable({
     objectMode: true,

+ 4 - 0
apps/pdf-converter/src/service/pdf-convert.ts

@@ -285,6 +285,10 @@ class PdfConvertService implements OnInit {
       concurrency: Cluster.CONCURRENCY_PAGE,
       maxConcurrency: this.maxConcurrency,
       workerCreationDelay: 10000,
+      puppeteerOptions: {
+        // ref) https://github.com/weseek/growi/pull/10192
+        args: ['--no-sandbox'],
+      },
     });
 
     await this.puppeteerCluster.task(async ({ page, data: htmlString }) => {