Not working after deployment to Shinyapp.io

2,069 views
Skip to first unread message

Tim S

unread,
Jul 28, 2015, 3:16:37 PM7/28/15
to Shiny - Web Framework for R
Dear Shinyapp gurus,

I couldn't figure it out why my app doesn't work after deployed to Shinyapp. The app is doing fine locally, but after publishing through Rstudio, the app become grey. only partial works but not the main function.  I didn't see any error message when publishing. I created the app use Rstudio Version 0.98.1102 in R3.2.1 on windows 7 machine.  here is the log for deployment .


The linter has identified potential problems in the project:

The following lines contain paths to files not matching in case sensitivity:
8: top30word <- as.data.frame(readRDS('top30word.RData'),stringAsFactors=F)    ["top30word.RData" -> "top30word.Rdata"]

The following lines contain paths to files not matching in case sensitivity:
12: top30word <- readRDS('top30word.RData')    ["top30word.RData" -> "top30word.Rdata"]

------------
shinyapp.Rmd
------------
The following lines contain absolute paths:
14: if(!getwd()=="C:/Users/songl/Dropbox/Coursera/capstone/shinyapp/")
15:   setwd("C:/Users/songl/Dropbox/Coursera/capstone/shinyapp/")

The following lines contain paths to files not matching in case sensitivity:
16: top30word <- as.data.frame(readRDS('top30word.RData'),stringAsFactors=F)    ["top30word.RData" -> "top30word.Rdata"]
72: top30word <- readRDS('top30word.RData')    ["top30word.RData" -> "top30word.Rdata"]

Filepaths are case-sensitive on ShinyApps.io.
Paths should be to files within the project directory.
If your application fails to run post-deployment, please double-check these messages.
Preparing to deploy application...DONE
Uploading application bundle...DONE
Deploying application: 52822...
Waiting for task: 60151158
  building: Parsing manifest
  building: Building image: 223510
  building: Installing packages
  building: Installing files
  building: Pushing image: 223510
  deploying: Starting instances
  rollforward: Activating new instances
  terminating: Stopping old instances
Application successfully deployed to https://songlh15.shinyapps.io/shinyappword

anyone give a hint?  Thanks in advance!
Tim

Andy Kipp

unread,
Jul 29, 2015, 9:13:32 AM7/29/15
to Tim S, Shiny - Web Framework for R
So it looks like there is a few warnings produced by the linter. Did investigate the cause for those warnings?

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shiny-discuss/6f6cab0c-d69b-40b7-bc5f-f77ea8422e0b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tim S

unread,
Jul 29, 2015, 1:18:28 PM7/29/15
to Shiny - Web Framework for R, an...@rstudio.com
thanks Andy!  After modified all those file name and absolute path, it still show grey. any hint per your experience?

Andy Kipp

unread,
Jul 29, 2015, 1:30:59 PM7/29/15
to Tim S, Shiny - Web Framework for R
Have you checked the output from


shinyapps::showLogs()?


-Andy

Tim S

unread,
Jul 29, 2015, 1:42:23 PM7/29/15
to Shiny - Web Framework for R, pon...@gmail.com
I tried but don't see response using shinyapps::showLogs() but I did see some error as following. NOt sure if that is the issue or if we can have a solution for that.

ERROR: [on_request_read] connection reset by peer

Tim S

unread,
Jul 29, 2015, 1:50:43 PM7/29/15
to Shiny - Web Framework for R
And the console give following messages.

Preparing to deploy application...DONE Uploading application bundle...DONE Deploying application: 52822...
Waiting for task: 60571283
  building: Building image: 224221
  building: Installing packages
  building: Installing files
  building: Pushing image: 224221
  deploying: Starting instances
  rollforward: Activating new instances
  terminating: Stopping old instances
Application successfully deployed to https://songlh15.shinyapps.io/shinyappword
ShinyApps deployment completed: https://songlh15.shinyapps.io/shinyappword

Andy Kipp

unread,
Jul 29, 2015, 2:07:40 PM7/29/15
to Tim S, Shiny - Web Framework for R
If you're publishing the app via the RStudio IDE publish button, you can also check the logs using rsconnect::showLogs(), or you can login to the shinyapps.io dashboard and look at the log output there.

The likely problem here is that your app is crashing because of an error in your code. You find the error you need to look the logs.

-Andy



--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.

Tim S

unread,
Jul 29, 2015, 2:45:31 PM7/29/15
to Shiny - Web Framework for R, pon...@gmail.com
Really appreciate your help!  I found the log says
Error in readChar(con, 5L, useBytes = TRUE) : cannot open the connection
2015-07-29T18:32:14.397652+00:00 shinyapps[53048]: Warning in run(timeoutMs) :
cannot open compressed file '../data/predict2hash.rda', probable reason 'No such file or directory'

However, the connection works fine in my local machine and that file is existing there.
could you shed light on which direction I should go to solve this issue? do I have to put the file under the shiny app directory?



On Tuesday, July 28, 2015 at 3:16:37 PM UTC-4, Tim S wrote:

Andy Kipp

unread,
Jul 29, 2015, 6:00:20 PM7/29/15
to Tim S, Shiny - Web Framework for R, pon...@gmail.com
Yes. Any file you need as part of your application need to be in the application directory or a subdirectory of the application for it to be uploaded. 

-Andy


Sent from Mailbox


--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.

Anjana Devi

unread,
Apr 10, 2018, 7:47:36 AM4/10/18
to Shiny - Web Framework for R



Dear Shinyapp gurus,

I couldn't figure it out why my app doesn't work after deployed to Shinyapp. The app is doing fine locally, but after publishing through Rstudio, the app become grey. only partial works but not the main function. i got "Paths should be to files within the project directory." error can any one give me the suggestion.
Thanks in Advance
Reply all
Reply to author
Forward
0 new messages