jgraph / docker-drawio

Dockerized draw.io based on whichever is the most secure image at the time.
GNU General Public License v3.0
1.48k stars 359 forks source link

500 Internal-Server-Error when exporting to PDF #144

Closed smoebody closed 7 months ago

smoebody commented 11 months ago

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?

davidjgraph commented 11 months ago

Does chromium show up as present on the system?

smoebody commented 11 months ago

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

davidjgraph commented 11 months ago

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.

smoebody commented 11 months ago

Chromium does not exist.

m-mohamedin commented 8 months ago

The next version should fix it