shinyproxy: [Bug Report] AJAX error in the new release of ShinyProxy (version 2.2.0+)
In the new release version (2.2.0) of ShinyProxy, all the Apps that use DT with server processing mode will break. The browser complains Ajax errors while ShinyProxy log says Request Methods ‘Post’ not supported.
Screen Shots
An example app
library(shiny)
ui <- fluidPage(DT::DTOutput('tbl'))
server <- function(input, output, session) {
output$tbl <- DT::renderDT(iris, server = TRUE)
}
shinyApp(ui, server)
I actually set up a docker-compose example for this, see https://github.com/shrektan/shinyproxy-docker-compose-example
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 1
- Comments: 46 (15 by maintainers)
Thanks! We can reproduce this and are working on it.
Hi @giordyb
Thank you for your example deployment and report. I looked into the issue today and it’s quite a strange issue. The problem is caused due to having debug logging enabled. There is one class
DispatcherServletwhich will log the parts of the requests send through ShinyProxy. However, this causes issue with some proxied requests, because part of those requests can only be read once. Therefore the Shiny app received an invalid request.The solution is to disable debug logging for the
org.springframework.web.servlet.DispatcherServletclass as follows:This will be the default in the next ShinyProxy release, so that this workaround is no longer needed.
Hi @LEDfan,
thank you for looking into this so promptly. I added the logging configuration as you suggested and now everything is working as expected, so I’m a happy camper.
thank you very much for your help!
Just add my two cents here. In order to ensure DT works behind a load balancer (Traefik) , I recently created a simple repo DT-load-balancer based on Docker swarm, with detailed setups… I think with a little effort, you can turn it into a reproducible example for ShinyProxy about this issue…
Just adding a ‘me too’. The issue is with Keycloak authorization backend and does not otherwise show up. Reverting to 2.1 works as expected.
We were able to reproduce with Keycloak. A fix will be in the next release.
Encountering this also with KeyCloak Auth and any ShinyProxy version > 2.1.0
the same problem with billy34 in ShinyProxy 2.3.0, use DT::renderDataTable still have same ajax error 503 use keycloak v7.0.0 for Authentication/Authorization but reverse to 2.1 will work fine
Example App
library(shiny)ui <- fluidPage(DT::dataTableOutput('tbl'))server <- function(input, output, session) {output$tbl <- DT::renderDataTable({DT::datatable(iris, class = 'cell-border stripe')})}@shrektan : if you look at the shinyproxy download page (https://www.shinyproxy.io/downloads/), you can download either a platform-independent file (.jar), or a deb file specific to Ubuntu that you install with dpkg. I chose that vs. the platform independent file.
Hello @dylancis: the original problem is definitely fixed as confirmed by our tests and by @shrektan. For the issue reported by @bogdanrau, we don’t have a reproducible example yet or (confirmation from another user there is still an issue).
@shrektan thanks for reporting the issue. A fix has been committed: https://github.com/openanalytics/containerproxy/commit/6455abdaed031297baf600f5e71e2242b689d940
Can you please give this dev build a try and see if it fixes the problem? https://nexus.openanalytics.eu/nexus/content/repositories/snapshots/eu/openanalytics/shinyproxy/2.2.1-SNAPSHOT/shinyproxy-2.2.1-20190329.093240-2.jar