Where to place my R scripts in serv/shiny-server - r

I have uploaded my app scripts into srv/shiny-server as dashboard_test. But i am not able to run it. While looking into the error log I am receiving this.
Error getting worker: Error: The application exited during initialization.
Also One thing I noticed, the scripts for sample app is placed on opt/shiny-server/samples/sample-apps/hello. I tried putting there but i don't have the permission for that.Do i need to put them there as well? while,
I am following this article where it says "Any Shiny app directory that you place under /srv/shiny-server/ will be served as a Shiny app " it should work. https://deanattali.com/2015/05/09/setup-rstudio-shiny-server-digital-ocean/#user-libraries
I am trying to understand what is going wrong.
Please find the image here

Related

Was working on a R project and completed the code but then Im getting error , application could not start in shinyApp. RSTUDIO

FULL CODE FOUND AT
(https://www.writeurl.com/text/foupmfj7m1u3yzc01ozy/0x6kz2fgmoxrwzdnorwt/shym4opkyq1k5b0xi6ej) Uploading files and plotting selected variables | Use the following code to create a shiny app for uploading a file on a user's computer. When this code is deployed in shinyApp getting error stating application failed to start When I try to deploy the code in shiny app it is throwing an error -(https://alvinsamj.shinyapps.io/project-4/) The code contains problem statement that is commented in the code and self explaining. I got this as a part of a project but couldn't get a solution. This is the part i did !!`

Shinyapps.io application deployment failure. How to debug ambiguous error log?

I'm trying to deploy a shiny app that works locally to my shinyapps.io account. When I try to deploy the app, I get the following error message. I can confirm that I have no references to local working directories. I'm not really sure what this error log is telling me though. How should I interpret it? I have a hunch the problem results from the app's use of the RCurl library (I fixed a previous error resulting from this library), but I can't be sure.

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

while publishing app on web getting error called: check your log or contact the app auther.please find above image links
ERROR: An error has occurred. Check your logs or contact the app author for clarification.
if anyone can help me to resolve this error I'd be grateful.
There are multiple reasons for this error. Rstudio has provided multiple reasons (link below) but most common are:
Environment variables not the same in shiny web vs. local (make sure working directory is set to ~/, start a new rsession and run only the ui.R, server.R or app.R and see if you can preview in local before publishing.)
Update libraries to latest versions and hopefully you are not using the libraries that are not yet available in CRAN.
https://support.rstudio.com/hc/en-us/articles/229848967-Why-does-my-app-work-locally-but-not-on-shinyapps-io-

How to troubleshoot .app bundle not working

I have been making an application using Javafx, and have finished the project turning it into an application. However, when I try to run the application it immediatley crashes with know error messages, nothing is printed to the console. As a note, the .jar file runs if clicked. This has led me to believe that the problem is with my file structure namely the fact that their are 2 binary files in the Java folder.
Here is my .app packages contents:
A fix to my problem would be nice, however beyond that how should one go about debugging this sort of thing, I can not find any log messages, can it be done?
Edit: Nothing is printed when in terminal I use open -a ApplicationName and the application crashes. And here is my info.plist.

Shiny App Deployment - Error (cannot change working directory)

I have been trying to deploy a shiny app using rsconnect: deployapp(appname = "myapp"). I get the following message at the command prompt:
Application successfully deployed to https://sitename.shinyapps.io/MyApp/
However, when I launch the app, I get the error message:
ERROR: cannot change working directory
Based on resolution to similar problem on both Stackoverflow and googleforum, I tried using both absolute and relative paths in setwd(). Following are the error messages with both absolute and relative paths to setwd():
Error in setwd("~/Data/Projects/MyApp"): cannot change working directory
Error in setwd("C:/Users/Documents/Data/Projects/MyApp"): cannot change working directory
Any suggestions to resolve the issue would be greatly appreciated. thanks in advance!
shinyapps.io is a virtualized container service running shiny apps.
It is most likely linux based. I do not have the time to write up a
shiny app to confirm that but like most virtualized containers let
us assume it is.
With 1 being say true. Paths like C:/ do not make sense in the linux world.
Again with 1 in mind the directory structure of ~/Data might not exist.
Work with relative paths ~/ Also put a checkguard with dir.exists() and dir.create
dirname <- '~/Data/Projects/MyApp'
if (!dir.exists(dirname))dir.create(dirname,recursive=TRUE)
FYI I don't really think your should be doing any setwd() for shinyapps. If the data file is is in ~/Data/Projects/Myapp/somedata.csv you can do a direct read in the app as read.csv('somedata.csv').
The server directory structure is in the form of /srv/shiny-server/MyShinyApp when you upload
Error in setwd("c:/nonexistent_directory_path") : cannot change working directory
This error message will be generated when a directory does not exist. Verify that directory does in fact exist (ie: check spelling, typos).

Resources