Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No warning in UI when Lab cannot uninstall an extension #15797

Open
ByThePowerOfScience opened this issue Feb 13, 2024 · 8 comments
Open

No warning in UI when Lab cannot uninstall an extension #15797

ByThePowerOfScience opened this issue Feb 13, 2024 · 8 comments

Comments

@ByThePowerOfScience
Copy link

ByThePowerOfScience commented Feb 13, 2024

Description

When you uninstall an extension through the JupyterLab UI's Extension Manager, if Lab is unable to uninstall it, it will just not remove it from the Installed list and prompt the user to refresh the window like normal instead of warning you that you need to uninstall it through pip.

The only way to learn that you must uninstall it through pip is by running jupyter labextension uninstall, which btw sidenote can't print anything if you're running on NodeJS < 18.0.0.

Reproduce

  1. Install frz-variable-analyzer through JupyterLab UI > Extension Manager > Discover.
  2. Attempt to uninstall it through Extension Manager > Installed > "uninstall" button.

Expected behavior

An error message should display indicating that JupyterLab cannot uninstall the extension and the user must uninstall it through pip, and the "on successful uninstall" behavior should not continue.

Context

  • Operating System and version: OSX 12.7.1
  • Browser and version: Firefox
  • JupyterLab version: 4.1.1
Troubleshoot Output
Paste the output from your command line running `jupyter troubleshoot` here, use `--debug` if possible.
$PATH:
	/Library/Frameworks/Python.framework/Versions/3.10/bin
	/usr/local/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin
	/Library/Frameworks/Mono.framework/Versions/Current/Commands

sys.path:
/Library/Frameworks/Python.framework/Versions/3.10/bin
/Library/Frameworks/Python.framework/Versions/3.10/lib/python310.zip
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/lib-dynload
/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages

sys.executable:
/Library/Frameworks/Python.framework/Versions/3.10/bin/python3.10

sys.version:
3.10.4 (v3.10.4:9d38120e33, Mar 23 2022, 17:29:05) [Clang 13.0.0 (clang-1300.0.29.30)]

platform.platform():
macOS-12.7.1-x86_64-i386-64bit

which -a jupyter:
/Library/Frameworks/Python.framework/Versions/3.10/bin/jupyter

pip list:
Package Version
------------------------------------ ---------------
2to3 1.0
accessible-pygments 0.0.4
alabaster 0.7.16
antlr4-python3-runtime 4.7.2
anyio 4.2.0
appnope 0.1.4
argon2-cffi 23.1.0
argon2-cffi-bindings 21.2.0
arrow 1.3.0
asttokens 2.4.1
async-lru 2.0.4
attrs 23.2.0
Babel 2.14.0
beautifulsoup4 4.12.3
bleach 6.1.0
certifi 2021.10.8
cffi 1.16.0
charset-normalizer 3.3.2
comm 0.2.1
debugpy 1.8.1
decorator 5.1.1
defusedxml 0.7.1
docutils 0.20.1
exceptiongroup 1.2.0
executing 2.0.1
fastjsonschema 2.19.1
fqdn 1.5.1
h11 0.14.0
httpcore 1.0.2
httpx 0.26.0
idna 3.6
imagesize 1.4.1
ipykernel 6.29.2
ipython 8.21.0
isoduration 20.11.0
jedi 0.19.1
Jinja2 3.1.3
json5 0.9.14
jsonpointer 2.4
jsonschema 4.21.1
jsonschema-specifications 2023.12.1
jupyter_client 8.6.0
jupyter_core 5.7.1
jupyter-events 0.9.0
jupyter-lsp 2.2.2
jupyter_server 2.12.5
jupyter_server_terminals 0.5.2
jupyterlab 4.1.1
jupyterlab_pygments 0.3.0
jupyterlab_server 2.25.2
latex2sympy2 1.9.1
lib 4.0.0
MarkupSafe 2.1.5
matplotlib-inline 0.1.6
mistune 3.0.2
mpmath 1.3.0
nbclient 0.9.0
nbconvert 7.16.0
nbformat 5.9.2
nest-asyncio 1.6.0
notebook_shim 0.2.3
overrides 7.7.0
packaging 23.2
pandocfilters 1.5.1
parso 0.8.3
pexpect 4.9.0
Pint 0.23
pip 24.0
platformdirs 4.2.0
prometheus-client 0.19.0
prompt-toolkit 3.0.43
psutil 5.9.8
ptyprocess 0.7.0
pure-eval 0.2.2
pycparser 2.21
pydata-sphinx-theme 0.15.2
Pygments 2.17.2
pynput 1.7.6
pyobjc-core 10.1
pyobjc-framework-ApplicationServices 10.1
pyobjc-framework-Cocoa 10.1
pyobjc-framework-CoreText 10.1
pyobjc-framework-Quartz 10.1
python-dateutil 2.8.2
python-json-logger 2.0.7
PyYAML 6.0.1
pyzmq 25.1.2
referencing 0.33.0
requests 2.31.0
rfc3339-validator 0.1.4
rfc3986-validator 0.1.1
rpds-py 0.17.1
Send2Trash 1.8.2
setuptools 58.1.0
six 1.16.0
sniffio 1.3.0
snowballstemmer 2.2.0
soupsieve 2.5
Sphinx 7.2.6
sphinx-book-theme 1.1.1
sphinx-proof 0.1.3
sphinxcontrib-applehelp 1.0.8
sphinxcontrib-devhelp 1.0.6
sphinxcontrib-htmlhelp 2.0.5
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.7
sphinxcontrib-serializinghtml 1.1.10
stack-data 0.6.3
sympy 1.12
terminado 0.18.0
tinycss2 1.2.1
tomli 2.0.1
tornado 6.4
traitlets 5.14.1
types-python-dateutil 2.8.19.20240106
typing_extensions 4.9.0
units 0.7
uri-template 1.3.0
urllib3 2.2.0
wcwidth 0.2.13
webcolors 1.13
webencodings 0.5.1
websocket-client 1.7.0

Copy link

welcome bot commented Feb 13, 2024

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! 🎉

@jupyterlab-probot jupyterlab-probot bot added the status:Needs Triage Applied to new issues that need triage label Feb 13, 2024
@krassowski
Copy link
Member

The default extension manager (using PyPI) does not use Node.js at all. The underlying problem must be different.

juypter labextension can use node if installed though.

The question is why the extension did not get uninstalled from UI. One possibility is that multiple versions were installed, one using the UI extension manager and one using the CLI. Another is a problem with python environment configuration.

@ByThePowerOfScience
Copy link
Author

ByThePowerOfScience commented Feb 13, 2024

The question is why the extension did not get uninstalled from UI. One possibility is that multiple versions were installed, one using the UI extension manager and one using the CLI. Another is a problem with python environment configuration.
I did try installing with pip after the issue presented itself, but it presented itself even after only using the UI to install it.

Upgrading to Node 21 immediately resolved the issue by the way, both allowing jupyter labextension uninstall to give me a valid pip module name to uninstall (since the command itself is deprecated), as well as allowing me to uninstall the extension through the UI.

Regarding order of operations, since I realize that it could have been one plugin blocking the other from uninstalling, I was using frz-jupyterlab-variableinspector and jupyterlab-snippets. After upgrading Node, I uninstalled inspector through pip and snippets through the UI.

I'll go ahead and try to recreate the issue so we can get a good log.

@ByThePowerOfScience
Copy link
Author

ByThePowerOfScience commented Feb 13, 2024

Sure enough, it's Node. I recreated the scenario with both Node v16 (my system version) and Node v21, and the bug only happens while using Node v16.

Commands I ran:

nvm use system   # system = v16.16.0
jupyter lab

The only notable line from the terminal log is this:

[W 2024-02-13 17:33:14.153 LabApp] Could not determine jupyterlab build status without nodejs

On the frontend side, it looks like it can't find the Future type. Here's the JS log:
console-export-2024-2-13_17-36-3.txt

EDIT: Wait, I can't uninstall inspector on v21 either. The extension also has a different name in the "Installed" menu than in the "Discover" menu: "feiranzhang-jupyterlab-variableinspector" instead of "frz-jupyterlab-variableinspector". However, the Python module name is the "frz" one.

I don't think Node has anything to do with this, now. I just tested again and I was able to uninstall "snippet" fine through the UI in v16, but not "inspector". It seems to be an issue with that extension specifically.

@ByThePowerOfScience
Copy link
Author

Edited OP to reflect new error details.

@ByThePowerOfScience ByThePowerOfScience changed the title No error message that you cannot uninstall extensions on node < 18 No warning in UI when Lab cannot uninstall an extension Feb 13, 2024
@krassowski
Copy link
Member

Thank you for investigating further and the additional details.

There might be a bug with PyPI manager not using the package name from install.json for uninstallation (in addition to error reporting issue which needs to be fixed too).

@krassowski krassowski added this to the 4.0.x milestone Feb 14, 2024
@JasonWeill JasonWeill removed the status:Needs Triage Applied to new issues that need triage label Feb 20, 2024
@JasonWeill
Copy link
Contributor

Regarding the lack of output with Node <18; all versions of Node before 18 are no longer being maintained, so we encourage everyone to be using 18 or later. See https://nodejs.org/en/about/previous-releases for details.

@Entgenieur
Copy link

Entgenieur commented Apr 15, 2024

Had the same issue with frz-jupyterlab-variableinspector. Couldnt disable or uninstall with UI. pip uninstall worked for me

Using JupyterLab DesktopApp for Windows

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants