1
votes

I have a shiny app (divided into ui.R, server.R and helpers.R) which works on my local machine. The app does not load any libraries besides library(shiny). I am unable to deploy it to shinyapps.io. That is what I do

  1. I log myself into shinyapps.io (via the website www.shinyapps.io)
  2. I run library(rsconnect) on the R console.
  3. I copy the Tokens code (rsconnect::setAccountInfo...) from the www.shinyapps.io page into the R console and run it.
  4. I run the app in Rstudio (1 warning: Warning in body(fun) : argument is not a function). The app runs as expected.
  5. I use the "publish" button in the app window and get a new window saying: "R session aborted. R encountered a fatal error. The session was terminated"

Sorry, I have no idea about where to look for the error. Can you give me a hint what causes the problem? Which additional information would you need to help me?

Thanks a lot!

update: I just saw that there is a second "publish"-button in Rstudio if you have one of the app-files in the editor (without running it). When I use this one, I get the same crash, but with some more information: unexpected exception: boost::filesystem::unique_path: key is not valid in specified status (sorry, that is my own translation from German).

1
are you running it on a git directory? - LyzandeR
@LyzandeR No, I am uploading it from my local hard disk via Rstudio. - Joan C
@J_F do I understand the linked post correctly that it is normal to get the warning about body(fun)? And is there anything I have to do about it? Can this warning cause the fatal error when deploying the app? Sorry it's my first experience with an app and I have no experience with servers. - Joan C
My RStudio is also crashing since 3.4.0 but I do not know why. I updated t to the developer version of shiny and the warning disappears but my RStudio is still crashing. - J_F

1 Answers

2
votes

One way of deploying an app to the shinyapps.io server is not to use the button in RStudio, but to do it via the console. Here the steps that are working for me now (RStudio 1.0.143):

  1. Log in on shinyapps.io (via the website www.shinyapps.io)
  2. Run library(rsconnect) on the R console.
  3. Copy the Tokens code (rsconnect::setAccountInfo...) from the www.shinyapps.io page into the R console and run it.
  4. Run rsconnect::deployApp('path to your app') on the R console.

Pushing the publish button in RStudio still results in a crash of R.