pandoc-citeproc failing on LaTeX bookdown build: hPutBuf: resource vanished (Broken pipe)

Recently I've discovered that I'm unable to build a book on RStudio.cloud which builds fine on my Mac. On rstudio.cloud I get the following error when building the book to bookdown::pdf_book but not when building to bookdown::gitbook.

Error running filter /usr/lib/rstudio-server/bin/pandoc/pandoc-citeproc:
fd:12: hPutBuf: resource vanished (Broken pipe)
Error: pandoc document conversion failed with error 83
Execution halted

Exited with status 1.

Digging around online I find a few other instances of this error:

something to do with python3-pandocfilters:

possibly an issue with Pandoc package versions?

maybe need to downgrade citeproc?

anyone else find a workaround for this or know exactly how the rstudio.cloud team could fix this?

What versions for pandoc-citeproc do you get locally on your Mac and on RStudio cloud, respectively?

From the command line I get:

pandoc-citeproc --version
#> pandoc-citeproc 0.14.5

From RStudio terminal:

$ pandoc-citeproc --version
#> pandoc-citeproc 0.10.4

I'm curious if downgrading or upgrading would fix it. Do you have a dummy bookdown you can share? (Is it just a matter of switching the minimal bookdown demo from bookdown::gitbook to bookdown::pdf_book?

Good questions, @mara. On rstudio.cloud my version is:

rstudio-user@33abdf948834:/cloud/project$ /usr/lib/rstudio-server/bin/pandoc/pandoc-citeproc --version
pandoc-citeproc 0.14.3.1

On my mac, I get the same version:

$ /Applications/RStudio.app/Contents/MacOS/pandoc/pandoc-citeproc --version
pandoc-citeproc 0.14.3.1

So I'm at a loss... very weird. I'll see if I can make a minimal example later today.

1 Like

I'm trying it out on cloud with the bookdown demo. RMarkdown has pandoc_citeproc_convert() and pandoc_options(), so maybe there's a way to get it so that it's in the path for cloud.

Update I did get the bookdown demo to build here https://rstudio.cloud/project/109623 (open access, so you should be able to get in) It's possible it doesn't use pandoc-citeproc, in which case, I did absolutely nothing.

1 Like