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

the launch-jupyter page shows button when it shouldn't #370

Closed
rokroskar opened this issue Jan 23, 2019 · 8 comments
Closed

the launch-jupyter page shows button when it shouldn't #370

rokroskar opened this issue Jan 23, 2019 · 8 comments
Assignees
Labels

Comments

@rokroskar
Copy link
Member

It might happen that the tokens are expired stale in which case the launch-jupyter dialog (in the image below) is not fully presented. Instead of the full form, the user just sees the "launch jupyter" button, which doesn't actually do anything. This should be corrected either from the gateway side (get a new token) or the UI side (not sure how).

image

@rokroskar rokroskar added the bug label Jan 23, 2019
@ableuler
Copy link
Contributor

ableuler commented Feb 11, 2019

I think the gateway can not do this independently of the UI because as far as I can see, Jupyterhub does not issue any refresh tokens. So the entire the entire oAuth dance with Jupyterhub will have to be performed in order to obtain a new token.

How does Jupyterhub respond when the request contains an expired token?

@rokroskar
Copy link
Member Author

I'm not sure -- the issue is more that the "Launch Server" button is there, but the form isn't. So there is probably a broken request somewhere that causes the form not to render, but the same failure doesn't prevent the button from being rendered, or better, to cause some sort of a re-login.

@ableuler
Copy link
Contributor

Yes, the the request for the server options is most likely failing due to and expired token and thus re-login with Jupyterhub is needed. I'm just wondering how this is best done.

@rokroskar
Copy link
Member Author

presumably it returns a 401 or 403 but I haven't tried.

see c.JupyterHub.cookie_max_age_days here: https://jupyterhub.readthedocs.io/en/stable/api/app.html

It's a float so it should be possible to set it to something sufficiently small for testing.

@ableuler
Copy link
Contributor

ableuler commented Feb 28, 2019

I don’t think that c.JupyterHub.cookie_max_age_days sets the expiration time of the oAuth access token. But here's a way to reproduce the problem:

  • log into renku through the ui
  • browse to https://<renku-domain>/jupyterhub/hub/token and revoke the access token
  • delete all jupyterhub cookies in your browser for your renku-domain
  • try to launch a notebook

Does this work (well fail) @vfried ?

@vfried
Copy link
Contributor

vfried commented Mar 1, 2019

I don’t think that c.JupyterHub.cookie_max_age_days sets the expiration time of the oAuth access token. But here's a way to reproduce the problem:

  • log into renku through the ui
  • browse to https://<renku-domain>/jupyterhub/hub/token and revoke the access token
  • delete all jupyterhub cookies in your browser for your renku-domain
  • try to launch a notebook

Does this work (well fail) @vfried ?

For some reason this only works when i'm not running telepresence :(

@vfried
Copy link
Contributor

vfried commented Mar 1, 2019

I've been trying to replicate the error when i'm using telepresence but i can't. It looks like the bug is still there but it slightly changed, after i do the steps that @ableuler mentioned it show's a "The server is already running" message but when i try to connect to jupyterlab it throws a 505 error which means that the bug is still there but it changed a bit. I will try to fix the error that i see when using telepresence, I assume the version i can run with telepresence is the latest version that we have of the frontend. If this is not ok, please tell me and i will find a way of replicating the error as described in the bug.

@vfried
Copy link
Contributor

vfried commented Mar 20, 2019

I've been trying to fix this bug and I realised that on top of receiving the proper error message, and logging out/in, the jupyterhub pod has to be "killed" in the backend so I can launch again jupyterlab otherwise it doesn't work.

.... Actually, i was deleting an extra pod in /jupyterhub/hub/token. If the token for the running server doesn't expire logout/login should work.

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

4 participants