rstudio / shiny-server

Host Shiny applications over the web.
https://rstudio.com/shiny/server
Other
712 stars 291 forks source link

"su: ignoring --preserve-environment" error in apps #541

Closed snhansen closed 1 year ago

snhansen commented 1 year ago

For all sessions on all of my apps, I keep getting the following error:

su: ignoring --preserve-environment, it's mutually exclusive with --login

This doesn't seem to affect the performance of the app except that sometimes the buttons doesn't work immediately after loading the app page, but the server still writes an error log with that message.

Here's a minimal example producing this error:

library(shiny)

server <- function(input, output) {
  observeEvent(input$generate, {
    x <- runif(1)
    print(x)
    output$x <- renderText(x)
  })
}

ui <- fluidPage(
  actionButton("generate", label = "Generate"),
  textOutput("x")
)

My server config is:

# Instruct Shiny Server to run applications as the user "shiny"
run_as :HOME_USER:;
# preserve_logs true;

# Define a server that listens on port 3838
server {
  listen 3838;

  location / {
    user_dirs;
    members_of shinyusers;
    directory_index on;
  }
}
jcheng5 commented 1 year ago

That message is totally harmless, and is emitted before the app even starts. I've been meaning to fix it but in the meantime you can safely ignore it.

The "buttons don't work immediately after loading the app page" is unrelated--does it reproduce even with as simple an app as your example here?

snhansen commented 1 year ago

That's good to know, thanks for the response.

As for the "buttons"-thing, I looked a little more into it. I actually mistook the button for not working while it's just that it functions with a bit of a delay if I activate the button immediately after the button is loaded. It's like a 2 second delay so it seems as if there is a bit more load time after the UI has been loaded. Subsequent actions doesn't come with this delay. I'm closing this as this is most likely intended.

cpsyctc2 commented 5 months ago

Still happening Debian server, latest open shiny package and latest R 3.2.4