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
Your application may be dependent on packages that are installed and loaded in your environment, but aren't installed for the correct user on the Shiny Server. Make sure that all necessary packages are installed for the same user set under run_as in your Shiny Server configuration file.
Publish your Shiny App to RStudio ConnectAt the top of the editor, click Publish. In the Publish to Server window, confirm that your account is shown in the Publish To Account section and click Publish.
The server will load its configuration from a file stored at /etc/shiny-server/shiny-server.
Apparently sanitize error messages is true by default for my configuration.
Addoptions(shiny.sanitize.errors = FALSE)
to your app.
In the configuration file, place
sanitize_errors false;
preserve_logs true;
within server to resolve permanently.
Shiny also dumps errors and messages on the Console. You can access it by pressing Ctrl + Shift + J in your chrome or Opera browser.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With