berkeley-dsep-infra / datahub

JupyterHubs for use by Berkeley enrolled students
https://docs.datahub.berkeley.edu
BSD 3-Clause "New" or "Revised" License
66 stars 39 forks source link

Shiny doesn't work anymore #2099

Open yuvipanda opened 3 years ago

yuvipanda commented 3 years ago

If you open 'Shiny' in any of the hubs, it just logs you out of the hub and puts you back on the home page! It's probably something to do with how auth is handled in Shiny, and perhaps that changed with newer versions of the hub?

balajialg commented 2 years ago

@yuvipanda @ryanlovett I guess this issue is relevant even now (correct me if I understand it right). Is it tied to the RStudio upgrade or requires deeper investigation to figure out the root cause? I haven't seen any Github issue or slack message pertaining to shiny not working. So I am assuming that it is not a critical feature for the hub's operation. Considering that, should we remove shiny from the UI?

@ryanlovett, what is the context for adding shiny as part of UI? For example, if dashboarding was the most requested functionality, would it also make sense to add a similar package in python as part of the UI? If not, would it make sense to remove shiny from the UI even if it is working? Thoughts?

ryanlovett commented 2 years ago

@yuvipanda I can't reproduce this in my account on datahub. (see below)

Screen Shot 2021-12-01 at 12 48 15 PM

I just tried this as yuvipanda however and was able to reproduce it: (from jupyter-yuvipanda)

[2021-12-01T12:50:38.320] [INFO] shiny-server - Shiny Server v1.5.15.953 (Node.js v12.19.0)
[2021-12-01T12:50:38.323] [INFO] shiny-server - Using config file "/tmp/tmp7c8ec7va"
[2021-12-01T12:50:38.486] [INFO] shiny-server - Starting listener on http://[::]:56551
[I 2021-12-01 12:50:39.088 SingleUserNotebookApp log:189] 200 GET /user/yuvipanda/shiny/ (rylo@10.0.0.42) 1425.13ms

I was not able to reproduce it as balajialwar -- shiny's file listing worked at https://datahub.berkeley.edu/user/balajialwar/shiny/.

@balajialg I'd have to investigate why @yuvipanda is being affected but we are not. My feeling is that we shouldn't remove shiny at this point, unless it is super broken. The original reason for installing Shiny was that a Stat instructor needed it, I think for Stat 21.

ryanlovett commented 2 years ago

I suppose we should try updating shiny-server from 1.5.15.953 to 1.5.17.973, though I can't find a changelog.

shiny server responds with 200, but the response body is from the jupyter server. I doesn't actually log me out of yuvipanda's server -- no reauthz was required.

jovyan@jupyter-yuvipanda:~$ curl -v localhost:56551
*   Trying 127.0.0.1:56551...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 56551 (#0)
> GET / HTTP/1.1
> Host: localhost:56551
> User-Agent: curl/7.68.0
> Accept: */*
>
* Mark bundle as not supporting multiuse
< HTTP/1.1 200 OK
< X-Powered-By: Shiny Server
< Content-Type: text/html
< Vary: Accept-Encoding
< Date: Wed, 01 Dec 2021 21:04:08 GMT
< Connection: keep-alive
< Keep-Alive: timeout=5
< Transfer-Encoding: chunked
<
[snip]
balajialg commented 2 years ago

@ryanlovett Thanks for looking into this! As per your suggestion, I am okay with having it as it is, but I think we need to add some supporting documentation for shiny (I couldn't find any as of now) and add shiny demo as part of our outreach collaterals as I am not sure we consciously highlight this capability during our interaction with faculty.

I can take the first crack at the documentation if you can share a shiny file that I can use as part of this demo?

ryanlovett commented 2 years ago

@balajialg Do you have an outreach repo full of other demos? I could add an example shiny app to it.

balajialg commented 2 years ago

@ryanlovett I have the demos listed here. You may not have access to the folder. If that be the case, can you please share the shiny demo file with me? I can add it directly.

Thanks! Appreciate it

ryanlovett commented 2 years ago

I don't have access to that, but on datahub I just imported the repo at https://github.com/rstudio/shiny-examples. See https://shiny.rstudio.com/gallery/#demos.

balajialg commented 2 years ago

@ryanlovett that's awesome! I will look into this asap