DT icon indicating copy to clipboard operation
DT copied to clipboard

DT 0.26 crashes Javascript in PhantomJS via shinytest

Open halhen opened this issue 2 years ago • 1 comments

DT 0.26 seems to crash Javascript execution in PhantomJS when using it with shinytest. The table is not rendered, and regular Shiny execution (e.g. updateSelectInput() etc) seems to stop.

Reproducible example:

File /tmp/test.R

library(shiny)
library(DT)

ui <- fluidPage(
  paste0("DT ", packageVersion("DT")),
  paste0("shinytest ", packageVersion("shinytest")),
  DT::dataTableOutput("table")
)

server <- function(input, output) {
  output$table <- DT::renderDataTable({
    data.frame(a = 1, b = 2)
  })
}

shinyApp(ui = ui, server = server)
# Install shinytest if missing
install.packages("shinytest")
shinytest::installDependencies()

# Run the test app and see a screenshot
a <- shinytest::ShinyDriver$new("/tmp/test.R")
a$takeScreenshot()

0.25

0 25

0.26

0 26

By filing an issue to this repo, I promise that

  • [X] I have fully read the issue guide at https://yihui.name/issue/.
  • [X] I have provided the necessary information about my issue.
    • If I'm asking a question, I have already asked it on Stack Overflow or RStudio Community, waited for at least 24 hours, and included a link to my question there.
    • If I'm filing a bug report, I have included a minimal, self-contained, and reproducible example, and have also included xfun::session_info('DT'). I have upgraded all my packages to their latest versions (e.g., R, RStudio, and R packages), and also tried the development version: remotes::install_github('rstudio/DT').
    • If I have posted the same issue elsewhere, I have also mentioned it in this issue.
  • [X] I have learned the Github Markdown syntax, and formatted my issue correctly.

I understand that my issue may be closed if I don't fulfill my promises.

halhen avatar Jan 13 '23 15:01 halhen

It's probably due to upgrading the DataTables library #1018, but debugging PhantomJS is far beyond my expertise...

yihui avatar Jan 13 '23 18:01 yihui