In my Shiny App, I have a Data.table implemented through the package data.table.
My Shiny app working absolutely fine on the local Server, however when I deployed it to Digital-ocean, I frequently get error as below :
DataTables warning: table id=DataTables_Table_1 - Ajax error. For more information about this error, please see http://datatables.net/tn/7
It is not that, I get this error every time, however quite frequently, and failed to repeat my experiment to regenerate that error. Appear like, this error comes up randomly?
I searched over the Internet, however, failed to get any concrete suggestion how to circumvent this problem arising on the Shiny application.
Any help will be highly appreciated.
Thanks,
Since you claim you deploy the shiny app on DigitalOcean and the app works well locally, I suspect the DT version on your server is not the latest.
You can check the version of DT by adding something like outputText("dt_version") to ui.R and output$dt_version <- renderText(packageVersion("DT")) to server.R.
If not, please install the developing version of DT via devtools::install_github('rstudio/DT') and try again (I bet you are using shiny-server, please remember to restart the server to ensure the newly installed package being loaded).
Related
I am not able to able to authorize Google Sheet using Rstudio Server. I have tried all the possible ways available on google but it didn't work.
I'm using below code.
library(googlesheets4)
gs4_auth()
# options(httr_oob_default=TRUE)
#gs4_deauth()
write_sheet(MyDF, "10XhCF-MmXw8gfIn4P0xg45MlIjna4YSfeq2I00gNhrt", sheet = 'Sheet1')
I have tried the same code in offline R by installing R on local machine it is working completely fine, but it doesn't work on R server.
I have tried all different browsers, but getting the below-mentioned error
I suspect that this is because you are loading both googlesheets and googlesheets4 in one session. Please try following steps:
Start a new environment on the server
Load only googlesheets4 then call gs4_auth() again.
If the error persist. Please tryto clean up the ~/.cache/gargle folder which store the last authorization process and try again.
Update
Please try clear up the cache and follow the step
Here is what happen on my server:
I have been trying to deploy my shiny app to shinyapps.io but I just can't seem to figure it out. Everything works fine locally but not when I try to deploy. I keep getting the following error: The application failed to start (exited with code 137). I checked my logs and it says that I am out of memory.
See below:
All my packages get loaded and then once it comes to my data it stops and says that.. When I look at the metrics and go to the memory usage section it says I'm using less then 25 MB. My instance size is set to large (1GB). I don't understand why it's saying I'm running out of memory. I would appreciate if anybody can give me guidance or tell me something that I may be missing.
Shiny application needs resident memory. I guess because of connecting cloud service. I can't tell you one thing, but there are some things that are typically consume. R interpreter can feel heavy and Shiny throws in another 10 MB just loading the library. I think it's helpful to you. shiny homepage about performance
I am new to using Shiny and creating Shiny Apps. I am currently running the latest versions of R and the latest version of the Shiny App and the latest version of RStudio on Windows.
I'm experiencing severe problems using the "bookMark" feature that R claims works. There was even a more than half hour long video from the 2017 either RStudio or Shiny conference with an R engineer gushing over the wonderful addition of the bookMark feature and the bookMark feature doesn't work.
I am able to click the button and copy the link and I'm bookMarking to the server. But when I paste the link into the browser I'm always getting the error following error and it DOES NOT RENDER the PAGE in the SAME STATE that I "Bookmarked" it. It just does not work:
ERROR: [on_request_read] connection reset by peer
I'm using Google Chrome as my browser:
Here is the code that it appears to be producing the error on:
output$plot1 <- renderPlot({
data <- histdata[seq_len(input$slider)]
hist(data)
I have NO idea why I'm getting an error on something that's just supposed to work out of the box as is. The software is supposed to save the state of the slider and put it back to its state that was supposed to be saved when I clicked bookMark. It doesn't work. I'm not too optimistic that anyone will answer my question with an actual solution. I did extensive searches before I submitted this question and people have been having this problem for months if not years.
ERROR: [on_request_read] connection reset by peer
Hopefully someone out there knows a solution to this problem.
Thanks.
B.B.
From here
"If you're running Shiny 0.8.0 or later, try running this before calling runApp()":
options(shiny.error=recover)
"Or, if you're using the latest version of RStudio, this is even better:"
options(shiny.error=browser)
The shinyapp I built earlier was running fine in my old laptop. Recently I got a new laptop with Windows10. After setting up everything, I tried to run the app but it the browser opens and closes immediately with the error :
Listening on http://127.0.0.1:5004
ERROR: [on_request_read] connection reset by peer
I have also set chrome as default browser....
I deployed this app in shinyapps.io it is working fine there.
I tried few more simple apps in Rstudio but the same issue coming. Looks like the issue is more related to some setting in Windows10. Can someone help me please.
Thanks in Advance.....
Without details on the specific code, I'd share my personal experience with the same error for your reference. In my case, I used RStudio to create a shiny app that save data to a local directory on my computer, while I told R to output files to directory "response", I hadn't created such directory under the working directory so came the error. Simply creating the sub directory named "response" solve this right away. Or for moving your project files to different places in the future, you can just check whether the folder exists, if not, create one shall save you a lot of time.
I am working on the Shiny tutorial for RStudio. I updated my RStudio, as indicated in the tutorial. The current version I have is 0.98.945. When I run the supplied examples like runExample("01_hello"), it opens my web browser and shows all the HTML content, but does not seem to be processing the R code.
When I proceed further in the tutorial for creating my own app runApp("App-1"), I get an error message on the web page: ERROR: could not find function "fluidPage". After some sleuthing, I found a posting on another site indicating that I need to download the developer version of shiny from GitHub, found here. I ran the code snippet for that installation -- and still no luck. Any suggestions would be greatly appreciated!
After updating Rstudio to the newest version redo the install.packages("shiny") and library("shiny"). Once you do this it should eliminate the need to manually do the runApp code and a button should appear were the run button usually is that says run app. before you can click run app though you have to set your working directory to the location were you have saved your server.R and ui.R by going to session -> set working directory -> choose directory. chose the folder location then click run app.
Edit: there should be no need for you to run that code from GitHub
I had the same problem. After installing shiny, I had to restart Rstuido for the "Run App" button to appear.
I had also some wired troubles when starting using shiny. Finally I got all fixed by removing all my previous libraries and installations and re-install only the latest versions