1

When publishing my shiny code from Rstudio (windows), I get in the account name field '[object Object]' rather than my account name leading to the following error message:

Error: account named '[object Object]' does not exist

I tried several things but nothing seems to work. Note that I've the most recent versions of shinyapps and tried things such as to generate new tokens and etc.

Thanks,

Here is the code I am using:

ui.R

library(shiny)
library(shinyapps)

ui<- fluidPage(

titlePanel("Bidding Centre"),
  
#Sidebar with a slider input for number of bins
sidebarLayout(
  sidebarPanel(
    
    sliderInput(inputId = "bins",
                label = "Number of bins:",
                min = 1,
                max = 50,
                value = 30),
    
    textInput(inputId = 'title',
              label = 'Write a title',
              value = 'Try me!')),
  
# Show a plot of the generated distribution
  mainPanel(
    plotOutput("distPlot")
  )
)
  
)

server.R

library(shiny)

shinyServer(function(input, output) {

  output$distPlot <- renderPlot({

    # generate bins based on input$bins from ui.R
    x    <- faithful[, 2]
    bins <- seq(min(x), max(x), length.out = input$bins + 1)

    # draw the histogram with the specified number of bins
    hist(x, breaks = bins, col = 'darkgray', border = 'white',main=input$title) })
})
Community
  • 1
  • 1
Eduardo Barbaro
  • 411
  • 7
  • 17
  • Hi Eduardo, can you also post the code you are using to post to shinyapps. It looks as though the code you posted works when running out of RStudio, so it is hard to tell where the issue is – Chris Jul 09 '15 at 18:00
  • 1
    Seems to be a RStudio/Shiny publishing problem unrelated to the code. I'd start with restarting RStudio, the computer and also re-syncing with the shinyapps account. – Molx Jul 09 '15 at 18:23
  • Hi guys, I am running it using Rstudio. In doing so I just need to press "publish" and in principle it should work. The most weird thing is that it worked once. Later, without any modification it stopped working... resets or restarting does not help... – Eduardo Barbaro Jul 09 '15 at 20:26

1 Answers1

3

I encountered the same issue. I would click Run App, then 'Publish', but received the same error message:

Error: account named '[object Object]' does not exist

I was able to fix it by running the command manually:

shinyapps::deployApp('~/path/to/app')

Hope this helps!

Community
  • 1
  • 1