jupyter-server-proxy icon indicating copy to clipboard operation
jupyter-server-proxy copied to clipboard

GET /server-proxy/server-infos net::ERR_TOO_MANY_REDIRECTS with notebook 6.5.7 and JupyterHub >= 4

Open cmd-ntrf opened this issue 1 year ago • 3 comments
trafficstars

Bug description

When running notebook 6.5.7, nbclassic 1.1.0 and JupyterHub >=4, ServersInfoHandler cannot be reached by the Javascript client code.

How to reproduce

  1. Create a virtual environment
  2. Install the following dependencies: jupyterhub 'notebook<7' jupyterlab jupyter-server-proxy
  3. Authenticate on the hub
  4. Look at the browser console

Expected behaviour

The javascript client code should be able to reach the server-proxy handler to get a list of available servers.

Actual behaviour

The javascript client code cannot reach the server-proxy handler, because it is missing the XSRF header.

More info

Adding the following function to ServersInfoHandler fixed the issue, but I am not sure it is what we want in the long run:

    def check_xsrf_cookie(self):
        pass

cmd-ntrf avatar Nov 11 '24 21:11 cmd-ntrf

nbclassic is a different package to notebook<7. Which one are you using?

manics avatar Nov 11 '24 22:11 manics

pip install 'notebook<7' currently installs notebook 6.5.7, which depends on nbclassic. Therefore, to your question, I guess both?

From PyPI:

Maintenance and security-related issues only are now being addressed in the 6.5.x branch. It depends on nbclassic for the HTML/JavaScript/CSS assets.

cmd-ntrf avatar Nov 11 '24 23:11 cmd-ntrf

@manics : I have edited the title and issue to clarify what I am using.

cmd-ntrf avatar Nov 12 '24 14:11 cmd-ntrf