Closed rgaiacs closed 19 hours ago
This is easily reproducible with 2024.07.0
. Running jupyter notebook list
inside the container (using docker exec
) shows a different token.
Using the main
branch works, except that I get redirected to http://127.0.0.1:<PORT>/lab
which shows 404 : Not Found
. Changing the URL to http://127.0.0.1:<PORT>/tree
works.
PID 1 is python3 -u /usr/local/bin/repo2docker-entrypoint jupyter notebook --ip=0.0.0.0 --port=<PORT> --NotebookApp.custom_display_url=http://127.0.0.1:<PORT> --NotebookApp.default_url=/lab
so maybe JupyterLab is incompatible with jupyter notebook
, and we need to switch to jupyter server
? @jtpio Does this sound right?
It sounds like the backward-compatibility shims for the new IdentityProvider API in Jupyter Server 2.0 don't quite work to keep the old token config in sync with the new token config in every case. I'll see if I can track it down.
Indeed, this is https://github.com/jupyter-server/jupyter_server/pull/1221 which has more detail on the issue.
essentially, Jupyter Server 2.0 extensions are not actually compatible with notebook < 7. We can mostly work around this by explicitly setting both c.NotebookApp.token
and c.IdentityProvider.token
config to the same value. The result will not be everything fully working, but it will result in either classic notebook (likely not including any extensions upgraded to support jupyter server) or jupyterlab working.
I think the fix is to switch the jupyter notebook
invocation to jupyter server
or jupyter lab
(as we have done in BinderHub)
Upgrading to notebook 7 (#1363) will fix this. As would a smaller patch to change the launch command to jupyter-server
from jupyter-notebook
.
Expected behaviour
http://127.0.0.1:44781/?token=7dd7de0ba3280d147c16fed90617b006cdea0c65ce55c54f will give access Jupyter Lab.
Actual behaviour
http://127.0.0.1:44781/?token=7dd7de0ba3280d147c16fed90617b006cdea0c65ce55c54f asks for the token
Your personal set up