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

Issue in {shinytest2} support for ui.R and server.R? #244

Closed
IndrajeetPatil opened this issue Aug 6, 2022 · 0 comments · Fixed by #257
Closed

Issue in {shinytest2} support for ui.R and server.R? #244

IndrajeetPatil opened this issue Aug 6, 2022 · 0 comments · Fixed by #257

Comments

@IndrajeetPatil
Copy link
Contributor

As mentioned here, creating an issue to track this.

To reproduce this issue, run record_test() in this folder.

Testing the exact same app works when it is only in a single app.R file.

What I see locally:

> record_test()
Error in `app_initialize()`:
! Chromote: timed out waiting for response to command Target.createTargetYou can inspect the failed AppDriver object via `rlang::last_error()$app`AppDriver logs:
{shinytest2} R info  13:19:39.33 Start AppDriver initialization
{shinytest2} R info  13:19:39.33 Starting Shiny app
{shinytest2} R info  13:19:39.76 Creating new ChromoteSession
{shinytest2} R info  13:19:49.76 Error while initializing AppDriver:
                                 Chromote: timed out waiting for response to command Target.createTarget
{shiny}      R error ----------- Loading required package: shiny
{shiny}      R error ----------- Running application in test mode.
{shiny}      R error ----------- 
{shiny}      R error ----------- Listening on http://127.0.0.1:3797

Caused by error:
! Chromote: timed out waiting for response to command Target.createTarget
Run `rlang::last_error()` to see where the error occurred.

Session info

``` r library(shinytest2) #> Loading required package: testthat sessioninfo::session_info(include_base = TRUE) #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.2.1 (2022-06-23) #> os macOS Monterey 12.4 #> system aarch64, darwin20 #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz Europe/Berlin #> date 2022-08-06 #> pandoc 2.19 @ /usr/local/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> ! package * version date (UTC) lib source #> base * 4.2.1 2022-06-24 [?] local #> brio 1.1.3 2021-11-30 [1] CRAN (R 4.2.0) #> callr 3.7.1 2022-07-13 [1] CRAN (R 4.2.1) #> cli 3.3.0 2022-04-25 [1] CRAN (R 4.2.0) #> P compiler 4.2.1 2022-06-24 [1] local #> crayon 1.5.1 2022-03-26 [1] CRAN (R 4.2.0) #> P datasets * 4.2.1 2022-06-24 [1] local #> digest 0.6.29 2021-12-01 [1] CRAN (R 4.2.0) #> evaluate 0.15 2022-02-18 [1] CRAN (R 4.2.0) #> fansi 1.0.3 2022-03-24 [1] CRAN (R 4.2.0) #> fastmap 1.1.0 2021-01-25 [1] CRAN (R 4.2.0) #> fs 1.5.2 2021-12-08 [1] CRAN (R 4.2.0) #> glue 1.6.2 2022-02-24 [1] CRAN (R 4.2.0) #> P graphics * 4.2.1 2022-06-24 [1] local #> P grDevices * 4.2.1 2022-06-24 [1] local #> highr 0.9 2021-04-16 [1] CRAN (R 4.2.0) #> htmltools 0.5.3 2022-07-18 [1] CRAN (R 4.2.1) #> knitr 1.39 2022-04-26 [1] CRAN (R 4.2.0) #> lifecycle 1.0.1 2021-09-24 [1] CRAN (R 4.2.0) #> magrittr 2.0.3 2022-03-30 [1] CRAN (R 4.2.0) #> P methods * 4.2.1 2022-06-24 [1] local #> pillar 1.8.0 2022-07-18 [1] CRAN (R 4.2.1) #> pkgconfig 2.0.3 2019-09-22 [1] CRAN (R 4.2.0) #> processx 3.7.0 2022-07-07 [1] CRAN (R 4.2.1) #> ps 1.7.1 2022-06-18 [1] CRAN (R 4.2.0) #> purrr 0.3.4 2020-04-17 [1] CRAN (R 4.2.0) #> R.cache 0.16.0 2022-07-21 [1] CRAN (R 4.2.0) #> R.methodsS3 1.8.2 2022-06-13 [1] CRAN (R 4.2.0) #> R.oo 1.25.0 2022-06-12 [1] CRAN (R 4.2.0) #> R.utils 2.12.0 2022-06-28 [1] CRAN (R 4.2.0) #> R6 2.5.1.9000 2022-07-05 [1] Github (r-lib/R6@fb9e77a) #> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.2.0) #> rlang 1.0.4 2022-07-12 [1] CRAN (R 4.2.1) #> rmarkdown 2.14 2022-04-25 [1] CRAN (R 4.2.0) #> rstudioapi 0.13 2020-11-12 [1] CRAN (R 4.2.0) #> sessioninfo 1.2.2 2021-12-06 [1] CRAN (R 4.2.0) #> shinytest2 * 0.1.0 2022-04-27 [1] CRAN (R 4.2.0) #> P stats * 4.2.1 2022-06-24 [1] local #> stringi 1.7.8 2022-07-11 [1] CRAN (R 4.2.1) #> stringr 1.4.0 2019-02-10 [1] CRAN (R 4.2.0) #> styler 1.7.0.9001 2022-07-20 [1] local #> testthat * 3.1.4 2022-04-26 [1] CRAN (R 4.2.0) #> tibble 3.1.8 2022-07-22 [1] CRAN (R 4.2.1) #> P tools 4.2.1 2022-06-24 [1] local #> utf8 1.2.2 2021-07-24 [1] CRAN (R 4.2.0) #> P utils * 4.2.1 2022-06-24 [1] local #> vctrs 0.4.1 2022-04-13 [1] CRAN (R 4.2.0) #> withr 2.5.0 2022-03-03 [1] CRAN (R 4.2.0) #> xfun 0.31 2022-05-10 [1] CRAN (R 4.2.0) #> yaml 2.3.5 2022-02-21 [1] CRAN (R 4.2.0) #> #> [1] /Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library #> #> P ── Loaded and on-disk path mismatch. #> #> ────────────────────────────────────────────────────────────────────────────── ```

Created on 2022-08-06 by the reprex package (v2.0.1)

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.

1 participant