Decoding Shiny Error Messages - Where is the app log file?

...First time deploying my own shiny-server running on a DigitalOcean VM. setup using these instructions: How to Set Up Shiny Server on Ubuntu 16.04 | DigitalOcean

Shiny-server runs successfully and the demo page works.

Loaded the files of an app that runs locally and receive this error:
ERROR: An error has occurred. Check your logs or contact the app author for clarification.

I read this

and this

and added this to try to get a more verbose error message to no avail
options(shiny.sanitize.errors = FALSE)

Where would I find the application error logs to give me more info?

Here are two references that have what you're looking for:

This support article:

And the Shiny Server Pro admin guide:
http://docs.rstudio.com/shiny-server/#logging-and-analytics

I think I'm still missing something fundamental. The directory /var/log/shiny-server is empty so no app log info. Yet the web page I visit that should host my app says: ERROR: An error has occurred. Check your logs or contact the app author for clarification.

UPDATE

I installer Shiny Server and verified that all the files run OK using RStudio from a web browser and pointing to these files in my personal directory.

I then modified /etc/shiny-server/shiny-server.conf so that Shiny Server sees these files:

#Host the directory of Shiny Apps stored in this directory
site_dir /home/law;

Yet still when I point my browser to that directory I get the error:
ERROR: An error has occurred. Check your logs or contact the app author for clarification.

AND there are no log files to be found in /var/log/shiny-server
Thoughts?

UPDATE 2

Got it working by reinstalling all packages as the user, shiny

1 Like

For me running shiny-server Shiny Server v1.5.9.923 (Node.js v8.11.3) on Ubuntu 16.04.6, I never get an app-specific log file when the app doesn't actually start up (instead, all that is shown in the browser is the error: ERROR: An error has occurred. Check your logs or contact the app author for clarification.). I only get a log file in /var/log/shiny-server/ if the app starts up and then there's an error (eg., if the app cannot handle the user's input). This makes debugging a huge pain.

Update: fixed by using preserve_logs true; in my /etc/shiny-server/shiny-server.conf file. I'm surprised that logs for apps that fail-on-start are automatically removed by default. That is definitely an instance where I would want the log kept by default.

1 Like