when trying to deploy a shiny app to shinyapps I am using a private Github repo simonskok/IBSignals, but shinyapps has access to it with devtools::install_github("simonskok/IBSignals", auth_token = "****************************************") - everything works fine locally, but the app crashes online with exit error status 1). Below is the output of rsconnect::showLogs():
2022-07-20T16:52:57.099616+00:00 shinyapps[6668965]: Downloading GitHub repo simonskok/IBSignals@HEAD
2022-07-20T16:52:57.099539+00:00 shinyapps[6668965]:
2022-07-20T16:52:57.099484+00:00 shinyapps[6668965]: intersect, setdiff, setequal, union
2022-07-20T16:52:58.097913+00:00 shinyapps[6668965]: * checking for file â€/tmp/RtmppoTKYh/remotes1c677c892c/simonskok-IBSignals-d1b7cb6b452dd67b662ed9ce36cbc486c30ad815/DESCRIPTION’ ... OK
2022-07-20T16:52:58.097959+00:00 shinyapps[6668965]: * preparing â€IBOptionsSignals’:
2022-07-20T16:52:58.097846+00:00 shinyapps[6668965]:
2022-07-20T16:52:58.098005+00:00 shinyapps[6668965]: * checking DESCRIPTION meta-information ... OK
2022-07-20T16:52:58.098142+00:00 shinyapps[6668965]: Omitted â€LazyData’ from DESCRIPTION
2022-07-20T16:52:58.098099+00:00 shinyapps[6668965]: * checking for empty or unneeded directories
2022-07-20T16:52:58.098052+00:00 shinyapps[6668965]: * checking for LF line-endings in source and make files and shell scripts
2022-07-20T16:52:58.098228+00:00 shinyapps[6668965]: WARNING: Added dependency on R >= 3.5.0 because serialized objects in
2022-07-20T16:52:58.098269+00:00 shinyapps[6668965]: serialize/load version 3 cannot be read in older versions of R.
2022-07-20T16:52:58.098188+00:00 shinyapps[6668965]: NB: this package now depends on R (>= 3.5.0)
2022-07-20T16:52:58.098357+00:00 shinyapps[6668965]: â€IBOptionsSignals/inst/extdata/OANDA_Data/EU_Assets.RData’
2022-07-20T16:52:58.098316+00:00 shinyapps[6668965]: File(s) containing such objects:
2022-07-20T16:52:58.098392+00:00 shinyapps[6668965]: * building â€IBOptionsSignals_0.1.0.tar.gz’
2022-07-20T16:53:01.101200+00:00 shinyapps[6668965]:
2022-07-20T16:53:01.101259+00:00 shinyapps[6668965]: Warning in i.p(...) :
2022-07-20T16:53:01.101562+00:00 shinyapps[6668965]: Execution halted
2022-07-20T16:53:01.101607+00:00 shinyapps[6668965]: Shiny application exiting ...
2022-07-20T16:53:01.101359+00:00 shinyapps[6668965]: Error in value[3L] :
2022-07-20T16:53:01.101400+00:00 shinyapps[6668965]: Failed to install 'IBOptionsSignals' from GitHub:
2022-07-20T16:53:01.101454+00:00 shinyapps[6668965]: unable to install packages
2022-07-20T16:53:01.101511+00:00 shinyapps[6668965]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->
2022-07-20T16:53:01.101307+00:00 shinyapps[6668965]: 'lib = "/opt/R/4.1.2/lib/R/library"' is not writable
What does this mean or how can I correct that: 'lib = "/opt/R/4.1.2/lib/R/library"' is not writable?
Output of rsconnect::appDependencies() shows all other dependencies are from CRAN.
Thank you for your answer, it removes the error message, however the problem remains that it does load the package when opening the app, so I can not use the functions from it. What must I include in the call library(IBOptionsSignals), so that shinyapp will recognise the package location?
After following your suggestion the problem remains (Time_Since_US_Market_Open_Close is a function from my local package, the first one used in the shiny app)...below is a section of the output of rsconnect::showLogs()
2022-07-26T10:28:09.308324+00:00 shinyapps[6668965]: Shiny application starting ...
2022-07-26T10:28:09.308391+00:00 shinyapps[6668965]: could not find function "Time_Since_US_Market_Open_Close"
2022-07-26T10:28:09.308356+00:00 shinyapps[6668965]: Error in value[3L] :
2022-07-26T10:28:09.308425+00:00 shinyapps[6668965]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne ->
What else could I try to load the package at the start of the shinyapp?
is often caused by a input$something being NULL on session start and used in an if-statement - this usually can be avoided by placing req(input$something) above that if.