I have an application that works on a local R server (port 8787). When I move it to Shiny Server (port 3838), I receive the message
ERROR: An error has occurred. Check your logs or contact the app author for clarification.
And there is no log file present in /var/log/shiny-server.log
This is my configuration file:
# Instruct Shiny Server to run applications as local user
run_as : HOME_USER:;
# Define a server that listens on port 3838
server {
listen 3838;
#preserve_logs true;
# Define a location at the base URL
location / {
# Host the directory of Shiny Apps stored in this directory
site_dir /srv/shiny-server;
# Log all Shiny output to files in this directory
log_dir /var/log/shiny-server;
preserve_logs true;
# When a user visits the base URL rather than a particular application,
# an index of the applications available in this directory will be shown.
directory_index on;
}
}
Could someone check my configuration file? Thank you
Apparently sanitize error messages is true by default for my configuration.
Add
options(shiny.sanitize.errors = FALSE)
to your app.
In the configuration file, place
sanitize_errors false;
preserve_logs true;
within server to resolve permanently.