jgraph / docker-drawio

Dockerized draw.io based on whichever is the most secure image at the time.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

500 Internal-Server-Error when exporting to PDF

smoebody opened this issue · comments

Hi,

I recently updated the docker image jgraph/export-server and now the pdf-export fails. The container logs give me the following:

  Puppeteer old Headless deprecation warning:
    In the near feature `headless: true` will default to the new Headless mode
    for Chrome instead of the old Headless implementation. For more
    information, please see https://developer.chrome.com/articles/new-headless/.
    Consider opting in early by passing `headless: "new"` to `puppeteer.launch()`
    If you encounter any bugs, please report them to https://github.com/puppeteer/puppeteer/issues/new/choose.
warn: Handled exception: Could not find Chromium (rev. 1108766). This can occur if either
 1. you did not perform an installation before running the script (e.g. `npm install`) or
 2. your cache path is incorrectly configured (which is: /home/pptruser/.cache/puppeteer).
For (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration. req=ip=10.1.18.13 format=pdf w=0 h=0 bg=#ffffff  {"stack":"Error: Could not find Chromium (rev. 1108766). This can occur if either\n 1. you did not perform an installation before running the script (e.g. `npm install`) or\n 2. your cache path is incorrectly configured (which is: /home/pptruser/.cache/puppeteer).\nFor (2), check out our guide on configuring puppeteer at https://pptr.dev/guides/configuration.\n    at ChromeLauncher.resolveExecutablePath (/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:289:27)\n    at ChromeLauncher.executablePath (/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:182:25)\n    at ChromeLauncher.computeLaunchArguments (/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ChromeLauncher.js:99:37)\n    at async ChromeLauncher.launch (/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/node/ProductLauncher.js:83:28)\n    at async handleRequest (/home/pptruser/draw-image-export2/export.js:554:17)"}
::ffff:10.0.13.14 - - [21/Sep/2023:12:32:49 +0000] "POST / HTTP/1.1" 500 - "*redacted*"

Any ideas?

Does chromium show up as present on the system?

sorry, I forgot to mention. Im using the docker-image jgraph/export-server

You did mention, I'm suggesting to log into the docker image shell (if possible) and determine whether Chromium is install and can be found on the path.

Chromium does not exist.

The next version should fix it