No tinytex TeX bin on shinyapps.io

Hi everyone:

I'm trying to get a Rnw file compiled in a shiny app.
I have the app working on my local (windows) computer, but the application fails when pushed to shinyapps.io, and due to the font restrictions I need to use XeLaTeX and a few LaTeX packages.

My problem seems it has to do with the TeX installation on shinyapp.io.
Here's the shinyapps.io server log

2020-02-03T20:41:34.829479+00:00 shinyapps[1754038]: Server version: 1.7.8-7
2020-02-03T20:41:34.829480+00:00 shinyapps[1754038]: LANG: en_US.UTF-8
2020-02-03T20:41:34.829716+00:00 shinyapps[1754038]: Using pandoc at /opt/connect/ext/pandoc2
2020-02-03T20:41:34.829509+00:00 shinyapps[1754038]: shiny version: 1.4.0
2020-02-03T20:41:34.829508+00:00 shinyapps[1754038]: R version: 3.6.2
2020-02-03T20:41:34.984614+00:00 shinyapps[1754038]: 
2020-02-03T20:41:34.829510+00:00 shinyapps[1754038]: httpuv version: 1.5.2
2020-02-03T20:41:34.829510+00:00 shinyapps[1754038]: rmarkdown version: (none)
2020-02-03T20:41:34.829510+00:00 shinyapps[1754038]: knitr version: (none)
2020-02-03T20:41:34.829524+00:00 shinyapps[1754038]: jsonlite version: 1.6.1
2020-02-03T20:41:34.829530+00:00 shinyapps[1754038]: RJSONIO version: (none)
2020-02-03T20:41:34.829553+00:00 shinyapps[1754038]: htmltools version: 0.4.0
2020-02-03T20:41:34.976144+00:00 shinyapps[1754038]: Using jsonlite for JSON processing
2020-02-03T20:41:34.984615+00:00 shinyapps[1754038]: Starting R with process ID: '23'
2020-02-03T20:41:35.025135+00:00 shinyapps[1754038]: 
2020-02-03T20:41:35.025136+00:00 shinyapps[1754038]: Listening on http://127.0.0.1:46688
2020-02-03T20:41:50.420149+00:00 shinyapps[1754038]: LANG: en_US.UTF-8
2020-02-03T20:41:50.420147+00:00 shinyapps[1754038]: Server version: 1.7.8-7
2020-02-03T20:41:50.420186+00:00 shinyapps[1754038]: R version: 3.6.2
2020-02-03T20:41:50.420187+00:00 shinyapps[1754038]: shiny version: 1.4.0
2020-02-03T20:41:50.420188+00:00 shinyapps[1754038]: httpuv version: 1.5.2
2020-02-03T20:41:50.420188+00:00 shinyapps[1754038]: rmarkdown version: (none)
2020-02-03T20:41:50.420200+00:00 shinyapps[1754038]: knitr version: (none)
2020-02-03T20:41:50.420201+00:00 shinyapps[1754038]: jsonlite version: 1.6.1
2020-02-03T20:41:50.420210+00:00 shinyapps[1754038]: RJSONIO version: (none)
2020-02-03T20:41:50.420219+00:00 shinyapps[1754038]: htmltools version: 0.4.0
2020-02-03T20:41:50.571543+00:00 shinyapps[1754038]: Using jsonlite for JSON processing
2020-02-03T20:41:50.420370+00:00 shinyapps[1754038]: Using pandoc at /opt/connect/ext/pandoc2
2020-02-03T20:41:50.581048+00:00 shinyapps[1754038]: 
2020-02-03T20:41:50.581054+00:00 shinyapps[1754038]: Starting R with process ID: '41'
2020-02-03T20:41:50.620749+00:00 shinyapps[1754038]: Listening on http://127.0.0.1:45734
2020-02-03T20:41:50.620748+00:00 shinyapps[1754038]: 
2020-02-03T20:41:52.269053+00:00 shinyapps[1754038]: Warning: Error in root_dir: /usr/share/texlive does not seem to be the root directory of TeX Live (no "bin/" dir under it)
2020-02-03T20:41:52.284161+00:00 shinyapps[1754038]:   119: stop
2020-02-03T20:41:52.284162+00:00 shinyapps[1754038]:   118: root_dir
2020-02-03T20:41:52.284165+00:00 shinyapps[1754038]:   117: tinytex_root
2020-02-03T20:41:52.284166+00:00 shinyapps[1754038]:   113: tinytex:::is_tinytex
2020-02-03T20:41:52.284167+00:00 shinyapps[1754038]:   111: renderPrint [/srv/connect/apps/tinytex_shinyapps_example/app.R#15]
2020-02-03T20:41:52.284167+00:00 shinyapps[1754038]:   110: func
2020-02-03T20:41:52.284167+00:00 shinyapps[1754038]:    94: origRenderFunc
2020-02-03T20:41:52.284169+00:00 shinyapps[1754038]:    12: fn
2020-02-03T20:41:52.284168+00:00 shinyapps[1754038]:    93: output$is_tinytex
2020-02-03T20:41:52.284168+00:00 shinyapps[1754038]:    13: runApp
2020-02-03T20:41:52.284169+00:00 shinyapps[1754038]:     7: connect$retry
2020-02-03T20:41:52.284170+00:00 shinyapps[1754038]:     6: eval
2020-02-03T20:41:52.284170+00:00 shinyapps[1754038]:     5: eval

Here's the minimal shiny app example:

library(shiny)
library(tinytex)

ui <- fluidPage(
    verbatimTextOutput("is_tinytex")#,
    # verbatimTextOutput("tinytex_root")
)

server <- function(input, output) {
    output$is_tinytex <- renderPrint({
        print(tinytex:::is_tinytex())
    })
    
    # output$tinytex_root <- renderPrint({
    #     print(tinytex::tinytex_root())
    # })

}

shinyApp(ui = ui, server = server)

I don't get any errors during the deploy process

Preparing to deploy application...DONE
Uploading bundle for application: 1754038...DONE
Deploying bundle: 2772402 for application: 1754038 ...
Waiting for task: 688613417
  building: Parsing manifest
  building: Building image: 3048466
  building: Installing packages
  building: Installing files
  building: Pushing image: 3048466
  deploying: Starting instances
  rollforward: Activating new instances
  terminating: Stopping old instances
Application successfully deployed to https://chendaniely.shinyapps.io/tinytex_shinyapps_example/
Deployment completed: https://chendaniely.shinyapps.io/tinytex_shinyapps_example/

But when it launches the Shiny app all I see is this error message

An error has occurred. Check your logs or contact the app author for clarification.

It doesn't seem to be a problem with the tinytex R package itself, and I'm not trying to install an R package in the app (unable to deploy application in shiny apps IO),
is this from the LaTeX binaries on the shinyapps.io server itself?

tinytex is a package that will allow one to install Tex Live in the user's home directory.
Per the home page, you need to call tinytex::install_tinytex() in order for the installation to take place. After which calling tinytex:::is_tinytex() should report TRUE.

The exception when the installation has not occurred appears to have been recently fixed. If you reinstall the package from GitHub, you can try it out.

Hope that helps!