My ShinyApp runs in RStudio but fails as a ShinyApp

61 views
Skip to first unread message

Dan Hong

unread,
Nov 7, 2014, 2:24:15 PM11/7/14
to shinyap...@googlegroups.com
I'm having an issue that I can't debug and was hoping someone here can help. My Iris app is a simple ShinyApp for making a prediction about the iris class based on user-inputted petal length and width. To do this, the app uses the built-in iris dataset as well as caret and rattle libraries. It runs fine on my computer and seems to deploy successfully to ShinyApps.io, but when I go to the app's webpage, I get an error message saying that "The application unexpectedly exited. Diagnostic information has been dumped to the JavaScript error console."

My ShinyApp is at: https://dnaeye.shinyapps.io/iris/

Copy of the code is at: https://github.com/dnaeye/iris


Tareef Kawaf

unread,
Nov 7, 2014, 2:31:21 PM11/7/14
to Dan Hong, shinyap...@googlegroups.com
Dan,
Could you take a look at the JavaScript console and send us the error you are seeing there?
Also, if you could send us a link to your application and the output of shinyapps::showLogs() we would appreciate it.
-Tareef

--
You received this message because you are subscribed to the Google Groups "ShinyApps Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shinyapps-use...@googlegroups.com.
To post to this group, send email to shinyap...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/shinyapps-users/0d50b6b7-2698-467c-a38d-7ca6938c01fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Dan Hong

unread,
Nov 7, 2014, 2:54:19 PM11/7/14
to Tareef Kawaf, shinyap...@googlegroups.com
From Firefox's Web Console:

"
Loading required package: lattice
Loading required package: ggplot2
Rattle: A free graphical interface for data mining with R.
Version 3.3.0 Copyright (c) 2006-2014 Togaware Pty Ltd.
Type 'rattle()' to shake, rattle, and roll your data.
Error in checkInstall(models$library) : 
"

When I tried running the showLogs function (shinyapps::showLogs()), I got the following error message:

Error: 'showLogs' is not an exported object from 'namespace:shinyapps'

Andy Kipp

unread,
Nov 11, 2014, 10:33:49 AM11/11/14
to Dan Hong, Tareef Kawaf, shinyap...@googlegroups.com
Dan,

Can you update your version of shinyapps package and run showLogs()?

devtools::install_github('rstudio/shinyapps')

-Andy

Dan Hong

unread,
Nov 11, 2014, 7:19:43 PM11/11/14
to Andy Kipp, Tareef Kawaf, shinyap...@googlegroups.com
Hi Andy,

I've updated shinyapps with the command you gave me, and now the showLogs() command brings up:

2014-11-12T00:00:28.309493+00:00 shinyapps[shuttle]: 1 package is needed for this model and is not installed. (rpart). Would you like to try to install it now?Error in checkInstall(models$library) : 
2014-11-12T00:02:57.863311+00:00 shinyapps[shuttle]: R version: 3.0.2
2014-11-12T00:02:57.864483+00:00 shinyapps[shuttle]: rmarkdown version: 0.0.0
2014-11-12T00:02:57.863375+00:00 shinyapps[shuttle]: Shiny version: 0.10.1
2014-11-12T00:02:57.864904+00:00 shinyapps[shuttle]: knitr version: 0.0.0
2014-11-12T00:02:58.203928+00:00 shinyapps[shuttle]: 
2014-11-12T00:02:58.203933+00:00 shinyapps[shuttle]: Starting Shiny with process ID: '33'
2014-11-12T00:02:58.216797+00:00 shinyapps[shuttle]: 
2014-11-12T00:02:58.216799+00:00 shinyapps[shuttle]: Listening on http://0.0.0.0:37889
2014-11-12T00:02:59.776067+00:00 shinyapps[shuttle]: Loading required package: lattice
2014-11-12T00:02:59.835161+00:00 shinyapps[shuttle]: Loading required package: ggplot2
2014-11-12T00:03:02.507103+00:00 shinyapps[shuttle]: Rattle: A free graphical interface for data mining with R.
2014-11-12T00:03:02.507108+00:00 shinyapps[shuttle]: Version 3.3.0 Copyright (c) 2006-2014 Togaware Pty Ltd.
2014-11-12T00:03:02.507109+00:00 shinyapps[shuttle]: Type 'rattle()' to shake, rattle, and roll your data.
2014-11-12T00:03:02.658158+00:00 shinyapps[shuttle]: 1 package is needed for this model and is not installed. (rpart). Would you like to try to install it now?Error in checkInstall(models$library) : 
2014-11-12T00:06:06.853231+00:00 shinyapps[shuttle]: R version: 3.0.2
2014-11-12T00:06:06.855078+00:00 shinyapps[shuttle]: rmarkdown version: 0.0.0
2014-11-12T00:06:06.853307+00:00 shinyapps[shuttle]: Shiny version: 0.10.1
2014-11-12T00:06:06.855805+00:00 shinyapps[shuttle]: knitr version: 0.0.0
2014-11-12T00:06:07.245558+00:00 shinyapps[shuttle]: 
2014-11-12T00:06:07.245564+00:00 shinyapps[shuttle]: Starting Shiny with process ID: '12'
2014-11-12T00:06:07.264408+00:00 shinyapps[shuttle]: 
2014-11-12T00:06:07.264410+00:00 shinyapps[shuttle]: Listening on http://0.0.0.0:41583
2014-11-12T00:06:13.587584+00:00 shinyapps[shuttle]: Loading required package: lattice
2014-11-12T00:06:13.651091+00:00 shinyapps[shuttle]: Loading required package: ggplot2
2014-11-12T00:06:16.470639+00:00 shinyapps[shuttle]: Rattle: A free graphical interface for data mining with R.
2014-11-12T00:06:16.470644+00:00 shinyapps[shuttle]: Version 3.3.0 Copyright (c) 2006-2014 Togaware Pty Ltd.
2014-11-12T00:06:16.470645+00:00 shinyapps[shuttle]: Type 'rattle()' to shake, rattle, and roll your data.
2014-11-12T00:06:16.624444+00:00 shinyapps[shuttle]: 1 package is needed for this model and is not installed. (rpart). Would you like to try to install it now?Error in checkInstall(models$library) : 
2014-11-12T00:14:24.044334+00:00 shinyapps[shuttle]: R version: 3.0.2
2014-11-12T00:14:24.045714+00:00 shinyapps[shuttle]: rmarkdown version: 0.0.0
2014-11-12T00:14:24.044403+00:00 shinyapps[shuttle]: Shiny version: 0.10.1
2014-11-12T00:14:24.046263+00:00 shinyapps[shuttle]: knitr version: 0.0.0
2014-11-12T00:14:24.395679+00:00 shinyapps[shuttle]: 
2014-11-12T00:14:24.395685+00:00 shinyapps[shuttle]: Starting Shiny with process ID: '12'
2014-11-12T00:14:24.408747+00:00 shinyapps[shuttle]: 
2014-11-12T00:14:24.408750+00:00 shinyapps[shuttle]: Listening on http://0.0.0.0:56428
2014-11-12T00:14:30.560127+00:00 shinyapps[shuttle]: R version: 3.0.2
2014-11-12T00:14:30.561408+00:00 shinyapps[shuttle]: rmarkdown version: 0.0.0
2014-11-12T00:14:30.560175+00:00 shinyapps[shuttle]: Shiny version: 0.10.1
2014-11-12T00:14:30.561869+00:00 shinyapps[shuttle]: knitr version: 0.0.0
2014-11-12T00:14:30.942797+00:00 shinyapps[shuttle]: 
2014-11-12T00:14:30.942802+00:00 shinyapps[shuttle]: Starting Shiny with process ID: '25'
2014-11-12T00:14:30.955730+00:00 shinyapps[shuttle]: 
2014-11-12T00:14:30.955732+00:00 shinyapps[shuttle]: Listening on http://0.0.0.0:49995
2014-11-12T00:14:32.841629+00:00 shinyapps[shuttle]: Loading required package: lattice
2014-11-12T00:14:32.907499+00:00 shinyapps[shuttle]: Loading required package: ggplot2
2014-11-12T00:14:35.554947+00:00 shinyapps[shuttle]: Rattle: A free graphical interface for data mining with R.
2014-11-12T00:14:35.554952+00:00 shinyapps[shuttle]: Version 3.3.0 Copyright (c) 2006-2014 Togaware Pty Ltd.
2014-11-12T00:14:35.554953+00:00 shinyapps[shuttle]: Type 'rattle()' to shake, rattle, and roll your data.
2014-11-12T00:14:35.706639+00:00 shinyapps[shuttle]: 1 package is needed for this model and is not installed. (rpart). Would you like to try to install it now?Error in checkInstall(models$library) :

It would seem like the rpart package hasn't been installed, but it is.


​
​

Tareef Kawaf

unread,
Nov 11, 2014, 9:13:02 PM11/11/14
to Dan Hong, Andy Kipp, shinyap...@googlegroups.com
Does the code have an explicit: library(rpart) in it?

If not, would you mind adding it appropriately and redeploying?

Dan Hong

unread,
Nov 11, 2014, 11:22:24 PM11/11/14
to Tareef Kawaf, Andy Kipp, shinyap...@googlegroups.com
That was the key. I had to explicitly call the related libraries rpart, e1071, and rpart.plot in the server.R file. Thanks, Tareef, Andy!
Reply all
Reply to author
Forward
0 new messages