shinyglide icon indicating copy to clipboard operation
shinyglide copied to clipboard

Error when running on Shiny Server

Open HashimNV opened this issue 1 year ago • 8 comments

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 :)

HashimNV avatar Jan 29 '24 09:01 HashimNV

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

juba avatar Jan 29 '24 10:01 juba

Shiny version: 1.8.0 shinyglide version: 0.1.4

HashimNV avatar Jan 29 '24 10:01 HashimNV

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

juba avatar Jan 29 '24 10:01 juba

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

HashimNV avatar Jan 29 '24 10:01 HashimNV

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 avatar Jan 29 '24 10:01 juba

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

juba avatar Jan 29 '24 11:01 juba

2024-01-29 14_09_19-Dashboard

HashimNV avatar Jan 29 '24 13:01 HashimNV

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

juba avatar Jan 29 '24 13:01 juba

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.

HashimNV avatar Mar 26 '24 14:03 HashimNV