ERROR: app.R did not return a shiny.appobj object.

3,920 views
Skip to first unread message

Luck Buttered

unread,
Nov 1, 2016, 4:57:50 PM11/1/16
to Shiny - Web Framework for R
I have an app.R file. It contains the general structure as follows:

ui <- fluidPage()
server <- function(input, output)
shinyApp(ui, server)

I placed the app.R file inside a directory called "App".

Then, I issue the command:

runApp("App")

However, I do not see a functioning app. Instead, I receive the error:

ERROR: app.R did not return a shiny.appobj object.


When I searched for this error online, I only found one piece of advise to follow the rules denoted on the following help site:


http://shiny.rstudio.com/articles/single-file.html


I believe I am following those rules, and so I am a bit stuck on what I should consider next. If anyone has any advice they can offer, I would be grateful!

Joe Cheng

unread,
Nov 1, 2016, 5:01:55 PM11/1/16
to Luck Buttered, Shiny - Web Framework for R
Does your server function really not have curly braces? Because that would cause the shinyApp() call on there next line to be treated as the function body of server, rather than its own top level expression.
--
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/3e956b44-0490-4319-99fa-67e50446d5d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Austin Hart

unread,
May 3, 2017, 12:33:58 PM5/3/17
to Shiny - Web Framework for R

I think I am a little late to the call, but this happened to me today. I resolved the problem by setting my working directory to the folder that contains my app. 
Reply all
Reply to author
Forward
0 new messages