Skip to content
This repository has been archived by the owner on Mar 2, 2022. It is now read-only.

browseVignettes() gives broken links #178

Closed
lwaldron opened this issue Nov 25, 2019 · 5 comments
Closed

browseVignettes() gives broken links #178

lwaldron opened this issue Nov 25, 2019 · 5 comments

Comments

@lwaldron
Copy link

Steps to reproduce:

  1. launch the rocker/rstudio server, for example using the current version:
run -d -p 8787:8787 -e PASSWORD=pw --name rstudio rocker/rstudio
  1. Open http://localhost:8787 and login
  2. In the R console, run > browseVignettes(). Allow pop-ups.
  3. Click on any of the links, and they produce "The requested page was not found."
@cboettig
Copy link
Member

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?)

@kevinushey
Copy link

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)

@cboettig
Copy link
Member

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) .

@lwaldron
Copy link
Author

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.

@kevinushey
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants