Shiny app error

I’m not a Shiny expert, I tried to deploy the app from the OOD documentation but it seems not to like the socket file as port. So this:

R-4.0.3-foss> options(shiny.launch.browser = FALSE)
R-4.0.3-foss> shiny::runApp("~/R/shiny/app")
Loading required package: shiny

Listening on

works assigning a random port.

While this:

R-4.0.3-foss> sock <- "/tmp/tmp.vYP61Jmq4y/app.sock"
R-4.0.3-foss> attr(sock, "mask") <- strtoi("0077", 8)
R-4.0.3-foss> options(shiny.port = sock)
R-4.0.3-foss> options(shiny.launch.browser = FALSE)
R-4.0.3-foss> shiny::runApp("~/R/shiny/app")

Listening on domain socket /tmp/tmp.vYP61Jmq4y/app.sock
createPipeServer: invalid argument
Warning in normalizePath(name) :
  path[1]="/tmp/tmp.vYP61Jmq4y/app.sock": No such file or directory
Error in .subset2(public_bind_env, "initialize")(...) : 
  Failed to create server

generate an error.
I’m pretty sure I’m doing something dummy here. Can anyone give me a clue?

I think maybe that’s an issue from the “proxy” side since I just figured out Shiny is waiting for the proxy to create the socket.
Is there anything I can do to know if the lua-resty-session works properly?
The app seems just an example, not sure if that’s supposed to work out of the box or it needs more adjustments.
Does anyone have a working example of shiny app?


Unfortunately I wasn’t able to replicate this. For the lua-resty-session, I would see if you can find something in the logs, but other than that I don’t know how else you could test the session working properly.

There are some working rstudio apps out there, and you are correct that the repo in that bit of docs here 1. Copy RStudio App — Open OnDemand 2.0.13 documentation is an example.

This may be more of what you are looking for GitHub - OSC/bc_osc_rstudio_server: Batch Connect - OSC RStudio Server and there are others out there like OOD-apps/rstudio_server_app at master · CHPC-UofU/OOD-apps · GitHub but I have not had any experience with that repo. Let me know if those are the right docs you were working from and the correct apps you are after though.

Thanks for your answer. Actually I’m not using RStudio but Shiny application from this list: which points to:
Shiny through RStudio will probably work but I was interested in trying the “shiny-only” app.

I’m able to reproduce the error that @fenz reports. It is occurring for R versions 4.0.x, x = 0-5.
versions 3 work fine. This bug report seems to be relevant:

1 Like

Thanks for your reply.
I actually get the same issue on both R 4.0.3 and R 3.6.3. I just checked the modules I have access to on the system and the configuration is:

R-4.0.3> packageVersion("shiny")
[1] ‘’
R-3.6.3> packageVersion("shiny")
[1] ‘1.5.0’

So in my modules the newer R has an older shiny package but, in both cases, older than version “” (mentioned in the issue linked).
Can you tell me the versions of both R and shiny which work for you?
Many thanks for your help!

The working version is R-3.6.2 with:

[1] ‘1.4.0’
[1] ‘1.5.2’

I was not checking httpuv package (I overlooked the link you shared I thought it was about shiny package):

R-3.6.3> packageVersion("httpuv")
[1] ‘1.5.4’

So, you are right. version of httpuv > seems to be an issue.
Many thanks again for your help!

So, following @dugan info, I run shiny in a container instead of using the one from the R module.
I can confirm this image: rocker/shiny:3.6.2 still works.
But it seems newer versions fail.