-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Description
Preflight Checklist
- [ X] I agree to follow the Code of Conduct that this project adheres to.
- [ X] I have searched the issue tracker for a feature request that matches the one I want to file, without success.
Describe the bug
I use the app in docker, headless mode with Xvfb, to build documentation with sphinx. The total command stack looks something like
/usr/bin/drawio --export --crop --page-index 0 --scale 1.0 --format svg --output /docs/output/.doctrees/drawio/c915ddac49c942e7c986f22a0b75bd9fb55460f7/test.svg /docs/test.drawio --enable-logging --no-sandbox
This is completely OK in version 26.0.16 and produces the exported file.
However, in the latest builds, this falls on some CLI argument validation. Note that I need to pass a few extra parameters to prevent Electron errors.
To Reproduce
Install .deb and Xvfb in a dockerized environment. I use sphinx image as base.
docker run -it --rm sphinxdoc/sphinx:latest /bin/bash
apt-get update
apt -y install libgbm1 libasound2 xvfb wget
wget --no-check-certificate "https://github.com/jgraph/drawio-desktop/releases/download/v26.2.2/drawio-amd64-26.2.2.deb" -O drawio.deb
apt -y install "./drawio.deb"
ln -s /opt/drawio /opt/draw.io
#Run xvfb
Xvfb :99 -screen 0 1024x768x16 &
export DISPLAY=:99
# Now try the command
/usr/bin/drawio --export --crop --page-index 0 --scale 1.0 --format svg --output /docs/output/.doctrees/drawio/c915ddac49c942e7c986f22a0b75bd9fb55460f7/test.svg /docs/test.drawio --enable-logging --no-sandbox
# This ends with error - expected 1 argument but got 3
# Try downgrading the package to 26.0.16
wget --no-check-certificate "https://github.com/jgraph/drawio-desktop/releases/download/v26.0.16/drawio-amd64-26.0.16.deb" -O drawio.deb
apt -y install "./drawio.deb" --allow-downgrades
# The same command
/usr/bin/drawio --export --crop --page-index 0 --scale 1.0 --format svg --output /docs/output/.doctrees/drawio/c915ddac49c942e7c986f22a0b75bd9fb55460f7/test.svg /docs/test.drawio --enable-logging --no-sandbox
Now it exits with another error - Error: input file/directory not found - but if it existed, it would work flawlessly. I can work it out from there, but I cannot pass CLI argument validation in the newer versions.
The point is, something must have changed in the CLI argument validation, which rendered otherwise working setups useless.
Expected behavior
CLI commands that worked in previous versions of the same majors will, with regards to backwards compatibility, remain functional.
Desktop (please complete the following information):
- Linux containerized