helgasoft / echarty

Minimal R/Shiny Interface to ECharts.js
https://helgasoft.github.io/echarty/
82 stars 3 forks source link

Error: No handler registered mouseover since v1.5.4 #24

Closed joachim-hansson closed 1 year ago

joachim-hansson commented 1 year ago

Using this minimal example:

library(shiny)
library(echarty)

ui <- fluidPage(mainPanel(ecs.output("distPlot"))))

server <- function(input, output) {
  output$distPlot <- ecs.render({cars |> ec.init()})
  print(sessionInfo())
}
shinyApp(ui = ui, server = server)

I get the error below when hoovering a data point in the plot:

Warning: Error in : No handler registered for type distPlot_mouseover:echartyParse 3: runApp 2: print.shiny.appobj 1: Error in (function (name, val, shinysession) : No handler registered for type distPlot_mouseover:echartyParse

Session info:

Listening on http://127.0.0.1:5297 R version 4.3.1 (2023-06-16) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 22.04.2 LTS

Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.20.so; LAPACK version 3.10.0

locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

time zone: Etc/UTC tzcode source: system (glibc)

attached base packages: [1] stats graphics grDevices utils datasets methods base

other attached packages: [1] echarty_1.5.4 shiny_1.7.4

loaded via a namespace (and not attached): [1] jsonlite_1.8.5 dplyr_1.1.2 compiler_4.3.1 crayon_1.5.2 promises_1.2.0.1 [6] tidyselect_1.2.0 Rcpp_1.0.10 later_1.3.1 jquerylib_0.1.4 yaml_2.3.7
[11] fastmap_1.1.1 mime_0.12 R6_2.5.1 generics_0.1.3 htmlwidgets_1.6.2 [16] tibble_3.2.1 bslib_0.5.0 pillar_1.9.0 rlang_1.1.1 utf8_1.2.3
[21] cachem_1.0.8 stringi_1.7.12 httpuv_1.6.11 sass_0.4.6 memoise_2.0.1
[26] cli_3.6.1 withr_2.5.0 magrittr_2.0.3 digest_0.6.31 xtable_1.8-4
[31] remotes_2.4.2 lifecycle_1.0.3 data.tree_1.0.0 vctrs_0.6.3 glue_1.6.2
[36] fansi_1.0.4 tools_4.3.1 pkgconfig_2.0.3 ellipsis_0.3.2 htmltools_0.5.5

helgasoft commented 1 year ago

What happens if there is a handler defined like: observeEvent(input$distPlot_mouseover, { cat('\nMover:', toString(input$distPlot_mouseover$data)) }) There are no changes in anything Shiny in 1.5.4 ....the warning is strange.

-------- UPDATE Aug 3rd: Cannot replicate with latest R 4.3.1 and RStudio 2023.06.1+524

helgasoft commented 1 year ago

@joachim-hansson, sorry for the delay... Got it replicated - in R console only. I work mostly in RStudio where it does not happen. The obvious suspect is HTMLWidgets.shinyMode which somehow does not get set (in timely manner maybe?). I have no control over HTMLWidgets.shinyMode and hope the bug remains only in v.1.5.4 and does not happen again. The new build 1.5.4.01, just uploaded, works fine.

joachim-hansson commented 1 year ago

Hi,

sorry for the lack of response, have been on vaccation and this fell out of my radar for a while. I will test with the new version! Thanks for looking in to it.

Best regards, Joachim

------- Original Message ------- Den fredag 18 augusti 2023 kl. 7:31 fm, helgasoft @.***> skrev:

@.***(https://github.com/joachim-hansson), sorry for the delay... Got it replicated - in R console only. I work mostly in RStudio where it does not happen. The obvious suspect is HTMLWidgets.shinyMode which somehow does not get set (in timely manner maybe?). I have no control over HTMLWidgets.shinyMode and hope the bug remains only in v.1.5.4 and does not happen again. The new build 1.5.4.01, just uploaded, works fine.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>