Run the following app and follow the instructions in the browser. When the bug exists, it ONLY manifests when running with xhr-streaming, xhr-polling, or jsonp-polling protocols; so use the protocol selector UI to disable all protocols except the one you're trying to test.
library(shiny)
ui <- fluidPage(
tags$p(
tags$strong("Instructions: "),
"Press \"Cause error\". The correct behavior is for the counter to keep counting; the buggy behavior is for the counter to stop."
),
textOutput("counter"),
actionButton("go", "Cause error"),
tags$script(HTML(r"{
Shiny.addCustomMessageHandler('errorme', function(msg) {
throw new Error('boom');
});
}"))
)
server <- function(input, output, session) {
i <- 0
output$counter <- renderText({
invalidateLater(1000)
i <<- i + 1
i
})
observeEvent(input$go, {
session$sendCustomMessage("errorme", list())
})
}
shinyApp(ui, server)
It's issue five six three in sockjs/sockjs-client
Testing notes
Run the following app and follow the instructions in the browser. When the bug exists, it ONLY manifests when running with xhr-streaming, xhr-polling, or jsonp-polling protocols; so use the protocol selector UI to disable all protocols except the one you're trying to test.