Closed turbomam closed 6 years ago
You need to load debrowser and googleAuthR just after deServer function like berlow;
deServer <- function(input, output, session) {
library(debrowser)
library(googleAuthR)
enableBookmarking("server")
Other thing you need to manually create a link to bookmarks directory in shiny If your debrowser is located in /var/lib/html for example, the bookmark should be created by shiny server in the first use and you need to remove the directory under debrowser/R and create a link something like below;
/var/lib/html/shiny-server/debrowser/R/shiny_bookmarks -> /var/lib/shiny-server/bookmarks/shiny/R-bdb793e376af705b45ac43e9e3eb129d/
The last thing is, we are using google authentication. To be able to authenticate your users, you need to create your own webapp client_id and client_secret and give authorization to your server.
options("googleAuthR.webapp.client_id" =
"186441708690-n65idoo8t19ghi7ieopat6mlqkht9jts.apps.googleusercontent.com")
options("googleAuthR.webapp.client_secret" = "ulK-sj8bhvduC9kLU4VQl5ih")
Check googleAuthR to learn how to do these. I might revisit this part to simplify the process.
Thanks. I did some of your suggestions. I still get
Disconnected from the server.
But I don't see an error log for debrowser in /var/log/shiny-server
. Is there somewhere else I should be looking for error messages?
I took care of loading debrowser
and googleAuthR
by uncommenting existing lines in server.R
I have a /var/lib/shiny-server/bookmarks/shiny
but it's empty*. I don't think I have a shiny-server/debrowser/R/shiny_bookmarks
(although I do have ~/debrowser/R/shiny_saves/
). So I don't think I understand the linking instructions.
*Actually... I just ran a server bookmarking example from https://shiny.rstudio.com/articles/bookmarking-state.html , so now I have /var/lib/shiny-server/bookmarks/shiny/bookmarkex-461826d176fb8a9123e34d829f600b65
Regarding google authentication... I created a project, a client_id and client_secret. I was able to run the URL shortener example from https://mark.shinyapps.io/googleAuthRexample/ , so I'm probably close but not quite there yet.
This is great. Thanks.
Is there any way to launch debrowser from shiny server?
I installed debrowser with
biocLite()
from Rstudio server on the same host that is running my shiny server, and it works from there (or at least gets to the data load page)From my home dir, I did
Visiting http://server:3838/debrowser/ gets me the Escher-like splash screen, along with the message
I also tried putting the following in an app.R (knowing that it was a long-shot):
which gave