Error 404 in jupyterlab 4.0.5

Hello!
I have the following issue:
I have a server where I install jupyterhub with jupyterlab. Recently, I updated the Python version to 3.11 and I also updated the version of the libraries to the latest. The updates include the installation of notebook 7.x, jupyterlab 4.x and jupyterhub 4.x. After the installation jupyterhub is active and I can login with the credentials of the allowed users. But, after the login, the server should return the endpoint (/lab) and this operation return an error 404, not found.

The server has not access to internet, just a private network. So I have to download the whl of the libraries and then installed manually. These are the installed versions:


Package                      Version
---------------------------- ---------
alembic                      1.11.1
ansiwrap                     0.8.4
anyio                        3.7.1
argon2-cffi                  21.3.0
argon2-cffi-bindings         21.2.0
arrow                        1.2.3
asttokens                    2.2.1
async-generator              1.10
async-lru                    2.0.4
attrs                        23.1.0
Babel                        2.12.1
backcall                     0.2.0
beautifulsoup4               4.12.2
bleach                       6.0.0
certifi                      2023.7.22
certipy                      0.1.3
cffi                         1.15.1
charset-normalizer           3.2.0
click                        8.1.6
comm                         0.1.4
contourpy                    1.1.0
cryptography                 41.0.2
cycler                       0.11.0
debugpy                      1.6.7
decorator                    5.1.1
defusedxml                   0.7.1
entrypoints                  0.4
executing                    1.2.0
fastjsonschema               2.18.0
focuslibrary                 0.1.2
focuspy                      1.0
fonttools                    4.41.1
fqdn                         1.5.1
future                       0.18.2
greenlet                     2.0.2
idna                         3.4
ipykernel                    6.25.1
ipynb                        0.5.1
ipython                      8.14.0
isoduration                  20.11.0
jedi                         0.19.0
Jinja2                       3.1.2
json5                        0.9.14
jsonpointer                  2.4
jsonschema                   4.19.0
jsonschema-specifications    2023.7.1
jupyter_client               8.3.0
jupyter_core                 5.3.1
jupyter-events               0.7.0
jupyter-lsp                  2.2.0
jupyter_server               2.7.0
jupyter_server_terminals     0.4.4
jupyter-telemetry            0.1.0
jupyterhub                   4.0.1
jupyterhub-ldapauthenticator 1.3.2
jupyterlab                   4.0.5
jupyterlab-pygments          0.2.2
jupyterlab_server            2.24.0
kiwisolver                   1.4.4
ldap3                        2.9.1
Mako                         1.2.4
MarkupSafe                   2.1.3
matplotlib                   3.7.2
matplotlib-inline            0.1.6
mistune                      3.0.1
nbclient                     0.8.0
nbconvert                    7.7.3
nbformat                     5.9.2
nest-asyncio                 1.5.7
notebook                     7.0.2
notebook_shim                0.2.3
numpy                        1.25.1
oauthlib                     3.2.2
overrides                    7.4.0
packaging                    23.1
pamela                       1.1.0
pandas                       2.0.3
pandocfilters                1.5.0
papermill                    2.4.0
parso                        0.8.3
pexpect                      4.8.0
pickleshare                  0.7.5
Pillow                       10.0.0
pip                          23.1.2
platformdirs                 3.10.0
prometheus-client            0.17.1
prompt-toolkit               3.0.39
psqlManager                  2.0
psutil                       5.9.5
psycopg2-binary              2.9.6
ptyprocess                   0.7.0
pure-eval                    0.2.2
pyasn1                       0.5.0
pycparser                    2.21
Pygments                     2.15.1
pyOpenSSL                    23.2.0
pyparsing                    3.0.9
python-dateutil              2.8.2
python-json-logger           2.0.7
pytz                         2023.3
PyYAML                       6.0.1
pyzmq                        25.1.0
referencing                  0.30.2
requests                     2.31.0
rfc3339-validator            0.1.4
rfc3986-validator            0.1.1
rpds-py                      0.9.2
ruamel.yaml                  0.17.32
ruamel.yaml.clib             0.2.7
scipy                        1.11.1
Send2Trash                   1.8.2
setuptools                   65.5.0
six                          1.16.0
sniffio                      1.3.0
soupsieve                    2.4.1
SQLAlchemy                   2.0.19
stack-data                   0.6.2
stomper                      0.4.3
sudospawner                  0.5.2
tenacity                     8.2.2
terminado                    0.17.1
textwrap3                    0.9.2
tinycss2                     1.2.1
tornado                      6.3.2
tqdm                         4.65.0
traitlets                    5.9.0
typing_extensions            4.7.1
tzdata                       2023.3
uri-template                 1.3.0
urllib3                      2.0.4
wcwidth                      0.2.6
webcolors                    1.13
webencodings                 0.5.1
websocket-client             1.2.1

During the installation process, there are two steps where I have doubts about:

The first one is the generation of the lab folder. As no external connection are allowed, I have to install the libraries in another machine with Internet. Then, I execute the command

jupyter lab build

After the process is finished, I generate an tgz with this lab folder and I copy it to the correct path of the folder where I extract it.

The second step, I used to execute the command:

jupyter serverextension enable --py jupyterlab --user

to allow jupyterlab in the server. But, with the new version of notebook, serverextension is not installed anymore so this step fails. I am not really sure, if there another command for archiving the same goal.

Anyone knows, what could be the error?

Thanks!

Hello!
Finally, I discover the error. The command jupyter serverextension enable --py jupyterlab --user was needed, but as the jupyter-serverextension is no longer a binary provides by Notebook there is an alternative:

jupyter server extension enable --py jupyterlab --user

With this command I could load the lab page.
Thanks!

1 Like

Thanks. I also found some similar error 404: Not Found You are requesting a page that does not exists! during developing my own extension with backend service. I use this command to solve similar problems.

jupyter server extension enable --py jupyterlab-extension-name --user

1 Like