Closed kmshort closed 2 years ago
I should add that I'm running shiny-server version 1.5.17.973 (October 18, 2021 release).
Okay, I'll try and bugfix it myself.
Something is up with the scDRnum and scDRgene functions. That's what I've got to so far.
Sorry for the delayed reply. The error message in the console is expected. Basically, it happens because the shiny app tries to load itself before the h5 files are being accessed. Eventually, this fixes itself (i.e. the h5files get accessed properly) and there should be no difference to an external user.
Given that the app works on RStudio and it crashes on shiny-server, I think the main problem lies with the shiny-server. One possibility I can think of is that... on the installation instructions, it says that additional packages have to be installed on the shiny server. I have reproduced the code to install the packages below:
reqPkg = c("shiny", "shinyhelper", "data.table", "Matrix", "DT", "hdf5r",
"reticulate", "ggplot2", "gridExtra", "magrittr", "ggdendro")
newPkg = reqPkg[!(reqPkg %in% installed.packages()[,"Package"])]
if(length(newPkg)){install.packages(newPkg)}
Have you installed these packages on the shiny-server?
To further test if the packages work on the shiny-server, can you make a new shinyapp using these two files and check if the app runs on the shiny-server? These two files only loads the packages and does nothing else.
ui.R:
library(shiny)
library(shinyhelper)
library(data.table)
library(Matrix)
library(DT)
library(magrittr)
ui <- fluidPage(
"Hello, world!"
)
server.R
library(shiny)
library(shinyhelper)
library(data.table)
library(Matrix)
library(DT)
library(magrittr)
library(ggplot2)
library(ggrepel)
library(hdf5r)
library(ggdendro)
library(gridExtra)
server <- function(input, output, session) {
}
thanks - my server is offline at the moment so can't test yet - I'll let you know.
To further test if the packages work on the shiny-server, can you make a new shinyapp using these two files and check if the app runs on the shiny-server? These two files only loads the packages and does nothing else.
ui.R:
library(shiny) library(shinyhelper) library(data.table) library(Matrix) library(DT) library(magrittr) ui <- fluidPage( "Hello, world!" )
server.R
library(shiny) library(shinyhelper) library(data.table) library(Matrix) library(DT) library(magrittr) library(ggplot2) library(ggrepel) library(hdf5r) library(ggdendro) library(gridExtra) server <- function(input, output, session) { }
Hi, thanks for your help. Yes, this throws the same error message. Now I just need to find out why shiny-server throws them when R on the same server sees them perfectly.
Hello again, If I edit /etc/shiny-server/shiny-server.conf to change the user from run_as shiny; to run_as MyusernameLogin;
Then it works. My server is an instance from an academic research cluster; so I don't have the default shiny account password. So once I get that, I can probably get the packages installed under that user.
thanks for your help Kieran
Hi again @jfouyang I have it working now. I just wasn't sure how to configure shiny-server. I didn't realise shiny-server was run under user "shiny". Once I'd logged in as "shiny" and installed the necessary packages as in your guide, it worked. many thanks, Kieran
Glad that the issue is resolved. Yes, it is quite common to have issues on the shiny-server since it is usually administered remotely. I will close the issue then. Thanks again for using ShinyCell!
Hi, Wonderful tool! I can launch the example shiny app from within Rstudio.. by doing something like this:
the app displays, is fully interactive, and for all intents and purposes, seems to work. BUT, in the console - an error is thrown:
This is my sessionInfo() when I run the app from within Rstudio:
Further, when I try to deploy this app on a shinyserver, the web browser renders this message rather than the app:
I can only think that this error has something to do with the errors that I see in the R console when I run the app from within R studio.
Any help would be greatly appreciated, and I've used the example data here to make it easier.
cheers, Kieran