LukeCarrier / mkdocs-drawio-exporter

Exports your Draw.io diagrams at build time for easier embedding into your documentation

Home Page:https://pypi.org/project/mkdocs-drawio-exporter/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error while exporting image

digogid opened this issue · comments

My application running on a kubernetes linux cluster is receiving an error while trying to export the image.

Exporting "/tmp/docs_83a7vd53/test.drawio" to "/tmp/backstage-aBt9dA/docs/drawio-exporter/71d93ea61644eca01ccdd1a939d9fb2af53a382d-0"
Using export command ['/usr/bin/drawio', '--export', '/tmp/docs_83a7vd53/test.drawio', '--page-index', '0', '--output', '/tmp/backstage-aBt9dA/docs/drawio-exporter/71d93ea61644eca01ccdd1a939d9fb2af53a382d-0', '--format', 'png', '--no-sandbox']
[24:0902/142640.911050:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
[24:0902/142640.911122:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
The futex facility returned an unexpected error code.
Export failed with exit status -6; skipping copy

I have set a DISPLAY env_var with 99 as value.

My mkdocs plugin is configured just with format property.

- drawio-exporter:
      format: png

In my docker image, we add the following instructions:

RUN apt-get install -y graphviz plantuml libasound2 xvfb wget

# draw.io dependencies
RUN apt-get install -y libsecret-1-0 libnotify4 libxss1 xdg-utils libgbm-dev

RUN pip3 install slugify
RUN pip3 install mkdocs-kroki-plugin
RUN pip3 install mkdocs-drawio-exporter
RUN pip3 install mkdocs-techdocs-core

RUN wget https://github.com/jgraph/drawio-desktop/releases/download/v20.2.3/drawio-amd64-20.2.3.deb
RUN dpkg -i drawio-amd64-20.2.3.deb

Any idea on what is happening?