question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jupyter-server-proxy lab extension cannot be disabled

See original GitHub issue

Bug description

After running the jupyter labextension disable command on jupyter-server-proxy, the extension is still being loaded.

jupyter labextension disable @jupyterlab/server-proxy

Expected behaviour

The server extension should still be loaded, but the frontend extension should not be activated when loading jupyterlab.

Actual behaviour

The jupyterlab extension is activated regardless of the enable/disable status of jupyter-server-proxy labextension status.

How to reproduce

In a virtual environment:

  1. pip install jupyterlab jupyter-server-proxy jupyter-rsession-proxy
  2. jupyter labextension disable @jupyterlab/server-proxy
  3. jupyter lab
  4. The RStudio button still shows up in Jupyterlab launcher.

More details

The reason why I want to disable the jupyterlab extension while maintaining the server extension is because I have an extension that handles the server proxy launcher items instead of jupyter-server-proxy (i.e: jupyter-lmod).

I suspect the issue stems from the way jupyter-server-proxy install its lab extension using setup.py instead of using the jupyter labextension commands. What leads me to think that is that if I try to uninstall just the lab extension of jupyter-server-proxy like this:

$ jupyter labextension uninstall @jupyterlab/server-proxy

I am greeted with the following message:

JupyterLab cannot uninstall @jupyterlab/server-proxy since it was installed outside of JupyterLab. Use the same method used to install this extension to uninstall this extension.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
bollwyvlcommented, Feb 16, 2022

Yeah, a PR with the ID change would be fine… but perhaps a README or docs PR with a description of how to disable it, and warning that the ID will change, could be merged more quickly.

upstream: i feel like we should be able to disable things by the package name reported in the CLI, irrespective of what an extension author decided to call it, and kinda surprised it doesn’t work that way today.

1reaction
cmd-ntrfcommented, Feb 16, 2022

Ah yes! Thank you! Using the correct plugin id did the trick.

What was counter-intuitive is that jupyter labextension list was reporting @jupyterlab/server-proxy as being installed and disabled. But I now understand that the command returns the name of the package and its state from {prefix}/etc/jupyter/labconfig/page_config.json, regardless of the actual plugin id in index.ts..

I also expiremented renaming the id to @jupyterlab/server-proxy:plugin and rebuilding the extension. The extension could then correctly be disabled with the command suggested in jupyterlab documentation, i.e:

jupyter labextension disable @jupyterlab/server-proxy

Would you like me to do a PR for the id change ? I understand it would have to sit unmerged until a 4.0 release is near.

Read more comments on GitHub >

github_iconTop Results From Across the Web

jupyter-server-proxy - PyPI
The jupyter labextension list will incorrectly report the extension as still being enabled after executing the disable command.
Read more >
Error loading Jupyter Notebook Extensions - Stack Overflow
I solved this problem by removing jupyter-notebook, jupyter_contrib_nbextensions, and jupyter_nbextensions_configurator, and starting it from ...
Read more >
Troubleshooting — JupyterHub 3.1.0 documentation
Launching Jupyter Notebooks to run as an externally managed JupyterHub service with the jupyterhub-singleuser command returns a JUPYTERHUB_API_TOKEN error#.
Read more >
Unable to get jupyter server proxy working on theia - General
I have installed jsp using the command “pip install jupyter-server-proxy” and proceeded to ... npm install && npm run build && jupyter labextension...
Read more >
JupyerLab CLI command overview — Mastering JupyterLab
The default application path can be found using `jupyter lab path`. ... packages when any changes are made to any Python src files...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found