Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using renderMenu results in error 'could not find function "get_quosure"' #369

Closed
ismirsehregal opened this issue Sep 28, 2021 · 7 comments · Fixed by #370
Closed

Using renderMenu results in error 'could not find function "get_quosure"' #369

ismirsehregal opened this issue Sep 28, 2021 · 7 comments · Fixed by #370

Comments

@ismirsehregal
Copy link

ismirsehregal commented Sep 28, 2021

When running the ?renderMenu example from shinydashboard:

library(shiny)
library(shinydashboard)

ui <- dashboardPage(
  dashboardHeader(title = "Dynamic sidebar"),
  dashboardSidebar(
    sidebarMenuOutput("menu")
  ),
  dashboardBody()
)

server <- function(input, output) {
  output$menu <- renderMenu({
    sidebarMenu(
      menuItem("Menu item", icon = icon("calendar"))
    )
  })
}

shinyApp(ui, server)

I get the following error:

Listening on http://127.0.0.1:4923
Warning: Error in get_quosure: could not find function "get_quosure"
  51: renderMenu
  50: server [~/.active-rstudio-document#16]
Error in get_quosure(expr, env, quoted) : 
  could not find function "get_quosure"

> sessionInfo()
R version 4.1.1 (2021-08-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 10 x64 (build 19043)

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252 LC_NUMERIC=C                   
[5] LC_TIME=German_Germany.1252    

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

other attached packages:
[1] shinydashboard_0.7.1 shiny_1.7.0         

loaded via a namespace (and not attached):
 [1] tidyselect_1.1.1         xfun_0.26                bslib_0.3.0              shinyjs_2.0.0            purrr_0.3.4              colorspace_2.0-2        
 [7] vctrs_0.3.8              generics_0.1.0           htmltools_0.5.2          viridisLite_0.4.0        utf8_1.2.2               blob_1.2.2              
[13] plotly_4.9.4.1           rlang_0.4.11             jquerylib_0.1.4          later_1.3.0              pillar_1.6.3             glue_1.4.2              
[19] withr_2.4.2              DBI_1.1.1                bit64_4.0.5              lifecycle_1.0.1          munsell_0.5.0            gtable_0.3.0            
[25] fontawesome_0.2.2        htmlwidgets_1.5.4        evaluate_0.14            knitr_1.34               shinydashboardPlus_2.0.3 fastmap_1.1.0           
[31] httpuv_1.6.3             fansi_0.5.0              Rcpp_1.0.7               xtable_1.8-4             promises_1.2.0.1         scales_1.1.1            
[37] DT_0.19                  cachem_1.0.6             jsonlite_1.7.2           mime_0.11                fs_1.5.0                 bit_4.0.4               
[43] ggplot2_3.3.5            hms_1.1.1                digest_0.6.28            dplyr_1.0.7              RJSONIO_1.3-1.6          grid_4.1.1              
[49] tools_4.1.1              odbc_1.3.2               sass_0.4.0               magrittr_2.0.1           lazyeval_0.2.2           tibble_3.1.4            
[55] crayon_1.4.1             tidyr_1.1.3              pkgconfig_2.0.3          ellipsis_0.3.2           data.table_1.14.0        rstudioapi_0.13         
[61] rmarkdown_2.11           httr_1.4.2               RPostgres_1.3.3          R6_2.5.1                 compiler_4.1.1          
@DivadNojnarg
Copy link

Coming from here:

renderMenu <- shiny::renderUI

And maybe here:
updateTabItems <- shiny::updateTabsetPanel

@WayneGitShell
Copy link

Same issue for me. Have raised issue on rstudio/shiny#3514 - will close now as reported correctly here.

@wch
Copy link
Contributor

wch commented Sep 29, 2021

As a workaround, can you try installing shinydashboard from source?

install.packages("shinydashboard", type="source")

@WayneGitShell
Copy link

As a workaround, can you try installing shinydashboard from source?

install.packages("shinydashboard", type="source")

Tried it but didnt solve issue..

@wch
Copy link
Contributor

wch commented Sep 29, 2021

Just to be clear, in order for the workaround to work, you must have shiny 1.7.0 installed, and then install shinydashboard from source -- shinydashboard must be built against shiny 1.7.0. So something like this (in a clean R session) should ensure that it's built that way:

install.packages("shiny")
install.packages("shinydashboard", type="source")

Note that I was able to reproduce the bug, and then after installing the packages using the code above, the app worked.

@WayneGitShell

This comment has been minimized.

cpsievert added a commit that referenced this issue Sep 29, 2021
* Close #369: don't statically copy shiny::renderUI() at build time

* bye travis; hello gha

* bump version; update news

* change versioning
@wch
Copy link
Contributor

wch commented Sep 30, 2021

Update: the new version of shinydashboard (0.7.2) is on CRAN, although at the moment only the source package is available; it will take some time for them to build the binary packages for various platforms. https://cran.r-project.org/web/packages/shinydashboard/

For now, you can install the source package with:

install.packages('shinydashboard', type='source')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants