Open niklz opened 10 months ago
Error in force(expr) : Failed to generate output in 30 seconds (timeout).
About this, did you try to increase the timeout already ?
Error in force(expr) : Failed to generate output in 30 seconds (timeout).
About this, did you try to increase the timeout already ?
Yes, I tried increasing the timeout to no avail. Also, if you remove the inline maths (by deleting the $
symbols in the .qmd) chrome_print()
works flawlessly and very quickly.
Thanks for the report. I'll try to have a look into this. It seems related to how mathjax is loaded then... something seems to hang the page load and the expected websocket message is not sent. This is not easy to debug.
In the meantime you could try another chrome R package (like chromote or crrri) that could communicate with chrome, but I suspected it will be the same error. Changing the HTML math method for the format may be the best workaround for now.
I'd suggest that you try katex
instead of the default mathjax: https://quarto.org/docs/output-formats/html-basics.html#latex-equations katex
is often a lot faster in rendering math expressions.
I'd suggest that you try
katex
instead of the default mathjax: https://quarto.org/docs/output-formats/html-basics.html#latex-equationskatex
is often a lot faster in rendering math expressions.
I can confirm that using html-math-mathod: katex
in the html output options produces html with maths symbols which chrome_print()
can handle, thanks!
I can consider this issue closed, however I guess the bug with mathjax
is still at large
We'll keep that open to see how we could fix the issue with this Mathjax loading. I don't think this is a timing issue but rather something related to how it is loading, and the websocket process not intercepting and so hanging.
Hi,
I've been having issues using
chrome_print()
to produce a pdf from html that I have made from a Quarto document. Digging deeper I have found that it's due to the presence of maths symbols. I am not sure where in the document pipeline the failure is occurring, as the same document renders when using RMarkdown instead of Quarto.Here's a minimal example of what I'm doing:
Quarto doc:
This is a test with some inline maths. $x$ is a cool variable.
chrome_print( "test.html", output = "test.pdf", )
Error in force(expr) : Failed to generate output in 30 seconds (timeout). [2023-10-24 15:03:05] [error] handle_read_frame error: asio.system:10054 (An existing connection was forcibly closed by the remote host.)
Matrix products: default
locale: [1] LC_COLLATE=English_United Kingdom.utf8 LC_CTYPE=C LC_MONETARY=English_United Kingdom.utf8 [4] LC_NUMERIC=C LC_TIME=English_United Kingdom.utf8
attached base packages: [1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached): [1] Rcpp_1.0.11 pak_0.4.0 ps_1.7.5 later_1.3.1 digest_0.6.33 mime_0.12 R6_2.5.1
[8] jsonlite_1.8.7 magrittr_2.0.3 evaluate_0.22 rlang_1.1.1 cli_3.6.1 promises_1.2.0.1 rstudioapi_0.15.0 [15] rmarkdown_2.23 tools_4.2.3 servr_0.24 processx_3.8.2 httpuv_1.6.5 xfun_0.39 yaml_2.3.7
[22] fastmap_1.1.1 compiler_4.2.3 htmltools_0.5.6.1 websocket_1.4.1 pagedown_0.20 knitr_1.44