microsoft / vscode-jupyter

VS Code Jupyter extension
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
MIT License
1.25k stars 275 forks source link

Alongside the crashing of extensions, the kernel can't get connected to a valid interpreter. #15792

Open Bondopadhyay opened 2 weeks ago

Bondopadhyay commented 2 weeks ago

Type: Performance Issue

It starts right after launching VS Code. Especially to use a Python interpreter, each time the Jupyter extension has to be reinstalled. Even, sometimes, after reinstalling the same, the problem persists.

VS Code version: Code 1.90.1 (611f9bfce64f25108829dd295f54a6894e87339d, 2024-06-11T21:01:24.262Z) OS version: Windows_NT x64 10.0.19045 Modes:

System Info |Item|Value| |---|---| |CPUs|AMD Ryzen 7 5800HS with Radeon Graphics (16 x 3194)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|7.41GB (1.08GB free)| |Process Argv|--crash-reporter-id 311de45a-6d4c-43ad-a1cf-634c4ec6871c| |Screen Reader|no| |VM|0%|
Process Info ``` CPU % Mem MB PID Process 0 107 11052 code main 0 193 5132 window [1] (P_5_Working_with_Geometries_DDb.ipynb - DuckDB - Visual Studio Code) 0 69 5820 fileWatcher [1] 0 216 10256 extensionHost [1] 0 59 3248 electron-nodejs (server.js ) 0 26 7196 "C:\Program Files\Docker\Docker\resources\bin\docker.exe" context ls --format "{{json .}}" 0 11 2520 C:\Windows\system32\conhost.exe 0x4 0 64 11420 electron-nodejs (languageserver.js ) 0 68 13336 "C:\Users\AdminAnirban\AppData\Local\Programs\Microsoft VS Code\Code.exe" "c:\Users\AdminAnirban\AppData\Local\Programs\Microsoft VS Code\resources\app\extensions\json-language-features\server\dist\node\jsonServerMain" --node-ipc --clientProcessId=10256 1 105 18040 "C:\Users\AdminAnirban\AppData\Local\Programs\Microsoft VS Code\Code.exe" c:\Users\AdminAnirban\.vscode\extensions\streetsidesoftware.code-spell-checker-3.0.1\packages\_server\dist\main.cjs --node-ipc --clientProcessId=10256 0 72 10952 ptyHost 0 4 14180 C:\Windows\System32\cmd.exe 0 6 14916 conpty-agent 0 101 11424 window 0 28 12644 crashpad-handler 1 116 14252 gpu-process 0 101 15108 shared-process 0 40 16180 utility-network-service 0 102 18512 window [2] (Issue Reporter) ```
Workspace Info ``` | Window (P_5_Working_with_Geometries_DDb.ipynb - DuckDB - Visual Studio Code) | Folder (DuckDB): more than 23992 files | File types: py(7017) pyc(6915) pyi(2114) txt(110) pyd(102) c(66) | lib(66) js(62) h(60) afm(60) | Conf files: package.json(5) settings.json(2); ```
Extensions (41) Extension|Author (truncated)|Version ---|---|--- All-Autocomplete|Ati|0.0.26 vscode-django|bat|1.15.0 path-intellisense|chr|2.9.0 dbclient-jdbc|cwe|1.3.5 duckdb-packs|cwe|1.0.0 vscode-mysql-client2|cwe|7.4.9 python-environment-manager|don|1.2.4 python-extension-pack|don|1.7.0 arcgis-maps-sdk-js-snippets|Esr|1.0.0 sqltools-duckdb-driver|Evi|0.10.2 code-runner|for|0.12.2 gc-excelviewer|Gra|4.2.59 vsc-python-indent|Kev|1.18.0 rainbow-csv|mec|3.12.0 vscode-docker|ms-|1.29.1 debugpy|ms-|2024.6.0 python|ms-|2024.8.1 vscode-pylance|ms-|2024.6.1 jupyter|ms-|2024.5.2024052901 jupyter-keymap|ms-|1.1.2 jupyter-renderers|ms-|1.0.18 vscode-jupyter-cell-tags|ms-|0.1.9 vscode-jupyter-slideshow|ms-|0.1.6 remote-containers|ms-|0.369.0 js-debug-nightly|ms-|2024.6.1417 vscode-speech|ms-|0.10.0 sqltools|mtx|0.28.3 autodocstring|njp|0.6.1 convert-css-in-js|pau|1.1.3 phind|phi|0.25.2 duckdb-sql-tools|Ran|1.4.0 geo-data-viewer|Ran|2.6.0 r-debugger|RDe|0.5.4 r|REd|2.8.4 LiveServer|rit|5.7.9 vscode-arcgis-js-api-module-butler|Sco|1.0.2 code-spell-checker|str|3.0.1 intellicode-api-usage-examples|Vis|0.2.8 vscodeintellicode|Vis|1.3.1 jinja|who|0.0.8 dictionary-completion|yzh|1.3.1
A/B Experiments ``` vsliv368cf:30146710 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscorecescf:30445987 vscod805:30301674 binariesv615:30325510 vsaa593:30376534 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyonecf:30548226 962ge761:30959799 pythongtdpath:30769146 welcomedialog:30910333 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 chatpanelt:31048053 dsvsc021:30996838 9c06g630:31013171 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 pythonprt:31056678 dwnewjupyter:31046869 ```
DonJayamanne commented 1 week ago

I'm sorry for failing to get back to you on this issue. Please can you disable all extensions except for Jupyter and Python extension and see if you run into this same issue. If you continue to run into this, please can you provide more information by what you mean by crashing of extensions Can you share screenshots or some logs.

Bondopadhyay commented 1 week ago

I temporarily resolved the issue from my end.

Your assisting ways are the very basic ones, and most of the users follow them before opening an issue. I too did and it did not help

Running biscet did not help. I uninstalled and installed VS Code. The proper reason is still unknown.

I will reopen it if any problems are again faced.

Bondopadhyay commented 1 week ago

The problem(s) still persist.

  1. All extensions are updated. It did not resolve.
  2. Then I used pre-release versions. The issue still persisted.
  3. Sometimes, the webview is failing to open a .pynb file. Hence, I run VS code with admin-permission. Sometimes, it helps. Sometimes, it does not.
  4. Biscet did not help, either.
  5. I removed VS and installed it again ( Note - I did not brute-delete all VS-code extensions from the PC. However, I cleaned the cache before installing again.)

These trial-and-error stages are very unintelligent to me and I want constructive steps to run it again healthily, without messing up my current setup.

https://github.com/microsoft/vscode-jupyter/assets/59864902/20952c56-6535-44a1-a87d-06cafdad3857

vs4 vs3 vs2 vs1
DonJayamanne commented 6 days ago

Lets try to focus on one issue at a time, you seem to be trying a few things and running into multiple issues.

Sometimes, the webview is failing to open a .pynb file. Hence, I run VS code with admin-permission. Sometimes, it helps. Sometimes, it does not.

Has this been resolved? if this isn't resolved, or if you're running into this often, then you have an issue with the VS Code setup and that could be causing other issues. Lets try to get this fixed first.

Detecting Kernels

Based on the screenshots kernels are not getting discovered.

Please could you enable logging as follows:

Please remember to share both Jupyter and Python logs.

Bondopadhyay commented 6 days ago

Lets try to get this fixed first.

Yes. This can be resolved at first.

Can you share the logs from the Python output panel, using the command Python: Show Output Similarly can you enable verbose logging for Jupyter extension then share the logs for the same using the command Python: Show Output.

I could not repro the same.

Change the value to verbose

I could not find the verbose before when I was trying. A screen-rec has been attached.

https://github.com/microsoft/vscode-jupyter/assets/59864902/0c879b54-cccb-474e-b719-16f9e8746989

DonJayamanne commented 4 days ago

Image