Skip to content

"Shared input/output ID" error in a Shiny app #1984

Open
@jacciz

Description

@jacciz

Prework

Description

When using {gt}, I get errors in the browser saying:

  • Shared input/output ID was found - The following ID was used for more than one input/output: "demo_table": 1 input and 1 output
  • TypeError: Cannot read properties of undefined (reading 'get').

The shiny app still runs and renders the table. I installed v0.11.1 and this issue DID NOT exist.

Reproducible example

library(shiny)
library(gt)
ui <- fluidPage(
  gt_output("demo_table")
)

server <- function(input, output, session) {
  output$demo_table <- render_gt({
    mtcars |>
      head(10) |>
      gt()
  })
}

shinyApp(ui, server)

Expected result

No error. Table still renders.

Session info

R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows Server 2022 x64 (build 20348)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.utf8 LC_CTYPE=English_United States.utf8
[3] LC_MONETARY=English_United States.utf8 LC_NUMERIC=C
[5] LC_TIME=English_United States.utf8

time zone: America/New_York
tzcode source: internal

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

other attached packages:
[1] bslib_0.9.0 gt_1.0.0 shiny_1.10.0 devtools_2.4.5 usethis_3.1.0

loaded via a namespace (and not attached):
[1] jsonlite_2.0.0 miniUI_0.1.1.1 dplyr_1.1.4 compiler_4.4.1 promises_1.3.2
[6] tidyselect_1.2.1 Rcpp_1.0.14 xml2_1.3.6 jquerylib_0.1.4 later_1.4.2
[11] fastmap_1.2.0 mime_0.13 R6_2.6.1 generics_0.1.3 htmlwidgets_1.6.4
[16] tibble_3.2.1 profvis_0.4.0 pillar_1.10.2 rlang_1.1.4 cachem_1.1.0
[21] httpuv_1.6.16 sass_0.4.10 fs_1.6.6 pkgload_1.4.0 memoise_2.0.1
[26] cli_3.6.3 withr_3.0.2 magrittr_2.0.3 digest_0.6.37 rstudioapi_0.17.1
[31] xtable_1.8-4 remotes_2.5.0 lifecycle_1.0.4 vctrs_0.6.5 glue_1.8.0
[36] urlchecker_1.0.1 sessioninfo_1.2.3 rsconnect_1.3.4 pkgbuild_1.4.6 purrr_1.0.4
[41] tools_4.4.1 pkgconfig_2.0.3 ellipsis_0.3.2 htmltools_0.5.8.1

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions