juba / shinyglide

Glide.js component for Shiny apps
https://juba.github.io/shinyglide/
91 stars 8 forks source link

Error when running on Shiny Server #48

Closed HashimNV closed 5 months ago

HashimNV commented 7 months ago

I'm trying to run my application on Shiny Server. Everything works well except this package and I get the following error:

Uncaught TypeError: MutationObserver.observe: Argument 1 is not an object.

https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 Uncaught TypeError: window.Shiny.shinyapp is undefined update_conditions https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 update_controls https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 init https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 mt https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 yt https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 jQuery 2 yt https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2 https://shiny.abc.com/hnaveed/xyz_Dashboard/shinyglide-0.1/shinyglide.js:2** When I run the app with the shinyglide package on localhost, it works well. Only when it is run on Shiny Server does it throw these errors. What do you think could be an issue? Thanks in advance :)
juba commented 7 months ago

Hi, do you know what versions of shiny and shinyglide are running on localhost and on your server ?

HashimNV commented 7 months ago

Shiny version: 1.8.0 shinyglide version: 0.1.4

juba commented 7 months ago

It is the same version both on localhost and on the server ?

HashimNV commented 7 months ago

I believe so as I'm not changing anything in the script. How do I check on the server?

juba commented 7 months ago

Hmm if you have access to the server you could just check what shiny version is installed there, otherwise maybe create a small shiny app that just displays it ?

There are more informations here I think : https://stackoverflow.com/questions/25992642/rstudio-shiny-how-can-i-display-the-version-of-the-shiny-server-in-the-shiny-pag

juba commented 7 months ago

Another thing you can check, when your app is open in your browser, is to open the developer tools, go to console and type "window.Shiny".

image

HashimNV commented 7 months ago
2024-01-29 14_09_19-Dashboard
juba commented 7 months ago

Strange, I can't reproduce this problem with Shiny 1.8.0... Are you using the latest Github development version ?

HashimNV commented 5 months ago

The issue is resolved. There was an issue on the server side. It worked well when I fixed that. Thanks for the help and the package.