You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Creating an issue for tracking/discussion - I will submit a PR as well.
Within the RStudio package help pane, links to other help topics will sometimes return a 404 instead of the target help page. The target help page(s) do exist, and can be accessed by navigating from the main help nav. Investigating the issue, the root cause appears to be that the R help system will sometimes return a 302 response with a relative filename in the location header, which the rewrite_netloc function in rsession-proxy prepends the host:port onto resulting in an invalid URL.
HTTP/1.1 404 Not Found
Server: TornadoServer/6.4.1
Content-Type: text/html
Date: Mon, 28 Oct 2024 16:14:55 GMT
X-Content-Type-Options: nosniff
Content-Security-Policy: frame-ancestors 'self'; report-uri /api/security/csp-report
Content-Length: 3034
The relative portion of the above URL should have been applied to the original request filename, and pointed to the correct location here: http://127.0.0.1:8888/rstudio/help/library/base/html/conditions.html
How to reproduce
Launch RStudio
Go to R console pane
Input ?later::run_now, and <enter>
Note that the help page opens, go to the help pane, scroll down, and click the link inside that page for tryCatch
Expected behaviour
After step 3 4 above, the help topic for 'Condition Handling and Recovery' should have been opened in the help page.
Actual behaviour
The help pane displays the Jupyter server's built in 404 page.
Your personal set up
Running RStudio Server 2024.09.0 Build 375 from Docker container at localhost port 8888.
The following Dockerfile will repro this issue:
ARG BASE_CONTAINER=quay.io/jupyter/r-notebook:hub-5.2.1
FROM $BASE_CONTAINER
# install rstudio-serverUSER root
# http://cran.rstudio.com/bin/linux/ubuntu/RUN apt-get update -qq && \
apt-get install --no-install-recommends software-properties-common dirmngr -y && \
wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc && \
add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/" && \
apt install --no-install-recommends r-base -y
# Per: https://posit.co/download/rstudio-server/RUN apt-get update && \
apt-get install gdebi-core libproj-dev proj-data proj-bin libgeos-dev build-essential libfreetype6-dev libfontconfig1-dev cmake -y && \
curl --silent -L --fail wget wget https://download2.rstudio.org/server/jammy/amd64/rstudio-server-2024.09.0-375-amd64.deb > /tmp/rstudio.deb && \
echo 'efcc1c69252dd220b30973c7a10571707cfd47afc70c37c11a5e68efd2129feb /tmp/rstudio.deb' | shasum -a 256 -c - && \
gdebi -n /tmp/rstudio.deb && \
rm /tmp/rstudio.deb && \
apt-get clean
USER $NB_USER
RUN pip install jupyter-rsession-proxy
# To see the fix I propose, comment out the line above and uncomment the line below:# RUN pip install git+https://github.com/paulkm/jupyter-rsession-proxy.git@fix-help-links-bug# To build (with Docker): docker build -t rstudio-test .# To run: docker run -p 8888:8888 rstudio-test# The console output will display the localhost URL to use
The text was updated successfully, but these errors were encountered:
Bug description
Creating an issue for tracking/discussion - I will submit a PR as well.
Within the RStudio package help pane, links to other help topics will sometimes return a 404 instead of the target help page. The target help page(s) do exist, and can be accessed by navigating from the main help nav. Investigating the issue, the root cause appears to be that the R help system will sometimes return a 302 response with a relative filename in the location header, which the
rewrite_netloc
function in rsession-proxy prepends the host:port onto resulting in an invalid URL.An example request and response:
With the following response:
The browser then attempts to follow that URL with the following results:
Returning:
The relative portion of the above URL should have been applied to the original request filename, and pointed to the correct location here:
http://127.0.0.1:8888/rstudio/help/library/base/html/conditions.html
How to reproduce
?later::run_now
, and<enter>
tryCatch
Expected behaviour
After step
34 above, the help topic for 'Condition Handling and Recovery' should have been opened in the help page.Actual behaviour
The help pane displays the Jupyter server's built in 404 page.
Your personal set up
Running RStudio Server 2024.09.0 Build 375 from Docker container at localhost port 8888.
The following Dockerfile will repro this issue:
The text was updated successfully, but these errors were encountered: