Skip to content
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

Closed
cscheid opened this issue Aug 11, 2022 Discussed in #1814 · 10 comments · Fixed by #4596
Closed

Workaround for problem with rendering mermaid diagrams in pdfs on WSL2 #1822

cscheid opened this issue Aug 11, 2022 Discussed in #1814 · 10 comments · Fixed by #4596
Assignees
Labels
bug Something isn't working windows
Milestone

Comments

@cscheid
Copy link
Collaborator

cscheid commented Aug 11, 2022

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.

@cscheid cscheid added bug Something isn't working windows labels Aug 11, 2022
@cscheid cscheid added this to the Future milestone Aug 11, 2022
@kjohnsen
Copy link

kjohnsen commented Sep 7, 2022

Same problem here, and the workaround did the trick for me. Thanks!

@cderv cderv self-assigned this Sep 7, 2022
@cderv
Copy link
Collaborator

cderv commented Sep 8, 2022

A few observation from my digging:

  • I can (or rather could) reproduce the error on my WSL environment.
  • Installing the *.deb package solved the issue
  • After removing the installed google-chrome, and using chromium installed by Quarto, it is now working.

So basically, after installing the *deb file

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
apt install ./google-chrome-stable_current_amd64.deb

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

$ ps -aux | grep chrome
cderv    19542  0.0  0.0   8168   656 pts/5    S+   17:49   0:00 grep --color=auto chrome
$ quarto render test-mermaid.qmd --to pdf
$ ps -aux | grep chrome
cderv    19044  5.7  0.9 38579788 151424 pts/0 Sl   17:43   0:00 /home/cderv/.local/share/quarto/chromium/linux-869685/chrome-linux/chrome --headless --no-sandbox --single-process --disable-gpu --remote-debugging-port=9222
cderv    19046  0.0  0.3 33823600 56944 pts/0  S    17:43   0:00 /home/cderv/.local/share/quarto/chromium/linux-869685/chrome-linux/chrome --type=zygote --no-zygote-sandbox --no-sandbox --headless --headless
cderv    19047  0.1  0.3 33823600 56956 pts/0  S    17:43   0:00 /home/cderv/.local/share/quarto/chromium/linux-869685/chrome-linux/chrome --type=zygote --no-sandbox --headless --headless
cderv    19250  0.0  0.0   8168   652 pts/5    S+   17:43   0:00 grep --color=auto chrome

@cscheid I believe they shouldn't be still running right ? Just to be sure so that I look into that too.

@cscheid
Copy link
Collaborator Author

cscheid commented Sep 8, 2022

@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.

@cderv
Copy link
Collaborator

cderv commented Sep 8, 2022

Ok thanks.

For referece, I found this log about the deb installation

Log started: 2022-09-08  17:33:54
Selecting previously unselected package fonts-liberation.
(Reading database ... 
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 162250 files and directories currently installed.)
Preparing to unpack .../fonts-liberation_1%3a1.07.4-11_all.deb ...
Unpacking fonts-liberation (1:1.07.4-11) ...
Selecting previously unselected package google-chrome-stable.
Preparing to unpack .../google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (105.0.5195.102-1) ...
Selecting previously unselected package libu2f-udev.
Preparing to unpack .../libu2f-udev_1.1.10-1_all.deb ...
Unpacking libu2f-udev (1.1.10-1) ...
Setting up libu2f-udev (1.1.10-1) ...
Failed to send reload request: No such file or directory
Setting up fonts-liberation (1:1.07.4-11) ...
Setting up google-chrome-stable (105.0.5195.102-1) ...
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/x-www-browser (x-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/gnome-www-browser (gnome-www-browser) in auto mode
update-alternatives: using /usr/bin/google-chrome-stable to provide /usr/bin/google-chrome (google-chrome) in auto mode
Processing triggers for mime-support (3.64ubuntu1) ...
Processing triggers for man-db (2.9.1-1) ...
Processing triggers for fontconfig (2.13.1-2ubuntu3) ...
Processing triggers for desktop-file-utils (0.24-1ubuntu3) ...
Log ended: 2022-09-08  17:34:01

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 😞

@cderv
Copy link
Collaborator

cderv commented Sep 19, 2022

I can reproduce on WSL in a clean install of Arch Linux too, using quarto install tool chromium for the chrome installation.

Check file:///root/projects/quarto-cli/src/resources/vendor/deno-land/x/puppeteer@9-0-2/mod.ts
ERROR: Couldn't find open server

Error: Couldn't find open server
    at criClient (file:///root/projects/quarto-cli/src/core/cri/cri.ts:91:11)
    at async file:///root/projects/quarto-cli/src/core/cri/cri.ts:55:16
    at async Semaphore.runExclusive (file:///root/projects/quarto-cli/src/core/lib/semaphore.ts:42:22)
    at async Object.createPngsFromHtml (file:///root/projects/quarto-cli/src/core/handlers/base.ts:170:36)
    at async makePng (file:///root/projects/quarto-cli/src/core/handlers/mermaid.ts:279:11)
    at async makeDefault (file:///root/projects/quarto-cli/src/core/handlers/mermaid.ts:360:16)
    at async Object.cell (file:///root/projects/quarto-cli/src/core/handlers/mermaid.ts:400:14)
    at async Promise.all (index 0)
    at async Object.document (file:///root/projects/quarto-cli/src/core/handlers/base.ts:470:20)
    at async handleLanguageCells (file:///root/projects/quarto-cli/src/core/handlers/base.ts:427:34)

I'll see if I can get more information from that state

cderv added a commit that referenced this issue Sep 19, 2022
It will allow us to get more information in bug report like in #1822
@cderv
Copy link
Collaborator

cderv commented Sep 19, 2022

So the issue is, at least for this new environment I am testing in, that chrome is not launch correctly. The error is at launch with Deno.run() - that is why it can't connect because there is no chrome running.

Issue is

error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

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.

@cderv
Copy link
Collaborator

cderv commented Sep 19, 2022

Following PR error message, this is all the package I need to install

On arch linux
pacman -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 quarto install tool chromium

Calling ldd on chrome binary show all the deps

On arch linux
ldd /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
ldd /home/cderv/.local/share/quarto/chromium/linux-869685/chrome-linux/chrome
        linux-vdso.so.1 (0x00007ffed99de000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f77e94ac000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f77e9489000)
        libgobject-2.0.so.0 => /lib/x86_64-linux-gnu/libgobject-2.0.so.0 (0x00007f77e9429000)
        libglib-2.0.so.0 => /lib/x86_64-linux-gnu/libglib-2.0.so.0 (0x00007f77e9300000)
        libnss3.so => /lib/x86_64-linux-gnu/libnss3.so (0x00007f77e91b1000)
        libnssutil3.so => /lib/x86_64-linux-gnu/libnssutil3.so (0x00007f77e917e000)
        libsmime3.so => /lib/x86_64-linux-gnu/libsmime3.so (0x00007f77e914c000)
        libnspr4.so => /lib/x86_64-linux-gnu/libnspr4.so (0x00007f77e910c000)
        libatk-1.0.so.0 => /lib/x86_64-linux-gnu/libatk-1.0.so.0 (0x00007f77e90e2000)
        libatk-bridge-2.0.so.0 => /lib/x86_64-linux-gnu/libatk-bridge-2.0.so.0 (0x00007f77e90ab000)
        libcups.so.2 => /lib/x86_64-linux-gnu/libcups.so.2 (0x00007f77e9010000)
        libdrm.so.2 => /lib/x86_64-linux-gnu/libdrm.so.2 (0x00007f77e8ffa000)
        libdbus-1.so.3 => /lib/x86_64-linux-gnu/libdbus-1.so.3 (0x00007f77e8fa7000)
        libgio-2.0.so.0 => /lib/x86_64-linux-gnu/libgio-2.0.so.0 (0x00007f77e8dc6000)
        libexpat.so.1 => /lib/x86_64-linux-gnu/libexpat.so.1 (0x00007f77e8d98000)
        libxcb.so.1 => /lib/x86_64-linux-gnu/libxcb.so.1 (0x00007f77e8d6e000)
        libxkbcommon.so.0 => /lib/x86_64-linux-gnu/libxkbcommon.so.0 (0x00007f77e8d2c000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f77e8bdd000)
        libX11.so.6 => /lib/x86_64-linux-gnu/libX11.so.6 (0x00007f77e8a9e000)
        libXcomposite.so.1 => /lib/x86_64-linux-gnu/libXcomposite.so.1 (0x00007f77e8a99000)
        libXdamage.so.1 => /lib/x86_64-linux-gnu/libXdamage.so.1 (0x00007f77e8a94000)
        libXext.so.6 => /lib/x86_64-linux-gnu/libXext.so.6 (0x00007f77e8a7f000)
        libXfixes.so.3 => /lib/x86_64-linux-gnu/libXfixes.so.3 (0x00007f77e8a77000)
        libXrandr.so.2 => /lib/x86_64-linux-gnu/libXrandr.so.2 (0x00007f77e8a6a000)
        libgbm.so.1 => /lib/x86_64-linux-gnu/libgbm.so.1 (0x00007f77e8a57000)
        libpango-1.0.so.0 => /lib/x86_64-linux-gnu/libpango-1.0.so.0 (0x00007f77e8a08000)
        libcairo.so.2 => /lib/x86_64-linux-gnu/libcairo.so.2 (0x00007f77e88e5000)
        libgtk-3.so.0 => /lib/x86_64-linux-gnu/libgtk-3.so.0 (0x00007f77e8134000)
        libgdk-3.so.0 => /lib/x86_64-linux-gnu/libgdk-3.so.0 (0x00007f77e802f000)
        libasound.so.2 => /lib/x86_64-linux-gnu/libasound.so.2 (0x00007f77e7f34000)
        libatspi.so.0 => /lib/x86_64-linux-gnu/libatspi.so.0 (0x00007f77e7efb000)
        libxshmfence.so.1 => /lib/x86_64-linux-gnu/libxshmfence.so.1 (0x00007f77e7cf9000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f77e7cde000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f77e7aec000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f77f567d000)
        libffi.so.7 => /lib/x86_64-linux-gnu/libffi.so.7 (0x00007f77e7ae0000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f77e7a6d000)
        libplc4.so => /lib/x86_64-linux-gnu/libplc4.so (0x00007f77e7a64000)
        libplds4.so => /lib/x86_64-linux-gnu/libplds4.so (0x00007f77e7a5f000)
        libgssapi_krb5.so.2 => /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f77e7a12000)
        libavahi-common.so.3 => /lib/x86_64-linux-gnu/libavahi-common.so.3 (0x00007f77e7a04000)
        libavahi-client.so.3 => /lib/x86_64-linux-gnu/libavahi-client.so.3 (0x00007f77e79f1000)
        libgnutls.so.30 => /lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f77e7819000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f77e77fd000)
        libsystemd.so.0 => /lib/x86_64-linux-gnu/libsystemd.so.0 (0x00007f77e774e000)
        libgmodule-2.0.so.0 => /lib/x86_64-linux-gnu/libgmodule-2.0.so.0 (0x00007f77e7748000)
        libmount.so.1 => /lib/x86_64-linux-gnu/libmount.so.1 (0x00007f77e76e8000)
        libselinux.so.1 => /lib/x86_64-linux-gnu/libselinux.so.1 (0x00007f77e76bd000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f77e769f000)
        libXau.so.6 => /lib/x86_64-linux-gnu/libXau.so.6 (0x00007f77e7699000)
        libXdmcp.so.6 => /lib/x86_64-linux-gnu/libXdmcp.so.6 (0x00007f77e7691000)
        libXrender.so.1 => /lib/x86_64-linux-gnu/libXrender.so.1 (0x00007f77e7487000)
        libwayland-server.so.0 => /lib/x86_64-linux-gnu/libwayland-server.so.0 (0x00007f77e7471000)
        libfribidi.so.0 => /lib/x86_64-linux-gnu/libfribidi.so.0 (0x00007f77e7452000)
        libthai.so.0 => /lib/x86_64-linux-gnu/libthai.so.0 (0x00007f77e7447000)
        libharfbuzz.so.0 => /lib/x86_64-linux-gnu/libharfbuzz.so.0 (0x00007f77e7343000)
        libpixman-1.so.0 => /lib/x86_64-linux-gnu/libpixman-1.so.0 (0x00007f77e729c000)
        libfontconfig.so.1 => /lib/x86_64-linux-gnu/libfontconfig.so.1 (0x00007f77e7255000)
        libfreetype.so.6 => /lib/x86_64-linux-gnu/libfreetype.so.6 (0x00007f77e7196000)
        libpng16.so.16 => /lib/x86_64-linux-gnu/libpng16.so.16 (0x00007f77e715c000)
        libxcb-shm.so.0 => /lib/x86_64-linux-gnu/libxcb-shm.so.0 (0x00007f77e7157000)
        libxcb-render.so.0 => /lib/x86_64-linux-gnu/libxcb-render.so.0 (0x00007f77e7148000)
        libpangocairo-1.0.so.0 => /lib/x86_64-linux-gnu/libpangocairo-1.0.so.0 (0x00007f77e7136000)
        libXi.so.6 => /lib/x86_64-linux-gnu/libXi.so.6 (0x00007f77e7124000)
        libcairo-gobject.so.2 => /lib/x86_64-linux-gnu/libcairo-gobject.so.2 (0x00007f77e7118000)
        libgdk_pixbuf-2.0.so.0 => /lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0 (0x00007f77e70ee000)
        libepoxy.so.0 => /lib/x86_64-linux-gnu/libepoxy.so.0 (0x00007f77e6fbb000)
        libpangoft2-1.0.so.0 => /lib/x86_64-linux-gnu/libpangoft2-1.0.so.0 (0x00007f77e6fa2000)
        libXinerama.so.1 => /lib/x86_64-linux-gnu/libXinerama.so.1 (0x00007f77e6f9d000)
        libXcursor.so.1 => /lib/x86_64-linux-gnu/libXcursor.so.1 (0x00007f77e6f90000)
        libwayland-cursor.so.0 => /lib/x86_64-linux-gnu/libwayland-cursor.so.0 (0x00007f77e6f83000)
        libwayland-egl.so.1 => /lib/x86_64-linux-gnu/libwayland-egl.so.1 (0x00007f77e6f7e000)
        libwayland-client.so.0 => /lib/x86_64-linux-gnu/libwayland-client.so.0 (0x00007f77e6f6d000)
        librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f77e6f63000)
        libkrb5.so.3 => /lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f77e6e86000)
        libk5crypto.so.3 => /lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f77e6e55000)
        libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f77e6e4c000)
        libkrb5support.so.0 => /lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f77e6e3d000)
        libp11-kit.so.0 => /lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f77e6d07000)
        libidn2.so.0 => /lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f77e6ce6000)
        libunistring.so.2 => /lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f77e6b64000)
        libtasn1.so.6 => /lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f77e6b4e000)
        libnettle.so.7 => /lib/x86_64-linux-gnu/libnettle.so.7 (0x00007f77e6b12000)
        libhogweed.so.5 => /lib/x86_64-linux-gnu/libhogweed.so.5 (0x00007f77e6adb000)
        libgmp.so.10 => /lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f77e6a57000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f77e6a2e000)
        liblz4.so.1 => /lib/x86_64-linux-gnu/liblz4.so.1 (0x00007f77e6a0d000)
        libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f77e68ef000)
        libblkid.so.1 => /lib/x86_64-linux-gnu/libblkid.so.1 (0x00007f77e6896000)
        libpcre2-8.so.0 => /lib/x86_64-linux-gnu/libpcre2-8.so.0 (0x00007f77e6806000)
        libbsd.so.0 => /lib/x86_64-linux-gnu/libbsd.so.0 (0x00007f77e67ec000)
        libdatrie.so.1 => /lib/x86_64-linux-gnu/libdatrie.so.1 (0x00007f77e67e2000)
        libgraphite2.so.3 => /lib/x86_64-linux-gnu/libgraphite2.so.3 (0x00007f77e67b5000)
        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f77e67aa000)
        libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f77e67a3000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f77e6780000)

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

You can run ldd chrome | grep not on a Linux machine to check which dependencies are missing.

Should we try to advice to run this or do it when we do quarto install tool chromium ? cc @dragonstyle

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 quarto install.

@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 cderv assigned cscheid and unassigned cderv Sep 19, 2022
cscheid pushed a commit that referenced this issue Sep 19, 2022
…red (#2499)

It will allow us to get more information in bug report like in #1822
@cderv cderv added the needs-discussion Issues that require a team-wide discussion before proceeding further label Sep 21, 2022
@allenmanning allenmanning modified the milestones: Future, v1.3 Oct 5, 2022
@cscheid cscheid removed the needs-discussion Issues that require a team-wide discussion before proceeding further label Oct 5, 2022
@cscheid
Copy link
Collaborator Author

cscheid commented Feb 28, 2023

@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 quarto install chromium under WSL?

If not, then we need to fix this in our documentation by adding appropriate warnings to quarto-web in the case of pupetteer and WSL.

@cscheid cscheid added the needs-discussion Issues that require a team-wide discussion before proceeding further label Feb 28, 2023
@cderv
Copy link
Collaborator

cderv commented Feb 28, 2023

Is it possible to detect that quarto is running under WSL?

For that, I am relying on the environment variable WSL_DISTRO_NAME - I believe it would exists only on WSL, and it contains the distribution used. I believe it is easy to check with Quarto

Mine for example

$ echo $WSL_DISTRO_NAME
Ubuntu-20.04

otherwise standard Linux check I guess

  • looking (greping) into system files /proc/sys/kernel/osrelease for WSL or microsoft
$ cat /proc/sys/kernel/osrelease
5.10.102.1-microsoft-standard-WSL2
  • running uname
$ 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

If so, then do you think you could add an error message in case we try to quarto install chromium under WSL?

Sure. Do we want to error saying that installing chromium on WSL require some external dependencies and that should be installed manually as quarto install chromium won't do it ?

This is the official doc for this we could link to: https://pptr.dev/next/troubleshooting#running-puppeteer-on-wsl-windows-subsystem-for-linux

If not, then we need to fix this in our documentation by adding appropriate warnings to quarto-web in the case of pupetteer and WSL.

I think this still applies to document, or link to where we want. Possible having a link to quarto-web from our error message.

@cscheid
Copy link
Collaborator Author

cscheid commented Feb 28, 2023

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.

@cscheid cscheid removed their assignment Feb 28, 2023
@cderv cderv removed the needs-discussion Issues that require a team-wide discussion before proceeding further label Mar 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants