rstudio / shinydashboard

Shiny Dashboarding framework
https://rstudio.github.io/shinydashboard/
Other
894 stars 298 forks source link

Warning: Error in exists: invalid first argument #160

Closed SenseMaster closed 8 years ago

SenseMaster commented 8 years ago

Bug appears when I running my app on AWS with:

R version 3.3.1 (2016-06-21) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.1 LTS

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8
[6] LC_MESSAGES=en_US.UTF-8 LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] shinydashboard_0.5.2 shinyjs_0.7 shiny_0.14

loaded via a namespace (and not attached): [1] R6_2.1.3 htmltools_0.3.5 tools_3.3.1 Rcpp_0.12.7 jsonlite_1.1 digest_0.6.10 xtable_1.8-2 httpuv_1.3.3 miniUI_0.1.1
[10] mime_0.5

How to reproduce:

  1. Create ui.R with this content (https://rstudio.github.io/shinydashboard/structure.html#dynamic-content-1):

library(shiny) library(shinydashboard) shinyUI(dashboardPage( dashboardHeader(title = "Dynamic sidebar"), dashboardSidebar( sidebarMenuOutput("menu") ), dashboardBody() ) )

  1. Create server.R with this content (https://rstudio.github.io/shinydashboard/structure.html#dynamic-content-1):

library(shiny) library(shinyjs) library(shinydashboard) shinyServer(function(input, output, session) { output$menu = renderMenu({ sidebarMenu( menuItem("Menu item", icon = icon("calendar")) ) }) } )

  1. Create new script with runApp() function with a correct way to the app.
  2. Run the app from the rstudio-server environment. (permissions to project files 777)

See the error:

Listening on http://127.0.0.1:3339 Warning: Error in exists: invalid first argument Stack trace (innermost first): 84: exists 83: self$exists 82: oldInputs$available 81: shiny::restoreInput 80: sidebarMenu 79: renderMenu [/home/rstudio/test/server.R#7] 78: func 77: origRenderFunc 76: output$menu 1: runApp

If I run app directly from server ( \srv\test ) then image image

wch commented 8 years ago

Sorry about that. I've just fixed it. You can install the development version with:

if (!requireNamespace('devtools'))
  install.packages('devtools')
devtools::install_github('rstudio/shinydashboard')

I'll try to release an updated version of shinydashboard to CRAN shortly.

wch commented 8 years ago

This is related to rstudio/shiny#1382.

wch commented 8 years ago

The new version is on CRAN now, though it will take some time for it to propagate to mirrors, and for various binary packages to be built.

SenseMaster commented 8 years ago

Thank you!