The app is disconnected after a second - r

I ran shiny app in linux.
I open the browser in the url: http://192.241.147.231:4949/sample-apps/MonitorUI/
The page is open but after a second disconnected.
I check the log file and it write to me this massage:
Error in eval(expr, envir, enclos) :
You are attempting to load an rmarkdown file, but the
rmarkdown package was not found in the library. Ensure that
rmarkdown is installed and is available in the Library of the
user you're running this application as.
Calls: local -> eval.parent -> eval -> eval -> eval -> eval
Execution halted
I already downloaded the "rmarkdown" package. and it updated.
What is the problem? i don't find anything for this problem in the web.
the sample app that given by shiny-server package:http://192.241.147.231:4949/sample-apps/hello/ is working so what is the problem?
Thanks.

Related

Write and Read keys in rEnvironment in Shiny

can someone help me with this?
Im setting up a map with maptiles by mapbox on shinyapps.io.
I saved the mapbox token in the rEnvironment. This command is not in the server-side of shiny and is run just once, when starting the script. Followed by readRenviron("~/.Renviron") to load all keys etc.
In the server-side before needed in leaflet I call Sys.getenv("MAPBOX_PUBLIC_TOKEN")
I get this error and the application shuts down
2022-11-28T08:26:09.047038+00:00 shinyapps[7740855]: A MAPBOX_PUBLIC_TOKEN already exists. You can overwrite it with the argument overwrite=TRUE 2022-11-28T08:26:09.047050+00:00 shinyapps[7740855]: Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous> 2022-11-28T08:26:09.047054+00:00 shinyapps[7740855]: Execution halted
Is it the wrong way around? I tried many different ways.

Error in enforcePackage(name, curVersion) : The shiny package was not found in the library

I'm trying to deploy a shiny app to shinyapps server. the app works just fine locally and when deploying using rsconnect::deployApp() I can see the message Application successfully deployed to in the console but actually on browser is not working and showing the following:
Error in enforcePackage(name, curVersion) : The shiny package was not found in the library. Calls: local ... eval -> eval -> eval -> <Anonymous> -> enforcePackage. Execution halted
Shiny package is loaded of course.
Also when trying to run rsconnect::appDependencies() the following error pop-up :
Error in [.data.frame(deps, , "Package") : undefined columns selected
Thank you all in advance for your help

Requested version of python cannot be used as another version has been initialized in shiny apps

Getting the error message
ERROR: The requested version of Python
('~/.virtualenvs/python_environment/bin/python') cannot be used, as
another version of Python ('/usr/bin/python3') has already been
initialized. Please restart the R session if you need to attach
reticulate to a different version of Python.
Error in value[[3L]](cond) :
failed to initialize requested version of Python
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
In addition: Warning message:
In py_initialize(config$python, config$libpython, config$pythonhome, :
'.Random.seed[1]' is not a valid integer, so ignored
Execution halted
When loading my web app on shiny apps. The app only loads after I refresh the web page
Here is part of my code:
library(shinyWidgets)
library(tidyverse)
library(reticulate)
library(DT)
library(data.table)
virtualenv_create(envname = "python_environment",python="python3")
virtualenv_install("python_environment", packages =c('pandas','catboost'))
use_virtualenv("python_environment",required = TRUE)
When you run library(reticulate), the reticulate package will try to initialize a version of Python, which may not be the version that you intend to use. To avoid this, (in a new R session) run your set-up commands without importing the full reticulate library with the :: syntax like this:
reticulate::virtualenv_create(envname = 'python_environment',
python= 'python3')
reticulate::virtualenv_install("python_environment",
packages=c('pandas','catboost'))
reticulate::use_virtualenv("python_environment",required = TRUE)

Shiny server not working after update to 1.5

I had a shiny app working using shiny-server 1.4.2.786 and after upgrading to 1.5.9.923 and I get the following error:
Error in if (nchar(bookmarkStateDir) > 0) { :
missing value where TRUE/FALSE needed
Calls: local -> eval.parent -> eval -> eval -> eval -> eval
Execution halted
If I roll back to 1.4.2.786, everything works as expected, therefore I don't think it's an issue with permissions or general shiny config files. Any idea what this is due to? I couldn't find any solutions online, however, I did read that 1.5 introduces big changes in Node.js, so perhaps this causes errors? Thanks!

Can't publish markdown to Rpub on Windows

After compile the R Markdown document with knitr package in html file, I tried to push to RPub with the "Publish" bottom. However, I am getting error as:
"Error in function (type, msg, asError = TRUE) :
SSL certificate problem: unable to get local issuer certificate
Calls: rpubsUpload ... -> .postForm -> .Call -> -> fun
Execution halted"
I am using windows RStudio Version 0.98.1091.I am assuming it is because windows to Rpub connection configuration issue.
First time using the Rpub. Could you help where to config the SSL certificate on windows? Thanks.
Under preferences in Rstudio, there is a tab "git/SVN".
Have you created an "RSA" key?
This can be done through github.
See https://help.github.com/articles/generating-ssh-keys/

Resources