I have had this issue for the past 1.5 half years. I read this thread and found the solution for my issue: Problems running Rstudio on JupyterHub - #5 by Miklos_Harsszegi
My setup uses the jupyter/datascience-notebook:ubuntu-20.04
as the base image + RStudio version 2023.09.1-494
, for Ubuntu Focal. The server running this Jupyterhub instance did not have any domain named assigned, so I was accessing Jupyterhub through a URL formatted like this:
https://10.0.12.104/jupyter/user/testuser/lab
When I tried to access RStudio, I would get redirected to this URL:
http://10.0.12.104/jupyter/user/testuser/rstudio/auth-sign-in?appUri=%2F
Removing the auth-sign-in?appUri=%2F
and changing the URL to use https
instead of http
would still not work, as it would continue to redirect me to the above incorrect URL.
After reading this thread, I assigned two DNS names to the same server:
https://abc.xyz.com
https://abc-def.xyz.com
When accessing the Jupyterhub instance through URL 1), this would redirect me to the correct URL when opening RStudio server:
https://abc.xyz.com/jupyter/user/testuser/rstudio
And RStudio works as normal. But when accessing through URL 2), I would get the same error that I got when accessing with the IP address:
http://abc-def.xyz.com/jupyter/user/testuser/rstudio/auth-sign-in?appUri=%2F
So the current fix (at least for my case), is to access Jupyterhub through a URL that has no -
character or IP addresses. Hoping for a fix.
Edit:
Upon further investigation, this might turn out to be also related to not having a valid TLS certificate. URL 2) works now too after a valid TLS certificate was deployed alongside Jupyterhub and it now redirects me to https://abc-def.xyz.com/jupyter/user/testuser/rstudio
without any issues.
@yuvipanda @jrdnbradford
Thank you,
Stefano