riskassessment icon indicating copy to clipboard operation
riskassessment copied to clipboard

Fix report downloads for deployments on Posit Connect

Open Jeff-Thompson12 opened this issue 1 year ago • 4 comments

These downloads are only working locally and not on the deployed instances. We need users to be able to download in the PDF and DOCX formats when the application is deployed on Posit Connect, etc.

Jeff-Thompson12 avatar Nov 15 '23 12:11 Jeff-Thompson12

I have tested this extensively on my local system, shinyapps and RS Connect too.

In addition to the RS Connect, this issue is also present on deployed shinyapps app at https://rinpharma.shinyapps.io/riskassessment/

From the log messages, it seems that the program is not able to copy the template Word and pdf R Markdown files to the temporary directory location for parameterised render, and hence it fails.

Sample Error Message:

Warning in normalizePath(x, winslash = winslash, mustWork = must_work) :
path[1]="/opt/rstudio-connect/mnt/tmp/RtmpRhqxW6/reportDocx.Rmd": No such file or directory
Warning: Error in abs_path: The file '/opt/rstudio-connect/mnt/tmp/RtmpRhqxW6/reportDocx.Rmd' does not exist.

mayank-procogia avatar Nov 28 '23 13:11 mayank-procogia

Since releasing v3.1.0 on master, I've deployed this branch to an internal Posit Connect server and all the downloads are still not working, even though we did fix the Word & PDF issues with the new release.

For HTML & Word: No errors in logs

For PDF:

! LaTeX Error: File `ucharcat.sty' not found.
Warning: Error in : LaTeX failed to compile file2fbdb72cc02fec.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See file2fbdb72cc02fec.log for more info.

aclark02-arcus avatar Jul 03 '24 12:07 aclark02-arcus

This should not be a issue with the app itself. Most likely there is a LaTeX library that needs to be installed on the Posit Connect server.

jthompson-arcus avatar Jul 03 '24 16:07 jthompson-arcus

@mayank-procogia - do you see any issues with ProCogia's Posit Connect Deployment?

Since releasing v3.1.0 on master, I've deployed this branch to an internal Posit Connect server and all the downloads are still not working, even though we did fix the Word & PDF issues with the new release.

For HTML & Word: No errors in logs

Not sure why HTML & Word weren't working before. They seem to be working just fine now... and the deployment hasn't changed. So the only problem I'm still noticing is with PDF & the error message is consistent with the above. I'll make sure this is just a system dependency issue and hopefully close this out ASAP.

aclark02-arcus avatar Jul 16 '24 14:07 aclark02-arcus