You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ERROR: "No inspectable targets"-error when rendering PDF containing Mermaid diagram #4653
Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
Please format your issue so it is easier for us to read the bug report.
Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
Please document the operating system you're running. If on Linux, please provide the specific distribution.
After installing the 1.3.247 prerelease I still get the error when rendering a PDF (HTML works fine).
This time the error is more complex:
ERROR: No inspectable targets
Error: No inspectable targets
at defaultTarget (file:///C:/Users/20003963/AppData/Local/Programs/Quarto/bin/quarto.js:55313:23)
at Chrome._fetchDebuggerURL (file:///C:/Users/20003963/AppData/Local/Programs/Quarto/bin/quarto.js:55436:37)
at async Chrome._start (file:///C:/Users/20003963/AppData/Local/Programs/Quarto/bin/quarto.js:55392:25)
I'm using the latest version of Google Chrome (110.0.5481.178 (Official build) (64-bits))
I can reproduce with using Chrome browser from my system.
It works ok if I use chromium install with Quarto quarto install tools chromium - something must have changed with newest Chrome browser. I need to look into that.
Doc from the Zip to reproduce
---title: "TestDiagram"format: pdfeditor: visual---## Quarto```{mermaid}flowchart TD A[Christmas] -->|Get money| B(Go shopping) B --> C{Let me think} C -->|One| D[Laptop] C -->|Two| E[iPhone] C -->|Three| F[fa:fa-car Car]```
@cscheid I reopened as I think it should be solves for any Chrome browser. Or do you consider our internal chromium to be the solution and we keep it closed ?
Maybe we need to open a target if none exists (devtools.New()). FWIW, testing with chromium from quarto install, the targets to explore was about:blank
I can confirm this works now, with one small caveat ( that tripped me for a while). The required chromium triggers a "Chromium unexpectedly quit" menu on Mac. I guess this is a little process that runs, and then kills itself, but it triggers an ugly ( although, as I found out, inconsequential) message on Mac OSX Ventura.
Unfortunately, I can't seem to make the crash stop with Chromium on OS X Ventura.
So, we're changing the resolution order of browsers. If we find Google Chrome (for which the crash doesn't happen), then we use that directly, even if the user has installed Chromium.
We will still use Chromium if we don't find Google Chrome, but using Chromium will likely cause this crash.
Activity
cscheid commentedon Mar 6, 2023
Can you try with our 1.3 prereleases? I'm not on windows, but I can't reproduce the issue:
streepvaren commentedon Mar 6, 2023
Dear Carlos,
After installing the 1.3.247 prerelease I still get the error when rendering a PDF (HTML works fine).
This time the error is more complex:
I'm using the latest version of Google Chrome (110.0.5481.178 (Official build) (64-bits))
Best regards,
Thomas
cscheid commentedon Mar 6, 2023
@cderv will know the details, but there are issues with Windows and headless Chrome.
cderv commentedon Mar 6, 2023
I can reproduce with using Chrome browser from my system.
It works ok if I use
chromiuminstall with Quartoquarto install tools chromium- something must have changed with newest Chrome browser. I need to look into that.Doc from the Zip to reproduce
streepvaren commentedon Mar 6, 2023
Thank you very much for the quick help @cscheid and @cderv!
quarto install tools chromiumfixed the problem!Best regards,
Thomas
cderv commentedon Mar 6, 2023
@cscheid I reopened as I think it should be solves for any Chrome browser. Or do you consider our internal chromium to be the solution and we keep it closed ?
Here are some details on what is happening
We are retrieving the debugger url
quarto-cli/src/core/cri/deno-cri/chrome.js
Line 158 in e72f556
For that some targets are looked into , default being using
defaultTargetfunctionquarto-cli/src/core/cri/deno-cri/chrome.js
Line 74 in e72f556
For the default targets we are calling
quarto-cli/src/core/cri/deno-cri/chrome.js
Lines 210 to 211 in e72f556
which query
json/listendpoint, callingdefaultTarget()on it.I don't know yet why but with the Chrome browser version mentioned above, this will be empty
No targets to inspect.
This why code currently throw the error from
quarto-cli/src/core/cri/deno-cri/chrome.js
Lines 59 to 64 in e72f556
Maybe we need to open a target if none exists (
devtools.New()). FWIW, testing with chromium from quarto install, the targets to explore wasabout:blank@cscheid hope it helps you know what can be done. I'll look closer tomorrow about why we get this in Chrome now and maybe try the fix suggested above
I reproduce this also. We throw the error and then impossible to stop Quarto.
Create a new target for devtools if none if already available in open…
Fix no inspectable targets issue with Chrome Browser (#4696)
tomkom commentedon Mar 13, 2023
I can confirm this works now, with one small caveat ( that tripped me for a while). The required chromium triggers a "Chromium unexpectedly quit" menu on Mac. I guess this is a little process that runs, and then kills itself, but it triggers an ugly ( although, as I found out, inconsequential) message on Mac OSX Ventura.
cscheid commentedon Mar 13, 2023
@tomkom Oof, that's really no good. I'm on OSX Ventura as well and thought I had fixed this issue.
I'm no longer seeing the crash, but clearly the fix didn't stick.I take it back; I see the crash once again.cscheid commentedon Mar 14, 2023
Unfortunately, I can't seem to make the crash stop with Chromium on OS X Ventura.
So, we're changing the resolution order of browsers. If we find Google Chrome (for which the crash doesn't happen), then we use that directly, even if the user has installed Chromium.
We will still use Chromium if we don't find Google Chrome, but using Chromium will likely cause this crash.
rgayler commentedon Apr 2, 2023
I am getting the original problem "ERROR: No inspectable targets" rendering mermaid and dot diagram to PDF (HTML works OK).
Ubuntu 22.04.2
R 4.2.2
RStudio 2023.03-0 build 386
quarto 1.2.335
chrome installed
chromium installed
quarto install tools chromiuminstalledLet me know if there's something diagnostic I can do to get some more info on what's happening here.
Thanks.
cscheid commentedon Apr 2, 2023
You need to download and install a newer version of quarto.
rgayler commentedon Apr 2, 2023
Thanks @cscheid - that worked perfectly. I had misread the quarto version number and wrongly believed I was using the latest version.