rstudio/shinytest2
View on GitHubapp$expect_values( ) Error in `app_httr_get()` Could not find Shiny server. Shiny app is no longer running
Open
#242 opened on Jul 26, 2022
help wanted
Repository metrics
- Stars
- (121 stars)
- PR merge metrics
- (PR metrics pending)
Description
Hi,
Thank you for the amazing package, I'm encountering a strange error. When I record a test app, I click on Expect Shiny Values, works great but then when I hit Save test and exit, I get the following Error:
Error in `app_httr_get()` at shinytest2/R/app-driver-expect-values.R:171:2:
! Could not find Shiny server. Shiny app is no longer running
I tried to reproduce the test in code (see below please), I get the same error.
testthat::test_that("testing table outputs in dt_editable module", {
app <- shinytest2::AppDriver$new(
app_dir = file_path,
variant = shinytest2::platform_variant(),
name = "dt_editable_dev"
)
# The following works fine
app$wait_for_idle(duration = 1000)
mpg_table <- app$get_html("#mpg_data-editable_dt")
mtcars_table <- app$get_html("#mtcars_data-editable_dt")
first_row_in_app <- app$get_text(
selector = "#mtcars_data-editable_dt tr:first-child td"
)
# The error comes from this line of code
app$expect_values(output = "mpg_data-editable_dt")
})
When I try to view( ) the app, I get the following error:
Fontconfig warning: "/etc/fonts/fonts.conf", line 86: unknown element "blank" [11926:11926:0726/155925.132116:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY [11926:11926:0726/155925.132160:ERROR:env.cc(226)] The platform failed to initialize. Exiting.
Maybe it's related the error in the subject but then why the get_url( ) works well :/
Thanks again for the great work :)
─ Session info ───────────────────────────────────
setting value
version R version 3.6.0 (2019-04-26)
os CentOS Linux 7 (Core)
system x86_64, linux-gnu
ui RStudio
language (EN)
collate en_US.UTF-8
ctype en_US.UTF-8
tz Europe/Berlin
date 2022-07-26
rstudio 2022.02.1+461.pro1 Prairie Trillium (server)
pandoc NA