Websocket and 404 /api/me error on Jupyterlab

Hey there!

In my workplace we are currently using jupyterhub with k8s to assign servers to our employees. Currently, we are migrating our extensions to jupyterlab but I’m getting these two errors.

The first one is Failed to load resource: the server responded with a status of 404 (Not Found) - api/me?1690792071338:1. Apparently this api call doesn’t exist and I’m not sure why.

The second one is a websocket related issue: WebSocket connection to 'ws://mycompanyurl/user/my-username/api/events/subscribe?token=tzARtKshtYpLPEboUBdyto4tulBVVE' failed: jlab_core.0faecc546c73b7263d33.js?v=0faecc546c73b7263d33:1

Currently I’m using jupyterhub==4.0.1 and for the single user servers they are using jupyterhub==4.0.1, jupyterlab==4.0.3, jupyter-server==2.7.0 and jupyterlab-server==2.24.0 (we provide both user interfaces).

I don’t have any of these issues in my own laptop when I use just jupyterlab. This is a problem that I get when using both jupyterhub + jupyterlab


1 Like

JupyterHub doesn’t provide these endpoints, Jupyter Server does. Are you sure that the single-user server is running Jupyter Server and not the legacy Notebook server? It would be the default, but you can ensure it with:

c.Spawner.environment.update({"JUPYTERHUB_SINGLEUSER_APP": "jupyter-server"})

Sharing the startup logs from jupyter-server may help (it logs which server it’s using).

Oh god, thanks for that line. Now is fixed :smiley: