Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect url #106

Closed
dhirschfeld opened this issue Jul 10, 2021 · 5 comments
Closed

Incorrect url #106

dhirschfeld opened this issue Jul 10, 2021 · 5 comments
Labels

Comments

@dhirschfeld
Copy link

dhirschfeld commented Jul 10, 2021

I was hopeful #104 would enable usage of RStudio 1.4 with JupyterHub so I gave it a go.

I'm running rstudio-server-1.4.1725-amd64.deb and have the latest jupyter-rsession-proxy installed:

# Name                    Version                   Build  Channel
jupyter-rsession-proxy    1.4                pyhd8ed1ab_0    https://conda.anaconda.org/conda-forge
jupyter-server-proxy      3.1.0              pyhd8ed1ab_0    https://conda.anaconda.org/conda-forge

My JupyterLab session is served at the subdomain:

https://jupyter.mycompany.com/user/dhirschfeld/lab

When I click the RStudio icon in the launcher it opens a new tab with the url:

https://jupyter.mycompany.com/user/dhirschfeld/rstudio/

...which then gets immediately redirected to:

https://jupyter.mycompany.com/hub/auth-sign-in?appUri=%2F

which gives a 404.

If I manually enter:

https://jupyter.mycompany.com/user/dhirschfeld/rstudio/auth-sign-in?appUri=%2F

it redirects to:

https://jupyter.mycompany.com/user/dhirschfeld/rstudio/

...and correctly opens RStudio.

I have the RSESSION_PROXY_RSTUDIO_1_4 env var set:

❯ echo $RSESSION_PROXY_RSTUDIO_1_4
true

From looking at #104 it seems the initial url should have included /auth-sign-in?appUri=%2F. I'm not sure why that didn't happen but that seems to be the cause of the 404 :(

@dhirschfeld
Copy link
Author

After looking at #103 I tried:

https://jupyter.mycompany.com/user/dhirschfeld/rstudio/auth-sign-in

...which was successful so it seems the query parameter ?appUri=%2F is superfluous.

@dhirschfeld
Copy link
Author

The path_info is appended in setup_rserver:

server_process = {
'command': _get_cmd,
'environment': _get_env,
'launcher_entry': {
'title': 'RStudio',
'icon_path': get_icon_path()
}
}
if os.environ.get('RSESSION_PROXY_RSTUDIO_1_4', False):
server_process['launcher_entry']['path_info'] = 'rstudio/auth-sign-in?appUrl=%2F'
return server_process

...but the same isn't done in setup_rsession - could that be the problem?

return {
'command': _get_cmd,
'environment': _get_env,
'launcher_entry': {
'title': 'RStudio',
'icon_path': get_icon_path()
}
}

@orboan
Copy link

orboan commented Sep 16, 2021

I have exactly the same problem. Is there any solution?
From jupyter classic, RStudio launches correctly. This URL problem happens only when launching from jupyterlab.
Has anyone found a workaround?
Thank you

@orboan
Copy link

orboan commented Sep 18, 2021

The path_info is appended in setup_rserver:

server_process = {
'command': _get_cmd,
'environment': _get_env,
'launcher_entry': {
'title': 'RStudio',
'icon_path': get_icon_path()
}
}
if os.environ.get('RSESSION_PROXY_RSTUDIO_1_4', False):
server_process['launcher_entry']['path_info'] = 'rstudio/auth-sign-in?appUrl=%2F'
return server_process

...but the same isn't done in setup_rsession - could that be the problem?

return {
'command': _get_cmd,
'environment': _get_env,
'launcher_entry': {
'title': 'RStudio',
'icon_path': get_icon_path()
}
}

I tried this (appending path_info to setup_rsession), but no success. Same 404 from lab from hub (from classic notebook from hub works fine).

@ryanlovett
Copy link
Collaborator

Fixed by #110.

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

No branches or pull requests

3 participants