golem icon indicating copy to clipboard operation
golem copied to clipboard

Error in value[[3L]](cond) when deploying to RStudio Connect

Open connorcarolan opened this issue 2 years ago • 4 comments

Describe the bug When deploying to RStudio connect the following error appears despite working locally. This has been reproduced on a blank project:

Error in value[[3L]](cond) :
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted

There is also the following warnings above this error:

Warning in loadSupport(appDir, renv = sharedEnv, globalrenv = NULL) :
Loading R/ subdirectory for Shiny application, but this directory appears to contain an R package. Sourcing files in R/ may cause unexpected behavior.

This warning is shown despite the presence of the R/_disable_autoload.R file and the addition of options(shiny.autoload.r = FALSE) to the app.R file.

To Reproduce Steps to reproduce the behavior:

  1. Create a new project with the template "Package for Shiny App using golem"
  2. Run 01_start.R
  3. Run 02_dev.R
  4. Run golem::add_rstudioconnect_file()
  5. Run rsconnect::deployApp()

session info

> devtools::session_info()
─ Session info ────────────────────────────────────────────────────────────────────────────────────────────────────────────
 setting  value
 version  R version 4.1.1 (2021-08-10)
 os       Ubuntu 20.04.5 LTS
 system   x86_64, linux-gnu
 ui       RStudio
 language (EN)
 collate  en_US.UTF-8
 ctype    en_US.UTF-8
 tz       Etc/UTC
 date     2023-03-09
 rstudio  2021.09.0+351 Ghost Orchid (server)
 pandoc   2.5 @ /usr/bin/pandoc

─ Packages ────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 ! package     * version    date (UTC) lib source
   askpass       1.1        2019-01-13 [1] CRAN (R 4.1.1)
   attachment    0.3.0      2022-09-19 [1] CRAN (R 4.1.1)
   attempt       0.3.1      2020-05-03 [1] CRAN (R 4.1.1)
   brio          1.1.3      2021-11-30 [1] CRAN (R 4.1.1)
   bslib         0.4.0      2022-07-16 [1] CRAN (R 4.1.1)
   cachem        1.0.6      2021-08-19 [1] CRAN (R 4.1.1)
   callr         3.7.2      2022-08-22 [1] CRAN (R 4.1.1)
   cli           3.4.0      2022-09-08 [1] CRAN (R 4.1.1)
   config        0.3.1      2020-12-17 [1] CRAN (R 4.1.1)
   crayon        1.5.1      2022-03-26 [1] CRAN (R 4.1.1)
   curl          4.3.2      2021-06-23 [1] CRAN (R 4.1.1)
   desc          1.4.2      2022-09-08 [1] CRAN (R 4.1.1)
   devtools      2.4.4      2022-07-20 [1] CRAN (R 4.1.1)
   digest        0.6.29     2021-12-01 [1] CRAN (R 4.1.1)
   ellipsis      0.3.2      2021-04-29 [1] CRAN (R 4.1.1)
   fansi         1.0.3      2022-03-24 [1] CRAN (R 4.1.1)
   fastmap       1.1.0      2021-01-25 [1] CRAN (R 4.1.1)
   fs            1.5.2      2021-12-08 [1] CRAN (R 4.1.1)
   glue          1.6.2      2022-02-24 [1] CRAN (R 4.1.1)
   golem         0.3.3      2022-07-13 [1] CRAN (R 4.1.1)
 R golemtest   * 0.0.0.9000 <NA>       [?] <NA>
   here          1.0.1      2020-12-13 [1] CRAN (R 4.1.1)
   htmltools     0.5.3      2022-07-18 [1] CRAN (R 4.1.1)
   htmlwidgets   1.5.4      2021-09-08 [1] CRAN (R 4.1.1)
   httpuv        1.6.6      2022-09-08 [1] CRAN (R 4.1.1)
   jquerylib     0.1.4      2021-04-26 [1] CRAN (R 4.1.1)
   jsonlite      1.8.0      2022-02-22 [1] CRAN (R 4.1.1)
   knitr         1.40       2022-08-24 [1] CRAN (R 4.1.1)
   later         1.3.0      2021-08-18 [1] CRAN (R 4.1.1)
   lifecycle     1.0.2      2022-09-09 [1] CRAN (R 4.1.1)
   magrittr      2.0.3      2022-03-30 [1] CRAN (R 4.1.1)
   memoise       2.0.1      2021-11-26 [1] CRAN (R 4.1.1)
   mime          0.12       2021-09-28 [1] CRAN (R 4.1.1)
   miniUI        0.1.1.1    2018-05-18 [1] CRAN (R 4.1.1)
   openssl       2.0.3      2022-09-14 [1] CRAN (R 4.1.1)
   pillar        1.8.1      2022-08-19 [1] CRAN (R 4.1.1)
   pkgbuild      1.3.1      2021-12-20 [1] CRAN (R 4.1.1)
   pkgconfig     2.0.3      2019-09-22 [1] CRAN (R 4.1.1)
   pkgload       1.3.0      2022-06-27 [1] CRAN (R 4.1.1)
   prettyunits   1.1.1      2020-01-24 [1] CRAN (R 4.1.1)
   processx      3.7.0      2022-07-07 [1] CRAN (R 4.1.1)
   profvis       0.3.7      2020-11-02 [1] CRAN (R 4.1.1)
   promises      1.2.0.1    2021-02-11 [1] CRAN (R 4.1.1)
   ps            1.7.1      2022-06-18 [1] CRAN (R 4.1.1)
   purrr         0.3.4      2020-04-17 [1] CRAN (R 4.1.1)
   R6            2.5.1      2021-08-19 [1] CRAN (R 4.1.1)
   Rcpp          1.0.9      2022-07-08 [1] CRAN (R 4.1.1)
   remotes       2.4.2      2021-11-30 [1] CRAN (R 4.1.1)
   rlang         1.0.5      2022-08-31 [1] CRAN (R 4.1.1)
   roxygen2      7.2.1      2022-07-18 [1] CRAN (R 4.1.1)
   rprojroot     2.0.3      2022-04-02 [1] CRAN (R 4.1.1)
   rsconnect     0.8.27     2022-07-12 [1] CRAN (R 4.1.1)
   rstudioapi    0.14       2022-08-22 [1] CRAN (R 4.1.1)
   sass          0.4.2      2022-07-16 [1] CRAN (R 4.1.1)
   sessioninfo   1.2.2      2021-12-06 [1] CRAN (R 4.1.1)
   shiny       * 1.7.2      2022-07-19 [1] CRAN (R 4.1.1)
   stringi       1.7.8      2022-07-11 [1] CRAN (R 4.1.1)
   stringr       1.4.1      2022-08-20 [1] CRAN (R 4.1.1)
   testthat      3.1.4      2022-04-26 [1] CRAN (R 4.1.1)
   tibble        3.1.8      2022-07-22 [1] CRAN (R 4.1.1)
   urlchecker    1.0.1      2021-11-30 [1] CRAN (R 4.1.1)
   usethis       2.1.6      2022-05-25 [1] CRAN (R 4.1.1)
   utf8          1.2.2      2021-07-24 [1] CRAN (R 4.1.1)
   vctrs         0.4.1      2022-04-13 [1] CRAN (R 4.1.1)
   withr         2.5.0      2022-03-03 [1] CRAN (R 4.1.1)
   xfun          0.33       2022-09-12 [1] CRAN (R 4.1.1)
   xml2          1.3.3      2021-11-30 [1] CRAN (R 4.1.1)
   xtable        1.8-4      2019-04-21 [1] CRAN (R 4.1.1)
   yaml          2.3.5      2022-02-21 [1] CRAN (R 4.1.1)

 [1] /usr/local/lib/R/site-library
 [2] /usr/local/lib/R/library

 R ── Package was removed from disk.

───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Additional context Connect server info:

Linux distribution: Amazon Linux release 2 (Karoo)
Server version: 2022.06.0

connorcarolan avatar Mar 09 '23 16:03 connorcarolan

Hey,

The disable autoload warning is a known bug of shiny : https://github.com/rstudio/shiny/issues/3355

For the other one, this try catch error usually means that Connect can't launch your application. Can you provide more logs ?

ColinFay avatar Mar 09 '23 16:03 ColinFay

Hi Colin,

Thanks, will ignore that warning then.

I've attached the application logs and the connect server logs from the latest time I deployed. Is there any other logs I could provide? rstudio-connect.113.0.391.run_app.I6QFVJ712fqRNPZT.log

rstudio-connect.log

Thanks

connorcarolan avatar Mar 09 '23 18:03 connorcarolan

Thanks a lot. Unfortunately the logs aren't helpful here :/

I've sent a lot of golem apps on Connect, so I don't think it is linked to golem but to your Connect instance.

Are you able to send the default shiny app (old geyser data) on Connect?

Also, can you share a zip of golemtest5 that I can try and send on our Connect server?

ColinFay avatar Mar 14 '23 09:03 ColinFay

Hi Colin, sorry for the delay.

We have a few apps deployed including some of the jump start examples. But I tried deploying the old geyser data and got this error:

Shiny application starting ...
03/20 13:51:09.264 (GMT)
Error in value[[3L]](cond) :
03/20 13:51:09.264 (GMT)
unable to load shared object '/opt/rstudio-connect/mnt/packrat/4.1.1/v2/library/sass/52eda2b8c149eb474400d8f085ca55d6/sass/libs/sass.so':
03/20 13:51:09.264 (GMT)
Shiny application exiting ...
03/20 13:51:09.264 (GMT)
/lib64/libm.so.6: version `GLIBC_2.29' not found (required by /opt/rstudio-connect/mnt/packrat/4.1.1/v2/library/sass/52eda2b8c149eb474400d8f085ca55d6/sass/libs/sass.so)
03/20 13:51:09.264 (GMT)
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
03/20 13:51:09.264 (GMT)
Execution halted

Maybe there's something missing from our Connect server. Wonder if it's because we're using the Amazon Linux 2 OS.

I've attached the zip of golemtest5. golemtest5.zip

connorcarolan avatar Mar 20 '23 14:03 connorcarolan