jupyterlab / jupyterlab-git

A Git extension for JupyterLab

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

get 404 with jupyterlab behind nginx

cjbd opened this issue · comments

commented

Description

Hello, I follow this article to put my jupyterlab behind nginx, it's working fine

But when I install jupyterlab-git extension with pip, I always get this error message in the front end:
image

and from the console output, I can see error log like this:

[W 2023-03-20 03:38:17.634 ServerApp] 404 GET /git/settings?version=0.41.0&1679283497734 
(172.18.0.1) 0.81ms

Reproduce

  1. pip install jupyterlab-git
  2. reload jupyterlab
  3. check error message in both front end and back end

Expected behavior

jupyterlab-git extension should work like without nginx

Context

  • Python package version:
# pip show jupyterlab-git
Name: jupyterlab-git
Version: 0.41.0
Summary: A JupyterLab extension for version control using git
Home-page: https://github.com/jupyterlab/jupyterlab-git
Author: Jupyter Development Team
Author-email: 
License: BSD-3-Clause
Location: /opt/miniconda3/lib/python3.8/site-packages
Requires: jupyter-server, nbdime, nbformat, packaging, pexpect, traitlets
Required-by: 
  • Extension version:
# jupyter labextension list
JupyterLab v3.4.4
/opt/miniconda3/share/jupyter/labextensions
        catboost-widget v1.0.0 enabled OK
        jupyterlab_pygments v0.2.2 enabled OK (python, jupyterlab_pygments)
        jupyterlab-plotly v5.13.1 enabled OK
        nbdime-jupyterlab v2.1.1 enabled OK
        @jupyter-widgets/jupyterlab-manager v5.0.5 enabled OK (python, jupyterlab_widgets)
        @bokeh/jupyter_bokeh v3.0.5 enabled OK (python, jupyter_bokeh)
        @pyviz/jupyterlab_pyviz v2.2.1 enabled OK (python, pyviz_comms)
        @jupyter-server/resource-usage v0.7.2 enabled  X (python, jupyter-resource-usage)
        @jupyterlab/git v0.41.0 enabled OK (python, jupyterlab-git)


"@jupyter-server/resource-usage@0.7.2" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension      Package
>=3.4.4 <3.5.0          >=3.5.1 <4.0.0 @jupyterlab/application
>=3.4.4 <3.5.0          >=3.5.1 <4.0.0 @jupyterlab/apputils
>=3.4.4 <3.5.0          >=3.5.1 <4.0.0 @jupyterlab/console
>=5.4.4 <5.5.0          >=5.5.1 <6.0.0 @jupyterlab/coreutils
>=3.4.4 <3.5.0          >=3.5.1 <4.0.0 @jupyterlab/notebook
>=6.4.4 <6.5.0          >=6.5.1 <7.0.0 @jupyterlab/services
>=3.4.4 <3.5.0          >=3.5.1 <4.0.0 @jupyterlab/statusbar
>=3.4.4 <3.5.0          >=3.5.1 <4.0.0 @jupyterlab/translation


Other labextensions (built into JupyterLab)
   app dir: /opt/miniconda3/share/jupyter/lab
        jupyterlab-dash v0.4.2 enabled OK


Build recommended, please run `jupyter lab build`:
    jupyterlab-dash needs to be included in build
  • Git version:
# git --version
git version 2.25.1
  • Operating System and its version:
Command Line Output
[W 2023-03-20 03:38:17.634 
ServerApp] 404 GET /git/settings?
version=0.41.0&1679283497734 
(172.18.0.1) 0.81ms referer=None
Web Browser Output
69.6374f7d6f5f3a1e80ebc.js?v=6374f7d6f5f3a1e80ebc:1 Failed to load the jupyterlab-git server extension settings Error: Git server extension is unavailable. Please ensure you have installed the JupyterLab Git server extension by running: pip install --upgrade jupyterlab-git. To confirm that the server extension is installed, run: jupyter server extension list.
    at 69.6374f7d6f5f3a1e80ebc.js?v=6374f7d6f5f3a1e80ebc:1:177876
    at async activate (69.6374f7d6f5f3a1e80ebc.js?v=6374f7d6f5f3a1e80ebc:1:177406)

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

Hey @cjbd it is likely because the server extension part of this extension is not enable. Could you execute

jupyter server extension list

commented

@fcollonval thanks for the update, pls find command output, it's enabled

# jupyter server extension list
Config dir: /root/.jupyter

Config dir: /opt/miniconda3/etc/jupyter
    jupyter_resource_usage enabled
    - Validating jupyter_resource_usage...
      jupyter_resource_usage 0.7.2 OK
    jupyter_server_mathjax enabled
    - Validating jupyter_server_mathjax...
      jupyter_server_mathjax  OK
    jupyterlab enabled
    - Validating jupyterlab...
      jupyterlab 3.4.4 OK
    jupyterlab_git enabled
    - Validating jupyterlab_git...
      jupyterlab_git 0.41.0 OK
    nbclassic enabled
    - Validating nbclassic...
      nbclassic 0.5.2 OK
    nbdime enabled
    - Validating nbdime...
      nbdime 3.1.1 OK
    notebook_shim enabled
    - Validating notebook_shim...
      notebook_shim  OK
    panel.io.jupyter_server_extension enabled
    - Validating panel.io.jupyter_server_extension...
      panel.io.jupyter_server_extension  OK

Config dir: /usr/local/etc/jupyter
commented

something that might not be relevant to this, i also had trouble with panel extension, it was giving simlar 404 error for /panel/...
just now i found that if i don't use nginx and launch jupyterlab from localhost, the panel extension is working fine, while git extension is still giving 404 error in the command console

Do you filter endpoints?

If yes you are likely filtering the endpoints of this extension?

commented

@fcollonval no, i don't know how to do that...