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:
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")
)
)
)
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) })
})
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!