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

"Couldn't find open server" for diagram in pdf/docx #10573

Closed
floesche opened this issue Aug 21, 2024 · 17 comments · Fixed by #10627
Closed

"Couldn't find open server" for diagram in pdf/docx #10573

floesche opened this issue Aug 21, 2024 · 17 comments · Fixed by #10627
Labels
bug Something isn't working chromium
Milestone

Comments

@floesche
Copy link

Bug description

Documents that contain mermaid diagrams don't render for docx / pdf anymore, while the html output still works. This used to work fine until last week.

Maybe unrelated, but at the same time I started seeing this issue, I saw a second error about a missing xdg fileChooser. I solved this by installing additional packages, namely xdg-desktop-portal-termfilechooser. It was curious that both errors started showing up at the same time.

I tested this in quarto-1.6.5 and quarto-1.5.56 with similar results.

Steps to reproduce

This document.qmd produces an html output, but generates errors for docx or pdf formats

---
title: "Diagram"
---


# Example Diagram

Taken from <https://quarto.org/docs/authoring/diagrams.html>

```{mermaid}
flowchart LR
  A[Hard edge] --> B(Round edge)
  B --> C{Decision}
  C --> D[Result one]
  C --> E[Result two]
```

This works:

quarto render document.qmd --to html

This fails:

quarto render document.qmd --to docx

Expected behavior

I would expect a document.docx file.

Actual behavior

$ quarto render document.qmd --to docx                                                                                                                                                                                 
ERROR: Couldn't find open server.
Chrome process error: [11658:11658:0821/105721.048037:ERROR:system_network_context_manager.cc(863)] Cannot use V8 Proxy resolver in single process mode.
[11658:11658:0821/105721.086671:ERROR:system_network_context_manager.cc(863)] Cannot use V8 Proxy resolver in single process mode.
[11658:11658:0821/105721.092807:ERROR:system_network_context_manager.cc(863)] Cannot use V8 Proxy resolver in single process mode.

DevTools listening on ws://127.0.0.1:9222/devtools/browser/cdeed81a-4452-4f6a-baa3-10211c855b4c
[11658:11658:0821/105721.094959:ERROR:system_network_context_manager.cc(863)] Cannot use V8 Proxy resolver in single process mode.


Stack trace:
Chrome process error: [11658:11658:0821/105721.048037:ERROR:system_network_context_manager.cc(863)] Cannot use V8 Proxy resolver in single process mode.
[11658:11658:0821/105721.086671:ERROR:system_network_context_manager.cc(863)] Cannot use V8 Proxy resolver in single process mode.
[11658:11658:0821/105721.092807:ERROR:system_network_context_manager.cc(863)] Cannot use V8 Proxy resolver in single process mode.

DevTools listening on ws://127.0.0.1:9222/devtools/browser/cdeed81a-4452-4f6a-baa3-10211c855b4c
[11658:11658:0821/105721.094959:ERROR:system_network_context_manager.cc(863)] Cannot use V8 Proxy resolver in single process mode.

    at criClient (file:///opt/quarto/bin/quarto.js:39337:15)
    at eventLoopTick (ext:core/01_core.js:168:9)
    at async file:///opt/quarto/bin/quarto.js:39299:22
    at async Semaphore.runExclusive (file:///opt/quarto/bin/quarto.js:38976:29)
    at async Object.createPngsFromHtml (file:///opt/quarto/bin/quarto.js:39564:42)
    at async makePng (file:///opt/quarto/bin/quarto.js:75020:70)
    at async makeDefault (file:///opt/quarto/bin/quarto.js:75080:24)
    at async Object.cell (file:///opt/quarto/bin/quarto.js:75103:20)
    at async Promise.all (index 0)
    at async Object.document (file:///opt/quarto/bin/quarto.js:39859:25)

Your environment

  • Linux 6.10.6-2 SMP PREEMPT_DYNAMIC
  • sway (wayland)
  • arch derivative (cachyos)
  • Chromium Version 128.0.6613.36 (Official Build) Arch Linux (64-bit)
  • same result after running quarto install chromium with Chromium 869685
  • zsh shell
  • NVim editor

Quarto check output

$ quarto check
Quarto 1.6.5
[✓] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[✓] Checking versions of quarto dependencies......OK
[✓] Checking Quarto installation......OK
      Version: 1.6.5
      Path: /opt/quarto/bin

[✓] Checking tools....................OK
      TinyTeX: (not installed)
      Chromium: (not installed)

[✓] Checking LaTeX....................OK
      Using: Installation From Path
      Path: /usr/bin
      Version: undefined

[✓] Checking basic markdown render....OK

[✓] Checking Python 3 installation....OK
      Version: 3.12.5
      Path: /home/loeschef/xtmp/quarto-bug/.venv/bin/python3
      Jupyter: 5.7.2
      Kernels: python3

[✓] Checking Jupyter engine render....OK

[✓] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/
@floesche floesche added the bug Something isn't working label Aug 21, 2024
@cscheid
Copy link
Collaborator

cscheid commented Aug 21, 2024

Unfortunately, I don't think this is a Quarto bug. I suspect something changed in the way your Chrome installation works (or communicates with the window server).

@cscheid cscheid added chromium needs-repro Issues that are blocked until reporter provides an adequate reproduction labels Aug 21, 2024
@floesche
Copy link
Author

In case anyone else is having this issue: My workaround is to remove --single-process from the call to Chromium (e.g.

"--single-process",
).

At some point, --single-process was apparently not officially supported by chromium (https://issues.chromium.org/issues/40739741#comment6). I am not sure what the intention of the --single-process option in quarto is, but if it is to limit resources, --renderer-process-limit=1 (as suggested in https://superuser.com/a/1638197) seems to work fine for me after some initial testing.

@jleonard99
Copy link

I started getting a similar error this morning. Key features:

  • Quarto 1.5.55, and
  • Qmd file contain mermaid diagrams.
  • A _quarto.yml file contains format specs. Qmd is rendering to revealjs

This command fails (error below):

quarto render lecture-02.qmd

work around: This command works without errors

quarto render lecture-02.qmd --to revealjs

More details. This command:

quarto render lecture-02.qmd

takes a LONG time to complete, then finally drops this error:

Executing 'lecture-02.quarto_ipynb'
  Cell 1/4: 'setup'...Done
  Cell 2/4: ''........Done
  Cell 3/4: ''........Done
  Cell 4/4: ''........Done

ERROR: Couldn't find open server.
Chrome process error:

Stack trace:
Chrome process error:
    at criClient (file:///C:/Program%20Files/Quarto/bin/quarto.js:39317:15)
    at eventLoopTick (ext:core/01_core.js:153:7)
    at async file:///C:/Program%20Files/Quarto/bin/quarto.js:39279:22
    at async Semaphore.runExclusive (file:///C:/Program%20Files/Quarto/bin/quarto.js:38956:29)
    at async Object.createPngsFromHtml (file:///C:/Program%20Files/Quarto/bin/quarto.js:39544:42)
    at async makePng (file:///C:/Program%20Files/Quarto/bin/quarto.js:74827:70)
    at async Object.cell (file:///C:/Program%20Files/Quarto/bin/quarto.js:74894:20)
    at async Promise.all (index 0)
    at async Object.document (file:///C:/Program%20Files/Quarto/bin/quarto.js:39839:25)
    at async handleLanguageCells (file:///C:/Program%20Files/Quarto/bin/quarto.js:39809:42)

Here is the quarto check:

Quarto 1.5.55
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.41.0: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.5.55
      Path: C:\Program Files\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: v2024.01
      Chromium: 869685

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\jdleonard\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2023

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.12.2
      Path: C:/Users/jdleonard/AppData/Local/pypoetry/Cache/virtualenvs/cmsc408-course-admin-2w6zuzd0-py3.12/Scripts/python.exe
      Jupyter: 5.7.2
      Kernels: python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........(None)

      Unable to locate an installed version of R.
      Install R from https://cloud.r-project.org/

@cscheid cscheid added this to the v1.6 milestone Aug 26, 2024
@cscheid
Copy link
Collaborator

cscheid commented Aug 26, 2024

@jleonard99 We need a full example rather than a description of one. Can you create a minimal git repository from which quarto render triggers a problem for you and share it with us? Thank you.

@LJFRIESE
Copy link

LJFRIESE commented Aug 27, 2024

Hi @cscheid - I've put together a minimal repo:

https://github.com/LJFRIESE/mermaid_example

Preview will work, render will fail. Removing the docx format will let render succeed. Same if docx is replaced with pdf.

@cscheid cscheid removed the needs-repro Issues that are blocked until reporter provides an adequate reproduction label Aug 27, 2024
@cscheid
Copy link
Collaborator

cscheid commented Aug 27, 2024

I think this and #10626 are duplicates.

@floesche
Copy link
Author

Looks like this workaround is now implemented in #10627.

In case anyone else is having this issue: My workaround is to remove --single-process from the call to Chromium (e.g.

"--single-process",
).

At some point, --single-process was apparently not officially supported by chromium (https://issues.chromium.org/issues/40739741#comment6). I am not sure what the intention of the --single-process option in quarto is, but if it is to limit resources, --renderer-process-limit=1 (as suggested in https://superuser.com/a/1638197) seems to work fine for me after some initial testing.

floesche added a commit to floesche/quarto-cli that referenced this issue Aug 28, 2024
This would have caught the issues reported in quarto-dev#10573 and quarto-dev#10626. It should help identifying if similar issues arise through a change in the chromium cli arguments.
@gorf
Copy link

gorf commented Sep 12, 2024

I use 1.5.57 and 1.6.9 to render Documents that contain mermaid diagrams, still get this error.

@LJFRIESE
Copy link

+1, tested on 1.6.8 and got the same errors.

@cderv
Copy link
Collaborator

cderv commented Sep 12, 2024

@gorf @LJFRIESE could you check you chrome version ?

I can't reproduce this specific issue right now. I am using 128.0.6613.138.

Thanks

@javajon
Copy link

javajon commented Sep 19, 2024

I'm getting this same error PDF render with dot graphs with Quarto 1.6.10 and Chrome version 128.0.6613.138. (also tried forcing deno.exe to version 1.46.3). (On Windows 11)

$ quarto preview lecture-3.2.qmd --to pdf --no-browser --no-watch-inputs
⚠️  Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword.

    const resourceModule = (await import(toFileUrl2(resourcePath("editor/tools/yaml/yaml-intelligence-resources.json")).href, {

  at file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:82836:119

Unable to add system certificate to certificate store: InvalidCertificate(Other(OtherError(UnsupportedCriticalExtension)))
308203b33082029ba00302010202106ba0c33718d09a964d4a8056f6165f5d300d06092a864886f70d01010d0500304b312430220603550403131b52617a6572204368726f6d612053444b204c6f63616c2043657274310f300d060355040b13064368726f6d6131123010060355040a130952617a657220496e63301e170d3234303630323230343333385a170d3235303630323230343333385a304b312430220603550403131b52617a6572204368726f6d612053444b204c6f63616c2043657274310f300d060355040b13064368726f6d6131123010060355040a130952617a657220496e6330820122300d06092a864886f70d01010105000382010f003082010a0282010100c00f789d68b2d5c1bfefec5197a47d3db8cc9dcde82e21e50af5cf4acc42c639ce307146c8081e72b0473120aad3cbef5089a236b0cefc68745da9412a1f005743831d0d306a42d35ea65a4f97f39ed4a69841f5475fe84b9c0650890455febf212700f31403b17b47430dd250df1f7fbe9a12e99003dfd90149ea9a3417ada90c838d9dc340ea9313f4c8b441bdad09d61d1300f9a8905b2a9a3e85e1fe16b03a5fcda3bd60943dfdef979f265b82b30777a2c57a6150d443f36bb4c14becc7cf8235c2c294bdc7d441146aec8dd9fdeec5213ddb1465c538c40f1d8a8cb3bd6e9ecb1bc92ce5dd90be41a6558dcc39666305fb2b134689a3818bc08f2176f10203010001a3819230818f301d0603551d0e041604142a02d961b55f7a45665c2422932c4ad82d1e7563301f0603551d230418301680142a02d961b55f7a45665c2422932c4ad82d1e7563300f0603551d130101ff040530030101ff300e0603551d0f0101ff04040302010630140603551d040101ff040a3008300230000302020430160603551d250101ff040c300a06082b06010505070301300d06092a864886f70d01010d050003820101008962a7df487526d4aab8ed155426e69bacc96ebd03bff59a4902cf5731b47f5b37189af53e7fade75afe8d93bfe5401d3eea309113cff265a3165f34f5bb41ed746e74f9f5c014afa74548c710fa512156f553f6826374de534d465fac23008f05c1335cb252c43dad174c16df272816ed03c23a35459a03e9a6471b6ca0a37573dd666e49de6409c4cf5675b4e38ab21a29f27f2fd04fe67ed2312489a6ddfe92198cc08211272ccd02fef5d8a855341895f459ccb4fbd414f7473b07fe4ffa831383382282f3d3548b2cac25b2d700f18d5e1cd341f351e1b68e27737620006d0cb06f8632879c4d1470899adccd439a324a59591c33bfc5240981448a3e5f
ERROR: Couldn't find open server.
Chrome process error:

Stack trace:
Chrome process error:
    at criClient (file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:39348:15)
    at eventLoopTick (ext:core/01_core.js:175:7)
    at async file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:39310:22
    at async Semaphore.runExclusive (file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:38987:29)
    at async Object.createPngsFromHtml (file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:39575:42)
    at async Object.cell (file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:75468:49)     
    at async Promise.all (index 0)
    at async Object.document (file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:39870:25) 
    at async handleLanguageCells (file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:39840:42)
    at async file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:78701:51

$ quarto check
Quarto 1.6.10
[>] Checking versions of quarto binary dependencies...
      Pandoc version 3.2.0: OK
      Dart Sass version 1.70.0: OK
      Deno version 1.46.3: OK
      Typst version 0.11.0: OK
[>] Checking versions of quarto dependencies......OK
[>] Checking Quarto installation......OK
      Version: 1.6.10
      Path: C:\Users\jonat\AppData\Local\Programs\Quarto\bin
      CodePage: 1252

[>] Checking tools....................OK
      TinyTeX: v2023.10
      Chromium: 869685

[>] Checking LaTeX....................OK
      Using: TinyTex
      Path: C:\Users\jonat\AppData\Roaming\TinyTeX\bin\windows\
      Version: 2023

⚠️  Import assertions are deprecated. Use `with` keyword, instead of 'assert' keyword.

    const resourceModule = (await import(toFileUrl2(resourcePath("editor/tools/yaml/yaml-intelligence-resources.json")).href, {

  at file:///C:/Users/jonat/AppData/Local/Programs/Quarto/bin/quarto.js:82836:119

[>] Checking basic markdown render....OK

[>] Checking Python 3 installation....OK
      Version: 3.12.6
      Path: C:/Users/jonat/AppData/Local/Programs/Python/Python312/python.exe
      Jupyter: 5.7.1
      Kernels: python3

[>] Checking Jupyter engine render....OK

[>] Checking R installation...........OK
      Version: 4.2.3
      Path: C:/PROGRA~1/R/R-42~1.3
      LibPaths:
        - C:/Program Files/R/R-4.2.3/library
      knitr: 1.42
      rmarkdown: 2.21

[>] Checking Knitr engine render......OK

@cderv
Copy link
Collaborator

cderv commented Sep 19, 2024

@javajon please format correctly code in your issue post, this will make it easier to read.

(also tried forcing deno.exe to version 1.46.3)

An advice: Don't try to force a deno version to solve an issue. Not a good idea and can mess up more that it is.

Regarding the chrome issue, I can't reproduce on my side (windows 11) too, so this will be hard to debug

BTW chrome is now 129.0.6668.59 for me.

So there are some differences in environment somehow. I think we'll need to add more debug info to this error Chrome process error so that we can know more

@LJFRIESE
Copy link

LJFRIESE commented Sep 19, 2024

@gorf @LJFRIESE could you check you chrome version ?

I can't reproduce this specific issue right now. I am using 128.0.6613.138.

Thanks

128.0.6613.138 (Official Build) (64-bit)

Minor versions may have been different at the time of testing

@javajon

This comment was marked as off-topic.

@javajon

This comment was marked as off-topic.

@cscheid
Copy link
Collaborator

cscheid commented Sep 20, 2024

@javajon yes, that's an unrelated bug to this one.

@gorf
Copy link

gorf commented Sep 26, 2024

@gorf @LJFRIESE could you check you chrome version ?
I can't reproduce this specific issue right now. I am using 128.0.6613.138.
Thanks

128.0.6613.138 (Official Build) (64-bit)

Minor versions may have been different at the time of testing

I‘m the same.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working chromium
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants