ExtensionApp works fine in JupyterLab but not in JupyterHub environment

I have an ExtensionApp that works fine in a JupyterLab environment, however when I try to reach the endpoint in a JupyterHub environment it returns a 404.

The ExtensionApp and RouteHandler are here: etc_jupyterlab_mads_server_extension/handlers.py at b3d3f185888095f2eac3d78e51561ce70339a3e4 · educational-technology-collective/etc_jupyterlab_mads_server_extension · GitHub

I was wondering if anyone can see anything that might prevent it from working in a JupyterHub environment. The JupyterHub environment is running both Notebook and Lab - not sure if that makes any difference. The 404 is observed in the console when changing the end of the URL from tree to lab.

I am posting here because it is a JupyterLab extension.

My guess is that you’ll need to configure JupyterHub to use jupyter_server for it’s single-user server base class. By default, JupyterHub still uses the classic notebook server and runs JupyterLab as a “classic” server extension.

Here is the Hub documentation for switching to jupyter_server. You’ll need to set the JUPYTERHUB_SINGLEUSER_APP variable to point at jupyter_server’s ServerApp.

1 Like