Generated images not displaying for RMarkdown for Shiny Server on RHEL

My setup is similar to the issue posted here:

I am running Shiny Server using R 3.5.1 on CentOS 7.5. Furthermore, the same thing happens when I try to run RMarkdown with Shiny from RStudio Server 1.2 Preview.

The page loads, but the static ggplot2 image generated by the RMarkdown file shows up as a broken link in the page.

The log file shows the following warnings:

Warning in file.rename(from, to) :
  cannot rename file '/tmp/shinytidy/rmarkdown/ffd833b364179a334684ed3d731da33e/rmd_ffd833b364179a334684ed3d731da33e_files/figure-html' to '/tmp/shinytidy/rmarkdown/ffd833b364179a334684ed3d731da33e//tmp/shinytidy/rmarkdown/ffd833b364179a334684ed3d731da33e/rmd_ffd833b364179a334684ed3d731da33e_files/figure-html', reason 'No such file or directory'

I have found that changing output from html_notebook to html_document causes the image to properly render.

@wdkrnls Could you provide your code so that I may explore it some more?

It looks like there is a bad filepath being created. It's almost a concatenation of two paths together:

  • /tmp/shinytidy/rmarkdown/ffd833b364179a334684ed3d731da33e//tmp/shinytidy/rmarkdown/ffd833b364179a334684ed3d731da33e/rmd_ffd833b364179a334684ed3d731da33e_files/figure-html
  • /tmp/shinytidy/rmarkdown/ffd833b364179a334684ed3d731da33e/ + /tmp/shinytidy/rmarkdown/ffd833b364179a334684ed3d731da33e/rmd_ffd833b364179a334684ed3d731da33e_files/figure-html

This makes me want to believe it's an rmarkdown bug. It would be great to have a small set of code to reproduce this, especially if you can fix it by changing to html_document from html_notebook.

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.