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

Cannot handle shinyWidgets::numericRangeInput #376

Open
averissimo opened this issue Mar 13, 2024 · 0 comments
Open

Cannot handle shinyWidgets::numericRangeInput #376

averissimo opened this issue Mar 13, 2024 · 0 comments

Comments

@averissimo
Copy link

averissimo commented Mar 13, 2024

AppDriver fails at initialization with shinyWidgets::numericRangeInput

Note that the sw.numericRange handler is registered on {shinyWidgets}' .onLoad()

How to reproduce

ui <- shiny::fluidPage(
  shiny::tags$br(),
  shinyWidgets::numericRangeInput(
    inputId = "my_id", label = "Numeric Range Input:",
    value = c(100, 400)
  ),
  shiny::verbatimTextOutput(outputId = "res1")
)

server <- function(input, output, session) {}

app <- shiny::shinyApp(ui, server) |> 
  shinytest2::AppDriver$new(variant = shinytest2::platform_variant())

app$get_logs()

or

app <- shinytest2::AppDriver$new(shinyWidgets::demoNumericRange())
#> Loading required package: shiny
app$get_logs()
#> {shinytest2} R  info   17:17:51.47 Start AppDriver initialization
#> {shinytest2} R  info   17:17:51.72 Starting Shiny app
#> {shinytest2} R  info   17:17:52.16 Creating new ChromoteSession
#> {shinytest2} R  info   17:17:52.96 Navigating to Shiny app
#> {shinytest2} R  info   17:17:53.04 Injecting shiny-tracer.js
#> {chromote}   JS info   17:17:53.06 shinytest2; jQuery not found
#> {chromote}   JS info   17:17:53.06 shinytest2; Loaded
#> {shinytest2} R  info   17:17:53.06 Waiting for Shiny to become ready
#> {chromote}   JS info   17:17:53.13 shinytest2; jQuery found
#> {chromote}   JS info   17:17:53.13 shinytest2; Waiting for shiny session to connect
#> {chromote}   JS info   17:17:53.19 shinytest2; Connected
#> {shinytest2} R  info   17:17:53.27 Waiting for Shiny to become idle for 200ms within 15000ms
#> {chromote}   JS info   17:17:53.27 shinytest2; Waiting for Shiny to be stable
#> {chromote}   JS info   17:17:53.47 shinytest2; Shiny has been idle for 200ms
#> {shinytest2} R  info   17:17:53.47 Shiny app started
#> {shiny}      R  stderr ----------- Loading required package: shiny
#> {shiny}      R  stderr ----------- Running application in test mode.
#> {shiny}      R  stderr ----------- 
#> {shiny}      R  stderr ----------- Listening on http://127.0.0.1:5134
#> {shiny}      R  stderr ----------- Warning: Error in <Anonymous>: No handler registered for type mpg:sw.numericRange
#> {shiny}      R  stderr -----------   14: <Anonymous> [/tmp/RtmpkziAl8/R.INSTALL620331194582/shiny/R/runapp.R#388]
#> {shiny}      R  stderr -----------   12: <Anonymous>
#> {shiny}      R  stderr -----------   11: <Anonymous>
#> {shiny}      R  stderr -----------   10: do.call
#> {shiny}      R  stderr -----------    9: saveRDS
#> {shiny}      R  stderr -----------    8: withCallingHandlers
#> {shiny}      R  stderr -----------    7: doTryCatch
#> {shiny}      R  stderr -----------    6: tryCatchOne
#> {shiny}      R  stderr -----------    5: tryCatchList
#> {shiny}      R  stderr -----------    2: tryCatchList
#> {shiny}      R  stderr -----------    1: tryCatch
#> {shiny}      R  stderr ----------- Error in (function (name, val, shinysession)  : 
#> {shiny}      R  stderr -----------   No handler registered for type mpg:sw.numericRange

Created on 2024-03-13 with reprex v2.0.2

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

No branches or pull requests

1 participant