-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Workaround for problem with rendering mermaid diagrams in pdfs on WSL2 #1822
Comments
Same problem here, and the workaround did the trick for me. Thanks! |
A few observation from my digging:
So basically, after installing the
It must have installed something that was missing... 🤔 I am trying to go back in a state to reproduce and find what Also, it seems Quarto does not closer the chrome process after rendering
@cscheid I believe they shouldn't be still running right ? Just to be sure so that I look into that too. |
@cderv That's not a great look, I agree. We don't fire off the process ourselves, we use a library, so we possibly need to dig into that. |
Ok thanks. For referece, I found this log about the deb installation
But nothing here stands out (is meaningful to me) of what change could have fix this. I probably need to find another clean environment as I cannot reproduce anymore after a google chome deb install 😞 |
I can reproduce on WSL in a clean install of Arch Linux too, using
I'll see if I can get more information from that state |
It will allow us to get more information in bug report like in #1822
So the issue is, at least for this new environment I am testing in, that Issue is
It seems the chromium that we install is missing a dependency in the system. At least for this error I reproduced. I opened a PR to add more context when we got such error so that bug report will help in the future. |
Following PR error message, this is all the package I need to install On arch linuxpacman -S nss
pacman -S atk
pacman -S at-spi2-atk
pacman -S libcups
pacman -S libdrm
pacman -S libxkbcommon
pacman -S libxcomposite
pacman -S libxdamage
pacman -S libxrandr
pacman -S mesa
pacman -S gtk3
pacman -S alsa-lib The chromium that we install does have some shared library requirement and we probably don't resolve those when we install using Calling On arch linuxldd /root/.local/share/quarto/chromium/linux-869685/chrome-linux/chrome
linux-vdso.so.1 (0x00007ffdabb78000)
libdl.so.2 => /usr/lib/libdl.so.2 (0x00007ffa10681000)
libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007ffa1067c000)
libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007ffa1061d000)
libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007ffa104e2000)
libnss3.so => /usr/lib/libnss3.so (0x00007ffa103ad000)
libnssutil3.so => /usr/lib/libnssutil3.so (0x00007ffa1037b000)
libsmime3.so => /usr/lib/libsmime3.so (0x00007ffa10351000)
libnspr4.so => /usr/lib/libnspr4.so (0x00007ffa10310000)
libatk-1.0.so.0 => /usr/lib/libatk-1.0.so.0 (0x00007ffa102e6000)
libatk-bridge-2.0.so.0 => /usr/lib/libatk-bridge-2.0.so.0 (0x00007ffa102b0000)
libcups.so.2 => /usr/lib/libcups.so.2 (0x00007ffa10212000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007ffa101fc000)
libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007ffa101a7000)
libgio-2.0.so.0 => /usr/lib/libgio-2.0.so.0 (0x00007ffa0ffdc000)
libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007ffa0ffab000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007ffa0ff80000)
libxkbcommon.so.0 => /usr/lib/libxkbcommon.so.0 (0x00007ffa0ff39000)
libm.so.6 => /usr/lib/libm.so.6 (0x00007ffa0fe51000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x00007ffa0fd0c000)
libXcomposite.so.1 => /usr/lib/libXcomposite.so.1 (0x00007ffa0fd07000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007ffa0fd02000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x00007ffa0fced000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007ffa0fce4000)
libXrandr.so.2 => /usr/lib/libXrandr.so.2 (0x00007ffa0fcd7000)
libgbm.so.1 => /usr/lib/libgbm.so.1 (0x00007ffa0fcc6000)
libpango-1.0.so.0 => /usr/lib/libpango-1.0.so.0 (0x00007ffa0fc5e000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0x00007ffa0fb3a000)
libgtk-3.so.0 => /usr/lib/libgtk-3.so.0 (0x00007ffa0f377000)
libgdk-3.so.0 => /usr/lib/libgdk-3.so.0 (0x00007ffa0f27f000)
libasound.so.2 => /usr/lib/libasound.so.2 (0x00007ffa0f190000)
libatspi.so.0 => /usr/lib/libatspi.so.0 (0x00007ffa0f152000)
libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x00007ffa0f14d000)
libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007ffa0f12d000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007ffa0ef46000)
/lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ffa1c847000)
libffi.so.8 => /usr/lib/libffi.so.8 (0x00007ffa0ef3a000)
libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007ffa0eec0000)
libplds4.so => /usr/lib/libplds4.so (0x00007ffa0eeb9000)
libplc4.so => /usr/lib/libplc4.so (0x00007ffa0eeb2000)
libavahi-common.so.3 => /usr/lib/libavahi-common.so.3 (0x00007ffa0eea4000)
libavahi-client.so.3 => /usr/lib/libavahi-client.so.3 (0x00007ffa0ee90000)
libgnutls.so.30 => /usr/lib/libgnutls.so.30 (0x00007ffa0ec90000)
libz.so.1 => /usr/lib/libz.so.1 (0x00007ffa0ec74000)
libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007ffa0eb97000)
libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007ffa0eb90000)
libmount.so.1 => /usr/lib/libmount.so.1 (0x00007ffa0eb4c000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x00007ffa0eb47000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007ffa0eb3f000)
libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007ffa0eb30000)
libwayland-server.so.0 => /usr/lib/libwayland-server.so.0 (0x00007ffa0eb1a000)
libfribidi.so.0 => /usr/lib/libfribidi.so.0 (0x00007ffa0eafa000)
libthai.so.0 => /usr/lib/libthai.so.0 (0x00007ffa0eaef000)
libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007ffa0ea04000)
libpng16.so.16 => /usr/lib/libpng16.so.16 (0x00007ffa0e9c9000)
libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007ffa0e979000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007ffa0e8aa000)
libxcb-render.so.0 => /usr/lib/libxcb-render.so.0 (0x00007ffa0e89a000)
libxcb-shm.so.0 => /usr/lib/libxcb-shm.so.0 (0x00007ffa0e895000)
libpixman-1.so.0 => /usr/lib/libpixman-1.so.0 (0x00007ffa0e7e8000)
libpangocairo-1.0.so.0 => /usr/lib/libpangocairo-1.0.so.0 (0x00007ffa0e7d6000)
libpangoft2-1.0.so.0 => /usr/lib/libpangoft2-1.0.so.0 (0x00007ffa0e7be000)
libcairo-gobject.so.2 => /usr/lib/libcairo-gobject.so.2 (0x00007ffa0e7b2000)
libgdk_pixbuf-2.0.so.0 => /usr/lib/libgdk_pixbuf-2.0.so.0 (0x00007ffa0e76c000)
libepoxy.so.0 => /usr/lib/libepoxy.so.0 (0x00007ffa0e638000)
libXi.so.6 => /usr/lib/libXi.so.6 (0x00007ffa0e624000)
libcloudproviders.so.0 => /usr/lib/libcloudproviders.so.0 (0x00007ffa0e60a000)
libtracker-sparql-3.0.so.0 => /usr/lib/libtracker-sparql-3.0.so.0 (0x00007ffa0e542000)
libwayland-client.so.0 => /usr/lib/libwayland-client.so.0 (0x00007ffa0e530000)
libwayland-cursor.so.0 => /usr/lib/libwayland-cursor.so.0 (0x00007ffa0e526000)
libwayland-egl.so.1 => /usr/lib/libwayland-egl.so.1 (0x00007ffa0e521000)
libXcursor.so.1 => /usr/lib/libXcursor.so.1 (0x00007ffa0e513000)
libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x00007ffa0e50e000)
libp11-kit.so.0 => /usr/lib/libp11-kit.so.0 (0x00007ffa0e3db000)
libbrotlienc.so.1 => /usr/lib/libbrotlienc.so.1 (0x00007ffa0e336000)
libbrotlidec.so.1 => /usr/lib/libbrotlidec.so.1 (0x00007ffa0e328000)
libzstd.so.1 => /usr/lib/libzstd.so.1 (0x00007ffa0e27d000)
libidn2.so.0 => /usr/lib/libidn2.so.0 (0x00007ffa0e25b000)
libunistring.so.2 => /usr/lib/libunistring.so.2 (0x00007ffa0e0af000)
libtasn1.so.6 => /usr/lib/libtasn1.so.6 (0x00007ffa0e098000)
libnettle.so.8 => /usr/lib/libnettle.so.8 (0x00007ffa0e044000)
libhogweed.so.6 => /usr/lib/libhogweed.so.6 (0x00007ffa0dffb000)
libgmp.so.10 => /usr/lib/libgmp.so.10 (0x00007ffa0df56000)
libcap.so.2 => /usr/lib/libcap.so.2 (0x00007ffa0df4a000)
libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007ffa0de01000)
liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007ffa0ddd7000)
liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007ffa0ddb5000)
libblkid.so.1 => /usr/lib/libblkid.so.1 (0x00007ffa0dd7a000)
libdatrie.so.1 => /usr/lib/libdatrie.so.1 (0x00007ffa0dd70000)
libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007ffa0dd4e000)
libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007ffa0dd3b000)
libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007ffa0dcb8000)
libtiff.so.5 => /usr/lib/libtiff.so.5 (0x00007ffa0dc21000)
libstemmer.so.0 => /usr/lib/libstemmer.so.0 (0x00007ffa0db56000)
libicuuc.so.71 => /usr/lib/libicuuc.so.71 (0x00007ffa0d957000)
libicui18n.so.71 => /usr/lib/libicui18n.so.71 (0x00007ffa0d625000)
libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x00007ffa0d4da000)
libjson-glib-1.0.so.0 => /usr/lib/libjson-glib-1.0.so.0 (0x00007ffa0d4ad000)
libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007ffa0d345000)
libbrotlicommon.so.1 => /usr/lib/libbrotlicommon.so.1 (0x00007ffa0d322000)
libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007ffa0d2fc000)
libicudata.so.71 => /usr/lib/libicudata.so.71 (0x00007ffa0b5f5000)
libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007ffa0b3be000) On Ubuntu
If anyone stumble again onto this error, please to try to see if any lib is missing. I found some dependency requirement in this troubleshooting guide: https://pptr.dev/next/troubleshooting/#chrome-headless-doesnt-launch-on-unix Recommandation is
Should we try to advice to run this or do it when we do I believe this will be an issue in several environment, including Docker. We should at least document it like in puppeteer or hopefully do more in @cscheid I think I got to the bottom of it. I let you lead the following step - happy to discuss more in details what is needed. |
@cderv Is it possible to detect that quarto is running under WSL? If so, then do you think you could add an error message in case we try to If not, then we need to fix this in our documentation by adding appropriate warnings to |
For that, I am relying on the environment variable Mine for example $ echo $WSL_DISTRO_NAME
Ubuntu-20.04 otherwise standard Linux check I guess
$ cat /proc/sys/kernel/osrelease
5.10.102.1-microsoft-standard-WSL2
$ uname -a
Linux DESKTOP-D24Q6VQ 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Sure. Do we want to error saying that installing chromium on WSL require some external dependencies and that should be installed manually as This is the official doc for this we could link to: https://pptr.dev/next/troubleshooting#running-puppeteer-on-wsl-windows-subsystem-for-linux
I think this still applies to document, or link to where we want. Possible having a link to quarto-web from our error message. |
Ok. @cderv I'm going to unassign myself from this since I can't fix it, but if you want a PR review I'll be happy to do it. |
Could it be that
quarto tools
installs the wrong OS version of puppeteer under WSL, and that's what's causing the reports of problems with chromium on windows?cc @cderv @dragonstyle
Discussed in #1814
Originally posted by Rockgecko August 11, 2022
I have been trying to render a .qmd file to pdf after I added a mermaid diagram.
I am using the Quarto VScode extension (with VScode attached to wsl via the Remote-wsl extension), but also tried rendering from the command line in wsl directly. In both cases I was getting the error:
ERROR: Couldn't find open server
.I saw the information in the docs here about potentially needing to install chromium using the command
quarto tools install chromium
. Tried this (from wsl command line), but still got the error afterwards. I could not find anything in the puppeteer docs that seemed relevant, but I did find a suggestion elsewhere that installing google-chrome directly via wsl might resolve issues with chromium. I tried this (following the info in this answer) and am now able to render without errors.Not sure it's an official solution, but might do as a workaround, so just posting in case anyone else has the same problem.
The text was updated successfully, but these errors were encountered: