jupyterlab / jupyterlab-desktop

JupyterLab desktop application, based on Electron.
BSD 3-Clause "New" or "Revised" License
3.75k stars 365 forks source link

Prebuilt extension axlair/jupyterlab-vim does not load anymore #379

Open dirkroorda opened 2 years ago

dirkroorda commented 2 years ago

Description

jupyterlab-vim is a prebuilt extension, installable by pip install jupyterlab-vim.

Yet it does not work in the newest version of JupyterLab desktop (3.2.5-2) In the previous version of JupyterLab desktop I managed to get it working after a bit of refreshing the page.

Reproduce

  1. install jupyterlab-desktop (single user, so packages can be installed)
  2. in a code cell: %pip install jupyterlab-vim; it will run successfully
  3. restart the kernel, refresh the page, restart the app
  4. open a notebook and observe that jupyterlab-vim does not work; we are not in vim normal mode, and we do not get there by pressing Esc.
bad

Expected behaviour

In step 4 one should in vim normal mode, having a green block cursor, and pressing i or a should bring you in insert mode with a thin cursor.

This is from ordinary jupyterlab:

Vim normal mode:

good

after pressing a we are in insert mode:

good2

Observations

It happens both in the bundled Python environment (where I %pip install jupyterlab-vim) as in my system python environment (python 3.10.0 with jupyterlab-vim already installed).

In the developer tools (View->Toggle Developer Tools) there is something irregular. See below.

Context

Troubleshoot Output I do not do this, because it lists my system python, although I am working in the prebuilt environment! Here you see the bottom bar indicating that I'm in the prebuilt environment, but it lists `python-Levenshtein` which is a module from my system environment. hm
Browser Output (required for interface issues after loading)
Failed to load resource: http://localhost:8888/vendors-node_modules_codemirror_keymap_vim_js.browser.bundle.js the server responded with a status of 404 (Not Found)

Uncaught (in promise) ChunkLoadError: Loading chunk vendors-node_modules_codemirror_keymap_vim_js failed.
(error: http://localhost:8888/vendors-node_modules_codemirror_keymap_vim_js.browser.bundle.js)
    at Object.__webpack_require__.f.j (browser.bundle.js:310168)
    at browser.bundle.js:309590
    at Array.reduce ()
    at Function.__webpack_require__.e (browser.bundle.js:309589)
    at CodeMirrorSingleton.ensureVimKeymap (browser.bundle.js:43145)
    at localhost:8888/lab/extensions/@axlair/jupyterlab_vim/static/568.2a96b0eb36f0a81bc69a.js:1

11:13:13.051 › Loading chunk vendors-node_modules_codemirror_keymap_vim_js failed.
(error: http://localhost:8888/vendors-node_modules_codemirror_keymap_vim_js.browser.bundle.js)

Logs (required for issues with loading, server and startup) (I have replaced the path to my home directory by `~`).
Paste the logs from the mian.log file here.
[2021-12-20 12:02:00.979] [info]  In production mode
[2021-12-20 12:02:00.982] [info]  Logging to file (~/Library/Logs/jupyterlab-desktop/main.log) at 'false' level
[2021-12-20 12:02:01.042] [error] (node:3454) DeprecationWarning: findLogPath() is deprecated and will be removed in v5.
(Use `JupyterLab --trace-deprecation ...` to show where the warning was created)
[2021-12-20 12:02:03.769] [error] (node:3454) electron: The default of nativeWindowOpen is deprecated and will be changing from false to true in Electron 15.  See https://github.com/electron/electron/issues/28511 for more information.
[2021-12-20 12:02:04.496] [info]  Jupyter Server initialization message: ~/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use '' instead of '""' if you require traitlets >=5.
  warn(
~/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/traitlets/traitlets.py:2202: FutureWarning: Supporting extra quotes around strings is deprecated in traitlets 5.0. You can use '*' instead of '"*"' if you require traitlets >=5.
  warn(
[I 2021-12-20 12:02:04.496 ServerApp] jupyterlab | extension was successfully linked.

[2021-12-20 12:02:04.737] [info]  Jupyter Server initialization message: [I 2021-12-20 12:02:04.737 ServerApp] nbclassic | extension was successfully linked.

[2021-12-20 12:02:04.770] [info]  Jupyter Server initialization message: [I 2021-12-20 12:02:04.770 ServerApp] nbclassic | extension was successfully loaded.

[2021-12-20 12:02:04.771] [info]  Jupyter Server initialization message: [I 2021-12-20 12:02:04.771 LabApp] JupyterLab extension loaded from ~/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/jupyterlab
[I 2021-12-20 12:02:04.771 LabApp] JupyterLab application directory is ~/Applications/JupyterLab.app/Contents/Resources/jlab_server/share/jupyter/lab

[2021-12-20 12:02:04.775] [info]  Jupyter Server initialization message: [I 2021-12-20 12:02:04.775 ServerApp] jupyterlab | extension was successfully loaded.

[2021-12-20 12:02:04.776] [info]  Jupyter Server initialization message: [I 2021-12-20 12:02:04.776 ServerApp] Serving notebooks from local directory: ~

By the way: I cannot pip-uninstall modules from within the desktop app, because pip asks for confirmation, and there is no way to answer with Y.

When uninstalling by means of %pip --no-input uninstall jupyterlab-vim I get an error:

ERROR: Exception:
Traceback (most recent call last):
  File "/Users/werk/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 164, in exc_logging_wrapper
    status = run_func(*args)
  File "/Users/werk/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/pip/_internal/commands/uninstall.py", line 97, in run
    uninstall_pathset = req.uninstall(
  File "/Users/werk/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 671, in uninstall
    uninstalled_pathset.remove(auto_confirm, verbose)
  File "/Users/werk/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/pip/_internal/req/req_uninstall.py", line 378, in remove
    if auto_confirm or self._allowed_to_proceed(verbose):
  File "/Users/werk/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/pip/_internal/req/req_uninstall.py", line 418, in _allowed_to_proceed
    return ask("Proceed (Y/n)? ", ("y", "n", "")) != "n"
  File "/Users/werk/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 187, in ask
    _check_no_input(message)
  File "/Users/werk/Applications/JupyterLab.app/Contents/Resources/jlab_server/lib/python3.8/site-packages/pip/_internal/utils/misc.py", line 179, in _check_no_input
    raise Exception(
Exception: No input was expected ($PIP_NO_INPUT set); question: Proceed (Y/n)? 

So I could not experiment with uninstalling and reinstalling the package again.

Screenshot:

bug
welcome[bot] commented 2 years ago

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! :hugs:
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! :wave:
Welcome to the Jupyter community! :tada:

krassowski commented 2 years ago

Thank you for they report. I can reproduce this and will take a look at fixing this over the weekend.

atinylittleshell commented 2 years ago

@krassowski any luck with this?

rchavp commented 2 years ago

Any update on this issue. I've tried the last 6 versions and all of them stall after installing the vim plugin.

Alternatively, any pointers on how to troubleshoot this ourselves then?

Thanks.

mbektas commented 1 year ago

@rchavp is this still an issue with the latest version 3.6.1-1?

dirkroorda commented 1 year ago

I gave the latest version a try, a couple of days ago. I had some kernel trouble when using my existing Python. Still jupyterlab-vim does not work, don't see clear error messages, and there is no extensions tab on the interface.

So, for the time being I give up For me personally I do not see any advantage of the Desktop version above the regular version.