Closed paul-switchnetsys closed 7 months ago
we are also affected by this issue
@paul-switchnetsys Which drawio version are you using? I can find same issue like this.
@jjasoncool I'm currently running drawio V22.0.8 and the issue I am experiencing is as per https://github.com/jgraph/docker-drawio/issues/144 where Chromium doesn't exist.
I'll try removing the drawio and image-export containers and pulling a new version down (it has been about a month or more since this issue came to light).
Sadly, I have the same issue.
> drawio-export@1.0.0 start
> node export.js
draw.io export server worker 4 listening on port 8000...
draw.io export server worker 1 listening on port 8000...
draw.io export server worker 3 listening on port 8000...
draw.io export server worker 2 listening on port 8000...
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=82.16.180.57 format=pdf w=0 h=0 bg=%23ffffff {"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:172.18.0.20 - - [24/Nov/2023:12:08:23 +0000] "POST / HTTP/1.1" 500 - "https://draw.switchnetsys.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"
Interestingly, the error mentions the cache path of "/home/pptuser/.cache/puppeteer" which doesn't exist in the container. ProductLauncher.js and ChromeLauncher.js do exist in the path "/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/node/" however.
Sadly, I have the same issue.
> drawio-export@1.0.0 start > node export.js draw.io export server worker 4 listening on port 8000... draw.io export server worker 1 listening on port 8000... draw.io export server worker 3 listening on port 8000... draw.io export server worker 2 listening on port 8000... 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=82.16.180.57 format=pdf w=0 h=0 bg=%23ffffff {"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:172.18.0.20 - - [24/Nov/2023:12:08:23 +0000] "POST / HTTP/1.1" 500 - "https://draw.switchnetsys.com/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 Edg/119.0.0.0"
Interestingly, the error mentions the cache path of "/home/pptuser/.cache/puppeteer" which doesn't exist in the container. ProductLauncher.js and ChromeLauncher.js do exist in the path "/home/pptruser/draw-image-export2/node_modules/puppeteer-core/lib/cjs/puppeteer/node/" however.
My drawio container seems don't using export-server
Same issue here as well. Self contained drawio with export-server throws this error.
Running drawio behind Caddy, a reverse proxy.
The next version should fix it
The next version should fix it
Thanks to the notification, I removed all containers (plantuml, image-export and draw) pulled new images and (after making a minor change to my docker-compose.yml, I can now export to PDF!
For reference the changes I made were:
Original (drawio container)
- DRAWIO_BASE_URL=draw.domain.com
- DRAWIO_SERVER_URL=https://draw.domain.com
Updated
- DRAWIO_BASE_URL=https://draw.domain.com
- DRAWIO_SERVER_URL=https://draw.domain.com/
Original (image-export container)
- DRAWIO_BASE_URL=draw.domain.com
Updated
- DRAWIO_BASE_URL=https://draw.domain.com
I'm not sure if those changes were needed or if it was simply a case of removing the containers, pulling new images and issuing a docker compose up -d.
Either way, PDF export is now working for me.
Thanks,
Thanks @paul-switchnetsys for confirming
Same issue here as well. Self contained drawio with export-server throws this error.
Running drawio behind Caddy, a reverse proxy.
My docker compose config
version: '3' services: plantuml-server: image: plantuml/plantuml-server expose: - "8080" networks: - drawionet volumes: - fonts_volume:/usr/share/fonts/drawio image-export: image: jgraph/export-server expose: - "8000" networks: - drawionet volumes: - fonts_volume:/usr/share/fonts/drawio environment: - DRAWIO_BASE_URL=https://draw.domain.com drawio: image: jgraph/drawio ports: - 127.0.0.1:21356:8080 - 127.0.0.1:21357:8443 links: - plantuml-server:plantuml-server - image-export:image-export depends_on: - plantuml-server - image-export networks: - drawionet environment: - DRAWIO_SELF_CONTAINED=1 - PLANTUML_URL=http://plantuml-server:8080/ - EXPORT_URL=http://image-export:8000/ - DRAWIO_BASE_URL=https://draw.domain.com - DRAWIO_SERVER_URL=https://draw.domain.com/ networks: drawionet: volumes: fonts_volume:
What does your Caddyfile looks like? I have the same issue with all internal network and it is the only feature that is not working. Using the latest container images.
I've been running the self-contained docker image flawlessly for several months now. To the point that the app was opened up to other engineers in my team. Recently, I've had reports that exporting to PDF fails with a 500 Internal Server Error.
Checking myself, I can confirm that this is the case. Looking at the docker log for the export-server container I see:
A check via Google suggests that 'npm install' either didn't run, or didn't run correctly. However, when I try to manually run 'npm install' via docker exec I encounter a permissions issue:
Aside from some minor changes to the self-contained docker-compose.yml file (shown below with the domain anonymised), I'm struggling to get export to PDF working again. Export to other formats appear to be working as expected (aside from a weird dashed line appearing in the VSDX export, but that's a separate issue).
Any advice would be greatly appreciated.
Thanks,