Hi All,
I'm currently unable to render widgets created using the connectwidgets package in a shiny context when deployed on our connect instance. When running shiny locally, the widgets will render. When deployed on the connect server, the div is created, but appears empty (see attached photo). In the example included below, the information contained in the raw_content object can be displayed in shiny using renderTable, so the api call is functioning when deployed, but none of the shiny bindings for connectwidgets appear to function as expected.
We're running Posit Connect v2024.06.0 on RHEL 9.
Div as seen in Shiny deployment:
## Global File
library(connectwidgets)
library(tidyverse)
client <- connectwidgets::connect(
server = "serverAddress",
api_key = Sys.getenv("apiKey")
)
raw_content <- client %>%
content()
## UI File
library(shiny)
fluidPage(
rscgridOutput("grid")
)
## Server File
library(shiny)
function(input, output, session) {
output$grid<-renderRscgrid({
raw_content %>%
head(5)%>%
rsc_grid()
})
}
sessionInfo():
R version 4.4.1 (2024-06-14 ucrt)
Platform: x86_64-w64-mingw32/x64
Running under: Windows 11 x64 (build 22621)
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] lubridate_1.9.3 forcats_1.0.0 stringr_1.5.1 dplyr_1.1.4
[5] purrr_1.0.2 readr_2.1.5 tidyr_1.3.1 tibble_3.2.1
[9] ggplot2_3.5.1 tidyverse_2.0.0 connectwidgets_0.2.1 shiny_1.8.1.1
loaded via a namespace (and not attached):
[1] sass_0.4.9 utf8_1.2.4 generics_0.1.3 stringi_1.8.4 hms_1.1.3
[6] digest_0.6.36 magrittr_2.0.3 evaluate_0.24.0 grid_4.4.1 timechange_0.3.0
[11] fastmap_1.2.0 jsonlite_1.8.8 promises_1.3.0 httr_1.4.7 fansi_1.0.6
[16] crosstalk_1.2.1 scales_1.3.0 jquerylib_0.1.4 cli_3.6.3 rlang_1.1.4
[21] munsell_0.5.1 withr_3.0.0 reactR_0.6.0 cachem_1.1.0 yaml_2.3.9
[26] tools_4.4.1 tzdb_0.4.0 memoise_2.0.1 colorspace_2.1-0 httpuv_1.6.15
[31] curl_5.2.1 vctrs_0.6.5 R6_2.5.1 mime_0.12 lifecycle_1.0.4
[36] fs_1.6.4 htmlwidgets_1.6.4 pkgconfig_2.0.3 pillar_1.9.0 bslib_0.7.0
[41] later_1.3.2 gtable_0.3.5 rsconnect_1.3.1 glue_1.7.0 Rcpp_1.0.13
[46] xfun_0.46 tidyselect_1.2.1 knitr_1.48 rstudioapi_0.16.0 xtable_1.8-4
[51] htmltools_0.5.8.1 rmarkdown_2.27 compiler_4.4.1