Issues with thematic after shiny update - plots not displayed, error with shiny::getCurrentOutputInfo()

Hello,

Since I updated shiny to the newest version (1.6) I'm having issues with the thematic package in shiny.
My plots no longer display and I see this error message:
"Error in FUN(X[[i]], ...) :
Expected shiny::getCurrentOutputInfo() to return reactive expressions. Try upgrading shiny: install.packages('shiny')
Warning: Error in FUN: Expected shiny::getCurrentOutputInfo() to return reactive expressions. Try upgrading shiny: install.packages('shiny')
185: stop
184: FUN
183: lapply
182: shiny_output_info
181: FUN
180: lapply
179: auto_resolve_theme
178: thematic_get_theme
176: ggplot_build.ggplot
174: print.ggplot
166: func
164: f
163: Reduce
154: do
153: hybrid_chain
125: drawPlot
111: reactive:plotObj
95: drawReactive
82: renderFunc
81: output$ggplot
1: runApp"

I have since updated all the packages and R and nothing seems to fix this problem... It's not to do with my code, because I also tried just copy-pasting code from examples online and the error still appears. The only fix is to not use thematic::thematic_shiny(), but this way my plots are not customized to the theme I set for my app.

Any idea what might be going on? Any help will be appreciated.

What version of thematic do you have? Have you installed it from CRAN install.packages('thematic')? If you're still having problems, please include the output of sessioninfo::session_info()

1 Like

Hi,

Unfortunately it's still not working. Here is the output of sessioninfo::session_info() :

setting value
version R version 4.0.4 (2021-02-15)
os Ubuntu 20.04.2 LTS
system x86_64, linux-gnu
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/Warsaw
date 2021-03-18

─ Packages ─────────────────────────────────────────────────────────────────────────────────────────────────────────────
package * version date lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 4.0.2)
bslib 0.2.4 2021-01-25 [1] CRAN (R 4.0.3)
cachem 1.0.4 2021-02-13 [1] CRAN (R 4.0.3)
cli 2.3.1 2021-02-23 [1] CRAN (R 4.0.3)
colorspace 2.0-0 2020-11-11 [1] CRAN (R 4.0.3)
crayon 1.4.1 2021-02-08 [1] CRAN (R 4.0.3)
DBI 1.1.1 2021-01-15 [1] CRAN (R 4.0.3)
digest 0.6.27 2020-10-24 [1] CRAN (R 4.0.3)
dplyr 1.0.5 2021-03-05 [1] CRAN (R 4.0.3)
ellipsis 0.3.1 2020-05-15 [1] CRAN (R 4.0.2)
fansi 0.4.2 2021-01-15 [1] CRAN (R 4.0.3)
fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.0.3)
generics 0.1.0 2020-10-31 [1] CRAN (R 4.0.3)
ggplot2 * 3.3.3 2020-12-30 [1] CRAN (R 4.0.3)
glue 1.4.2 2020-08-27 [1] CRAN (R 4.0.3)
gtable 0.3.0 2019-03-25 [1] CRAN (R 4.0.2)
htmltools 0.5.1.9000 2021-03-11 [1] Github (rstudio/htmltools@ac43afe)
httpuv 1.5.5 2021-01-13 [1] CRAN (R 4.0.3)
jquerylib 0.1.3 2020-12-17 [1] CRAN (R 4.0.3)
jsonlite 1.7.2 2020-12-09 [1] CRAN (R 4.0.3)
knitr 1.31 2021-01-27 [1] CRAN (R 4.0.3)
later 1.1.0.1 2020-06-05 [1] CRAN (R 4.0.2)
lattice 0.20-41 2020-04-02 [4] CRAN (R 4.0.0)
lifecycle 1.0.0 2021-02-15 [1] CRAN (R 4.0.3)
magrittr 2.0.1 2020-11-17 [1] CRAN (R 4.0.3)
mime 0.10 2021-02-13 [1] CRAN (R 4.0.3)
munsell 0.5.0 2018-06-12 [1] CRAN (R 4.0.2)
packrat 0.5.0 2018-11-14 [1] CRAN (R 4.0.3)
pillar 1.5.1 2021-03-05 [1] CRAN (R 4.0.3)
pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.0.2)
promises 1.2.0.1 2021-02-11 [1] CRAN (R 4.0.3)
purrr 0.3.4 2020-04-17 [1] CRAN (R 4.0.2)
R6 2.5.0 2020-10-28 [1] CRAN (R 4.0.3)
Rcpp 1.0.6 2021-01-15 [1] CRAN (R 4.0.3)
rlang 0.4.10 2020-12-30 [1] CRAN (R 4.0.3)
rsconnect 0.8.16 2019-12-13 [1] CRAN (R 4.0.3)
rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.0.3)
sass 0.3.1 2021-01-24 [1] CRAN (R 4.0.3)
scales 1.1.1 2020-05-11 [1] CRAN (R 4.0.2)
sessioninfo 1.1.1 2018-11-05 [1] CRAN (R 4.0.2)
shiny * 1.6.0 2021-01-25 [1] CRAN (R 4.0.3)
thematic 0.1.1 2021-01-16 [1] CRAN (R 4.0.4)
tibble 3.1.0 2021-02-25 [1] CRAN (R 4.0.3)
tidyselect 1.1.0 2020-05-11 [1] CRAN (R 4.0.2)
utf8 1.2.1 2021-03-12 [1] CRAN (R 4.0.4)
vctrs 0.3.6 2020-12-17 [1] CRAN (R 4.0.3)
withr 2.4.1 2021-01-26 [1] CRAN (R 4.0.3)
xfun 0.22 2021-03-11 [1] CRAN (R 4.0.3)
xtable 1.8-4 2019-04-21 [1] CRAN (R 4.0.2)

[1] /home/fay/R/x86_64-pc-linux-gnu-library/4.0
[2] /usr/local/lib/R/site-library
[3] /usr/lib/R/site-library
[4] /usr/lib/R/library

Hmm, ok, have you tried restarting the R session and re-running the app?

It worked!

Thank you very much for your help.