Closed lwaldron closed 2 years ago
Thanks @lwaldron for the bug report!
It looks like the URLs being listed by browseVignettes()
are missing help/
at the beginning of the URL (right after the hostname / localhost:8787
). If you use the help browser in RStudio itself (e.g. go to home-> select package, -> select vignette), you get a link to the same vignette content, but these links are correctly formed starting with help
and look like they should open in a new tab/window just fine.
If anyone has any insight on why browseVignettes()
page produces these incorrect URLs, we're all ears! (maybe the excellent @kevinushey can set me straight once again?)
Those help links use the R help server directly (which is served on a different port that RStudio Server itself). RStudio uses the help/
in the Help pane to basically act something like a proxy to the R help server.
So, the links reported by browseVignettes()
are correct. More likely is that the port used by the R help server is not actually exposed by Docker and so such URLs are not visible externally (even though they might be visible within the Docker container; ie, to RStudio)
thanks @kevinushey , that makes sense. I'm a bit unclear what port numbers either RStudio help server or R help server are using; it appears to me that the RStudio help server works fine even when I've locked down all other ports except RStudio's (e.g. I bind 8787 in the container to 443 outside the container and put the container behind a reverse proxy, and still I can get RStudio's urls with the help/
to work just fine). Maybe RStudio's proxy is already handling this so it all goes through the 8787 port anyway?
In any event, I would lean towards us merely recommending users rely on the RStudio help panel for the time being?
(Historically we have explored exposing other ports, e.g. HTTR_LOCALHOST + HTTR_PORT for oauth apps, but going down that road can be tricky when users operate in vary different network spaces with different firewalls etc) .
FYI, the links all point to the same port, e.g. for the parallel package vignette it's http://localhost:8787/library/parallel/doc/parallel.pdf.
As a note, under Help - R Help it's a bit convoluted to find package vignettes, you have to choose the package first then see if it has vignettes; I don't see an equivalent of browseVignettes()
to see all available vignettes.
See also the help.ports
documentation in ?options
.
I suspect you could force R to use a particular port for its help server with e.g.
options(help.ports = 8888L)
and then tell Docker to expose that port so it can be accessed through e.g. a web browser.
Steps to reproduce:
rocker/rstudio
server, for example using the current version:> browseVignettes()
. Allow pop-ups.